Implémentation via Google Tag Manager – Server-side
Upstream, make sure you have a Server Side container to start integration:
https://developers.google.com/tag-platform/tag-manager/server-side/overview?hl=fr#set_up_a_tagging_server
This guide is designed to help you implement Affilae tracking via GTM Server Side.
Setting up CMPs remains mandatory.
1- Installing GTM
To install the GTM container on your site, please follow the Google Configuration and Installation documentation: support.google.com/gtm
First, you’ll need two containers with :
- A Client Side container
- A second Server Side container
- Create a new Server side tag
- Add the Server Side container’s ID tag
- And also the URL as a variable (Domain of the Server Side container)
As a reminder, in Google Tag Manager (GTM), when you perform a server-side implementation, the tag ID refers to the unique identifier associated with your GTM container. This tag ID is used to link your server-side implementation to your GTM account and to your specific container.
To find the tag ID in Google Tag Manager, follow these steps:
1. Log in to your Google Tag Manager account.
2. Access the management interface of the container for which you wish to find the tag ID.
3. Click on the “Admin” tab in the top right-hand corner.
4. Under the “Admin” tab, select “Account information”.
5. You’ll see the tag ID listed under “Container ID”. This is a unique alphanumeric string that uniquely identifies your GTM container.
Copy this value and use it in your server-side implementation to correctly connect to your GTM account and send the appropriate tracking data.
In the Server Side container :
- Create a new Affilae – Server Side tag
- Next, fill in the Key, Amount and Currency variables (mandatory).
- Check the “Allow Probabilistic Attribution” box at the end of the tag.
The Server Side tag will collect clicks post S2S redirection and trigger a conversion on the event All Pages + Purchase.
Here, the client-side tag retrieves data from the server-side to track the conversion. It is imperative to have a relationship between the two for tracking to be operational.
Warning:
- The program must be in S2S.
This allows the program to switch to redirection and validate the conversion on the server side.