Shopify affiliate program with Affilae

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 an example, you must copy-paste the code in your account: “config” menu at the bottom of the page.
[pastacode lang=”markup” manual=”%3Cscript%20type%3D%22text%2Fjavascript%22%3E%0A%20%20var%20_ae%20%3D%20%7B%0A%20%20%20%20’pid’%3A%20YOUR_PROGRAM_ID%2C%0A%20%20%20%20’advertiserFirst’%3A%2021600%2C%20%2F%2F%2015%20days%20in%20mins%0A%20%20%20%20’allowSiteUnder’%3A%20false%2C%0A%20%20%20%20’allowIframing’%3A%20false%0A%20%20%7D%3B%0A%20%0A%20%20(function()%20%7B%0A%20%20%20%20var%20element%20%3D%20document.createElement(‘script’)%3B%20element.type%20%3D%20’text%2Fjavascript’%3B%20element.async%20%3D%20true%3B%0A%20%20%20%20element.src%20%3D%20’%2F%2Fstatic.affilae.staging1.kaizen-developments.com%2Fae-v3.2.js’%3B%0A%20%20%20%20var%20scr%20%3D%20document.getElementsByTagName(‘script’)%5B0%5D%3B%20scr.parentNode.insertBefore(element%2C%20scr)%3B%0A%20%20%7D)()%3B%0A%3C%2Fscript%3E” message=”Tracking des clics Shopify” highlight=”” provider=”manual”/]

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:
[pastacode lang=”markup” manual=”%3C!–%20AFFILAE%20BEGIN%20–%3E%0A%0A%7B%25%20if%20order.discount_applications.size%20%3D%3D%200%20%25%7D%0A%20%20%20%20%3Ciframe%20src%3D%22https%3A%2F%2Flb.affilae.staging1.kaizen-developments.com%2F%3Fkey%3D%7B%7B%20YOUR.KEY%20%7D%7D%26id%3D%7B%7B%20order_number%20%7D%7D%26amount%3D%7B%7B%20subtotal_price%20%7C%20money_without_currency%20%7D%7D%26payment%3Donline%26customer%3D%7B%7B%20customer.id%20%7D%7D%22%20frameborder%3D%220%22%20width%3D%221%22%20height%3D%221%22%3E%3C%2Fiframe%3E%0A%0A%7B%25%20else%20%25%7D%0A%0A%20%20%20%20%7B%25%20for%20discount%20in%20order.discount_applications%20%25%7D%0A%20%20%20%20%20%20%20%20%3Ciframe%20src%3D%22https%3A%2F%2Flb.affilae.staging1.kaizen-developments.com%2F%3Fkey%3D%7B%7B%20YOUR.KEY%20%7D%7D%26id%3D%7B%7B%20order_number%20%7D%7D%26amount%3D%7B%7B%20subtotal_price%20%7C%20money_without_currency%20%7D%7D%26payment%3Donline%26customer%3D%7B%7B%20customer.id%20%7D%7D%26voucher%3D%7B%7B%20discount.title%20%7D%7D%22%20frameborder%3D%220%22%20width%3D%221%22%20height%3D%221%22%3E%3C%2Fiframe%3E%0A%20%20%20%20%7B%25%20endfor%20%25%7D%0A%0A%7B%25%20endif%20%25%7D%0A%0A%3C!–%20AFFILAE%20END%20–%3E” message=”Code de conversion Shopify” highlight=”” provider=”manual”/]
To go further, see Shopify docs.
Now, you have to test a conversion before starting – follow our guideline: Test tracking.
Need help? Contact us!


