Affilae is an affiliate marketing software, helping marketers growth their online businesses with the right affiliates partnerships.

Create & run your own affiliate marketing program based on multiple commission scheme – today!

 

Setup your Shopify affiliate program with Affilae

 

 

 

 

Well done! You’ve created your new affiliate program. Now you’ve to setup tracking scripts to check if your affiliate sales are taken into account.

To install the tracking scripts for your Shopify affiliate program, follow these steps:
=> If you are using redirect tracking, go to step 2.

 

1 – Clicks tracking script

 

This script must be placed on all pages in the <body> tag.

To do that in Shopify, go to the admin and click on:

  • ” Online store ” menu
  • Then, on ” Action ” button
  • And on ” Edit HTML / CSS “

Then select the theme.liquid file in the tree and add the following code in the <body> tag.

=> Warning! This script is example, you must copy paste the code in your account: “config” menu at the bottom of the page.

<script type="text/javascript">
  var _ae = {
    'pid': YOUR_PROGRAM_ID,
    'advertiserFirst': 21600, // 15 days in mins
    'allowSiteUnder': false,
    'allowIframing': false
  };
 
  (function() {
    var element = document.createElement('script'); element.type = 'text/javascript'; element.async = true;
    element.src = '//static.affilae.com/ae-v3.2.js';
    var scr = document.getElementsByTagName('script')[0]; scr.parentNode.insertBefore(element, scr);
  })();
</script>
Tracking des clics Shopify

2 – Sales conversion tag

 

Go to Shopify admin and click in:

  • ” Settings ” menu
  • And ” Checkout “

Locate the “Additional content & scripts” field and copy and paste the following code:

 

<iframe src="https://lb.affilae.com/?key={KEY}&id={{ order_number }}&amount={{ subtotal_price | money_without_currency }}&payment=online&customer={{ customer.id }}&voucher={{ discount.title }}" frameborder="0" width="1" height="1"></iframe>
Code de conversion Shopify

 

In this code, you only need to replace the variable {KEY} with the key of the conversion code found in the “config” menu. (Green button “conversion code”).

To go further, see Shopify docs.

Now, you can test tracking and check if conversions works well: Test tracking.

Need help ? Contact us!