Article

C2S – GTM – Templates

Notes:
  • The URL format of your program must be set as a parameter. You can change the URL format by going to your program settings and editing the general parameters.
  • ⚠️ Do not send personal data: examples include first name, last name, or email.
  • Regular updates to our tags. Check your notifications on the template to perform updates.
Install the Affilae Click Tag
Add the Affilae template
  • Log in to Google Tag Manager
  • Go to Templates  Search in Gallery
  • Search for Affilae and add “Affilae – Click Tag”
Create the click tag
  • Go to Tags  New
  • Name your tag
  • In Tag Configuration, select Affilae – Click Tag
  • Enter your Affilae Program_ID
  • In Triggering, select All Pages
  • Save and publish

Where to find your Program ID? Affilae Admin ➜ Configuration ➜ Tracking ➜ Integrations with an Affilae module

Install the Conversion Tag
Create conversion variables
  • Go to Variables  New
  • Create the following variables (type: data layer variable available in your dataLayer):

➜ dl_conversion_id ➜ Unique order number
➜ dl_conversion_amount  Net sales amount (excluding taxes and shipping)
➜ dl_conversion_currency  Currency (EUR, USD, etc.)

⚠️ The names must exactly match those on your site’s dataLayer. The variables above are examples.

Create the trigger
  • Go to Triggers  New
  • Name: Purchase
  • Type: Custom Event
  • Configure it for the confirmation page
Add the conversion template
  • Go to Templates  Search in Gallery
  • Add “Affilae Conversion Tag”
Create the conversion tag
  • Go to Tags  New
  • Name: Affilae – Conversion
  • Fill in the fields with your variables:
  • Key: your Affilae key
  • Conversion ID: {{dl_conversion_id}}
  • Conversion Amount{{dl_conversion_amount}}
  • Conversion Currency{{dl_conversion_currency}}
  • Trigger: select your trigger (e.g., purchase)
  • Save and publish

For instance: the data layer variable name must be: ecommerce.purchase.actionField.id (the full path must be specified).

Finalization
  • Publish the tags
  • Test the tracking
Help
Tracking not working?
  • Check that the tags are correctly installed
  • Ensure the variables are correctly mapped, along with your Program_ID and KEY
  • Test with a real order
  • Contact Affilae support with your configuration details

Need help?

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

Contact Us