We recommend using a Tag Manager to efficiently manage your third-party scripts that leave cookies by consent.
In this article, we'll cover the following topics:
- What it does
- Simple "Page view" triggers
- More complex triggers: Using the Axeptio variable
- Verification and publication
- Other Tag Managers
1. What it does
A Tag Manager is a tag management system that allows you to inject code into your site dynamically.
This type of system is especially useful for tracking and advertising tools, such as AT Internet or Facebook Pixel.
In this article, we're focusing on Google Tag Manager (GTM) because it is free and easy to use. As you will see below, however, there are other Tag Managers.
In this section, we'll cover the following points:
Basics of GTM
Google Tag Manager works mainly in two ways:
- Tags: These are code snippets that you'll inject into your site (tracking code, conversion pixel, etc.).
- Triggers: These allow you to inject tags on your site. You can use them to set the condition for injecting your tag (💡 with each page load, after a purchase, etc.).
If you haven't yet installed Google Tag Manager on your site, you can find the official documentation here: Go to the Google Tag Manager documentation.
If you have already integrated Axeptio into your site, you can go directly to the following sections:
Loading Axeptio via GTM (optional)
Go to your Axeptio back office and then to your project to find your script. Once you are in the right project:
- Click the gear ⚙️ in the top-right corner and then Installation.
- Then, copy all of the code on the page.
Once the code has been copies, go to your GTM interface:
- Select the Tags tab in the menu on the left.
- Then, click New.
On the page that opens:
- Click in the Tag Configuration box.
- Then, in the list that appears, choose Custom HTML.
- Paste your Axeptio script into the HTML box.
All that's left to do is to choose a trigger:
- Click the Trigger box.
- Select the All Pages or Page view trigger so that Axeptio is loaded when the page loads.
- Finally, provide a name for your tag and then save it.
Your Axeptio tag is now fully configured. All you need to do now is to publish your GTM container so that your changes are active on your site.
✅ Depending on when you want to trigger your GTM tags, you can use different triggers. To make your tags compliant with the GDPR, meaning that they will trigger only if consent was given, you will need to modify your triggers.
We will cover two triggering methods below:
These two methods are complementary and serve different roles. It is therefore preferable to use the appropriate method for each tag.
2. Simple "Page view" triggers
✅ These triggers activate the tag as soon as the page loads.
For your consent tags to be triggered only after the user has accepted the service (ex. Facebook Pixel), you must modify the triggers for your tags through the corresponding Axeptio custom event.
There are two steps for accomplishing this:
- Retrieve the list of events in Axeptio
- Modify the GTM tag triggers
- Example of a Facebook Pixel tag and its trigger
Retrieve the list of events in Axeptio
- Go to your project and then to the relevant cookie configuration.
- Click the Integrate on your site button in the top-left corner.
- Scroll down to the third section Save user preferences.
You will see a list of events, sorted based on the steps of your Axeptio widget:
Modify the GTM tag triggers
Go to the interface for your GTM container:
- Select the tag you want.
- Click the Trigger section.
💡 You will see a "+" symbol for adding new triggers, along with a "-" symbol next to your existing triggers, if any.
- Delete your existing triggers, and then click the "+" to create a new one.
⚠️ Using Axeptio custom events is meant to replace "Page view" triggers. If you are using more complex triggers, see the More complex triggers: Using the Axeptio variable section.
- Click in the Trigger Configuration box. GTM will then offer several types of triggers:
- Scroll down and select Custom Event.
- Copy and paste the event into the Event Name field.
- Provide a name for your trigger in the top-left corner.
- Save it in the top-right corner.
✅ Your tag will now trigger only after the user's consent.
Example of a Facebook Pixel tag and its trigger
- The tag
- Its trigger
3. More complex triggers: Using the Axeptio variable
If you have tags that are triggered on specific events (when a link is clicked, on a custom event, etc.), you can use the Axeptio variable as a condition. This makes it possible to check the consent on your existing triggers.
In this section, we're cover:
How to create the Axeptio variable
First, you'll need to get the variable template from the Google Tag Manager gallery:
- Select Templates in the menu on the left.
- In the Variable Templates section, click the Search Gallery button.
- In the list that appears on the right, select the template named Axeptio authorized vendors.
- Click Add to workspace in the top-right corner.
💡 GTM then shows you the list of authorizations required by the template.
- Click Add to confirm.
✅ The template is now visible in your list of variable templates.
Now, you can create a variable from this template:
- Select Variables in the menu on the left.
- Create a new user-defined by clicking the New button.
- Click in the Variable Configuration box.
- In the list that appears, select Axeptio authorized vendors in the custom templates.
- Provide a name for your variable and then save it with the button in the top-right corner.
✅ Once the variable has been created, you can add conditions to your existing triggers.
As their name indicates, conditions allow you to condition when triggers are activated.
It is therefore possible to create conditions on a trigger by specifying that it will trigger only if certain events occur.
For example, you can condition the trigger:
- When a defined variable contains a certain value
- On a specific URL if you want a trigger only are certain pages
✅ For more information, see Google's documentation on Triggers.
The Axeptio variable works as follows:
- When consent has been given, a table listing all accepted cookies is created.
This makes it possible to create a condition like:
"my variable" [contains] "my cookie's name"
The trigger will not be fired until the cookie has been accepted by the user and stored in the variable.
✅ Result: The associated tag will not be injected on the site!
⚠️ The cookie's name is not necessarily the same as the name displayed on your widget. To learn how to retrieve the name of your cookies, see: How to retrieve the name of cookies.
Once you know the names of the cookies, you simply have to create the conditions on the triggers:
- Go to the desired trigger.
- Check the Some custom events box.
- For the fields that appear, select (in order):
-> your Axeptio variable
-> your cookie's name
- Save the changes.
Below is an example for a trigger on a custom event called "AddToCart" that should trigger a Facebook Pixel tag, subject to consent:
How to retrieve the name of cookies
There are three ways to retrieve the name of cookies:
From your Axeptio project
In your Axeptio back office, click the cookie you want.
You will see all the cookie's characteristics, including its name as recognized by our API:
Through the browser console
Once the cookies have been accepted, go to the web browser console:
- From the web browser, right-click your site page that is using Axeptio.
- Select Inspect.
- Then, type datalayer and press "Enter".
You will see a list that can be expanded by clicking the little arrows at the start of the row.
Expand the "event" rows, "axeptio_update", and then "axeptio_authorized_vendors", until you see the list of accepted cookies and their names:
Using the GTM preview
⚠️ This procedure works only if GTM is properly connected to your site and if the Axeptio widget has been successfully installed.
- Click Preview in the top-right corner of your GTM page.
- Enter your site's URL and launch it.
This operation allows you to access the following two pages:
- The Tag Assistant preview page
- The page at the specified URL
Once cookies have been accepted on your site:
- Go to the preview page.
- Select the "axeptio_update" event in the list on the left.
- Then, select the Variables tab.
You'll then see all of the variables used by GTM, including the ones that we created:
✅ All of the conditions for a trigger must be verified for the trigger to work!
4. Verification and publication
All of your tags that are subject to consent are now GDPR-compliant, and you are ready to publish your GTM.
✅ However, we highly recommend that you test your changes through GTM's preview mode to be sure that all of your tags are triggered at the right time.
See the following article for information on how to perform these tests:
5. Other Tag Managers
Below is a non-exhaustive list of other Tag Management Systems (TMS).
Most of these are paid solutions, and we have not tested their integration with Axeptio. However, because they are paid services, they usually offer support and assistance with setup, unlike Google Tag Manager.
✅ If you implement one of these solutions, feel free to contact our support team if you need help or if you'd like to share your experience in order to help others and expand this article.
- Launch by Adobe: If you are comfortable with Adobe products, this solution seems to be quite easy to use.
- Tealium: Specialized in marketing and useful if you have multiple sites that have lots of traffic and complex marketing campaigns.
- Signal: Specialized in ad tag management.
- Qubit: Usable as is, this solution is known for its advanced customization.
- Ensighten: Specialized in security.
- TagCommander: Specialized in GDPR compliance.
- Segment.io: To use Segment.io with Axeptio, you'll need to follow this documentation : Documentation Segment.io
- Piwik PRO: open-source code.
- IBM DDX: Included in IBM's Digital Marketing Optimization suite, this solution works using only one tag, which boosts your site's performance.
- Yottaa: Specialized in e-commerce.
- Kwanko: If you use Kwanko, you'll need to add a Kwanko cookie to your Axeptio widget, in addition to the solutions that come preloaded. Once this is done, contact your Kwanko account manager directly.
- Eulerian: If you use Eulerian, you can find information about integrating a CMP like Axeptio in the following documentation: Eulerian Documentation.