Implementation with Google Tag Manager
The purpose of this guide is to help you implement Affilae tracking using GTM Templates.
There are three steps to implementation :
– Installation of the GTM container on your site
– Creation of the Affilae tag for clicks
– Installation of the Affilae Tag for Conversions
Before you start :
To install the GTM container on your site, please follow the Google Configuration and Installation documentation: support.google.com/gtm
In addition to following the Google documentation, it is also advisable to know how Affilae tracking tags work.
It should be noted that Google Tag Manager may be affected by the use of Ad Blocker and the refusal of Cookies (RGPD law and cookie banner).
Frequent problems :
The sequencing of the Tags is very important; the Clicks Tag must be loaded before the Conversion Tag.
Tags are not triggered, the choice of trigger is important, depending on the trigger rule the event variables will change, everything will depend on your trigger strategy and the variables you need to be triggered, our support team is available if you have any problems with the triggering of your Tags.
The Tags are triggered but the information required for the programme to function correctly is missing (conversion value, conversion ID, discount voucher, etc.). You need to make sure that your variables are in place, ideally these variables are configured so that they are fed back dynamically, in which case it is essential that your data layer is well structured on your site.
Implementation via Affilae Templates
1- Installing GTM
To install the GTM container on your site, please follow the Google Configuration and Installation documentation: support.google.com/gtm
2- Add the Affilae tag
Once GTM has been installed, log in to your account and navigate to your “Workspace“; from there, in the left-hand column, find and click on “Templates“.
When the page loads, in the “Tag templates” table, click on “Search in the gallery“, then :
Search for “Affilae” in the search bar, then find the template named “Affilae – Click Tag” and click on “Add to workspace” or “Open in editor“.
- Once you have added the Affilae template to your workspace, navigate to the “Tags” menu in the left-hand column and click on “New“.
- From the list of tags, select the “Affilae – Click Tag“
- Name your tag, for example tag_affilae (if you have existing tags you can follow the nomenclature).
- Click in the “Tag configuration” table, then select “Affilae – Click Tag” from the menu on the right.
- Enter your Program ID in the “Affilae Program ID” field (mandatory field). You will find your Program ID in the configuration of your program in the “tracking” tab via the “integration via an Affilae module” section.
- If you wish to customise your click tracking, you can click on “Optional Values” and fill in the optional fields of your choice.
- Once the Tag has been installed and the “Affilae Program ID” filled in, click on the “Triggering” table, the menu of predefined triggers will appear and all you have to do is select “All pages“.
- Save and send your changes.
3- Add the Affilae Conversion Tag
The Conversion Tag must be installed on the event or confirmation page for which you want to track conversions (e.g. sale, contact form, etc.) and must only be triggered after the Affilae – Click Tag.
Before going any further, it’s a good idea to understand how user-defined variables work. You can find the GTM documentation here.
The Affilae Conversion Tag relies on user-defined variables, and these variables will need to be created by you using your site’s dataLayer.
Variables :
- From your “Workspace“, in the left-hand column, find and click on “Variables“.
- When the page loads, find the “User-Defined Variables” table and click on “New” to create a new Variable, then :
- Name your Variable e.g dl_conversion_id (if you have existing Variables you can follow the nomenclature).
- Click in the “Variable configuration” table, then in the right-hand menu that appears select “Data layer variable“.
- In the “Data layer variable name” field, enter your value from the data layer on the page of your site where the conversion is taking place**.
- For the “Data layer version” leave “Version 2“.
- Save and go on to create the next variable.
CAUTION: When entering the “Name of the data layer variable“, as explained above, the value entered must correspond to the value found in the dataLayer. If the page where the Tag is triggered contains a dataLayer with 2 “id” values (common for ecommerce), you will need to specify the path to the property. Below is an example of a dataLayer found on an ecommerce site:
- ecommerce.purchase.actionField.id
Trigger :
Once you have created your variables, you will need to create the trigger for your Affilae Conversion Tag. To do this, from your “Workspace” in the left-hand column, find and click on “Triggers“.
When the page loads, click on “New” to create a new Trigger, then :
Name your Trigger e.g trigger_confirmation_page (if you have existing Triggers you can follow the nomenclature).
Click in the “Trigger configuration” table, then in the right-hand menu that appears, select the type of trigger that best suits your needs. If you have a specific URL as a confirmation page, the “Window loaded” type would be the simplest choice.
Save and go on to create your Affilae Conversion Tag.
Conversion tag :
From your “Workspace“, in the left-hand column, find and click on “Templates“.
- When the page loads, in the “Tag templates” table, click on “Search the gallery“, then :
- Search for “Affilae” in the search bar, then find the template named “Affilae Conversion Tag” and click on “Add to workspace“.
- Once the Affilae template has been added to your workspace, navigate to the “Tags” menu in the left-hand column and click on “New“.
- From the list of tags, select the “Affilae Conversion Tag“.
- Name your Tag e.g tag_affilae_conversion (if you have existing Tags you can follow the nomenclature).
- Click in the “Tag configuration” table then fill in the fields (only the “Key“, “Conversion ID“, “Conversion Amount” and “Conversion Currency” fields are mandatory, any other field is optional) with the variables you created earlier.
- Once the Tag has been installed and the variables filled in, click on the “Trigger” table, the triggers menu will appear and all you have to do is select the Trigger you created in the previous step.
- Save and send your changes.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article