Article

C2S – Shopify

The Affilae Shopify integration relies on two installations: a tracking tag in your theme, and a custom pixel for conversions. Module 1.6 also manages the difference between new and returning customers.

Prerequisites: the URL format of your program must be set as a Parameter. Also retrieve your Program ID and your Key before you start, and download module v1.6.
Good to know: this pixel also manages differentiation between new and returning customers. Use the templatePixelOldNew in version 1.6.
Video, integrating Affilae with Shopify
The step-by-step video of the Affilae integration on Shopify.

Install the tracking tag in your theme

This code goes on all pages of your Shopify site.

<script type="text/javascript">
var _ae = {
"pid":"PID",
};
(function() {
var element = document.createElement('script'); element.type = 'text/javascript'; element.async = true;
element.src = '//static.affilae.com/ae-v3.5.js';
var scr = document.getElementsByTagName('script')[0]; scr.parentNode.insertBefore(element, scr);
})();
</script>

Steps

  1. Go to your Shopify admin.
  2. Open the Online Store menu.
  3. Click Themes.
  4. Click Actions, then Edit code.
  5. Select the theme.liquid file.
  6. Add the code inside the <body> tag.

Add the conversion pixel

Access Shopify pixels

  1. In the Shopify admin, open Settings.
  2. Click Customer events.
  3. Click Add custom pixel.

Configure the pixel

  1. Give your pixel a name, for example “Affilae Tracking”.
  2. Download the Affilae module v1.6.
  3. Delete the default text inside the pixel.
  4. Paste the Affilae pixel code.

Where can I find the Program ID and KEY? Affilae Admin > Configuration > Tracking tab > Integration via an Affilae plugin section.

Finalize and test

  1. Save the pixel.
  2. Connect the pixel to your store.
  3. Test the tracking of clicks and conversions.
Tip: a pixel that is saved but not connected to the store reports nothing. It is the most common cause of a silent Shopify integration.

Your checklist before installation

  • URL format configured in Affilae: as a Parameter.
  • PROGRAM_ID and conversion key retrieved.
  • Module v1.6 downloaded.

Related articles

Frequently asked
questions

Check that both codes are correctly installed, the one in the theme and the pixel. Make sure the variables are properly replaced, then test with a real order.

Verify that your store uses Checkout Extensibility. The final migration deadline was 25/08/2025. Then check that you are using the templatePixelOldNew of version 1.6.

In Affilae, open your program Configuration, then the Tracking tab. The Integration via an Affilae plugin section shows the Program ID, Rule ID, Key and Currency.

The module version documented here is 1.6. It is the one that manages differentiation between new and returning customers, through the templatePixelOldNew.

Yes. The theme code measures clicks on all pages, the custom pixel reports conversions. Without the first one, a conversion has no click to attach to.

Need help?

Stay up to date with the latest trends in affiliate marketing and never miss any of our articles.

Contact Us