Advanced setup with Google Tag Manager

You want to create conditional controls for your tags triggers
If one of your tags is already triggered by a custom event, that you cannot replace with an Axeptio event (ex: an addToCart event), you can add a condition to your trigger with our variable.

A. Get our variable template

Go to the "templates" section and click on "Search Gallery"
Search in the variable templates Gallery
Select the template called "Axeptio authorized vendors"
Click on "Add to workspace" then "Add" in the pop-in. The variable template is now added to your GTM.

B. Create a variable based on the template

You will now have to create a variable based on the template you just added. Go to the "variables" section and create a new one.
Create a new variable
Click on "Variable Configuration" and select our template in the list.
Select our template in the list
Finally, name your variable and save it.

C. Add conditions to your triggers with the variable

The variable we created is an array containing in real time all cookies that have been accepted by the user. Thanks to this variable, we will be able to add conditions on triggers.
Here is a trigger example using this kind of conditions :
On your trigger, check the box "Some Custom Events", then select the variable you just created, then "contains", and finally the cookie's name you want to check.
Example of a condition on a custom event that will check consent on Google Analytics
Be careful, the cookie name is his technical name sent by our API, that can be found directly in your Axeptio admin, or by checking the dataLayer in the console.
Here is where to find the cookie name to add in your condition :
Go to your Axeptio admin, and click on the chosen cookie, you should be redirected to a page allowing you to modify its parameters, the field we're looking for is called "NAME".
Here you can see the cookie name to add to your condition
You wish to trigger the deposit of a cookie when there is a click on a specific element of your page. User case: You wish to trigger the deposit of a cookie on click on the "download the booklet" button, but only if the user agreed with the deposit.
You wish to trigger a tracking cookie if the user clicks on the button
But before that you want to check user consent

A. How can I do it?

1 - Create a variable

Connect to your Google Tag Manager account, then go to Variables, and create a new "User-defined Variables".
Click on "Variables" then "New"
Choose "1st Party Cookie" as your variable type.
Choose "1st Part Cookie"
Name your tag, then in the "Cookie Name" box write: axeptio_cookies and check the "URL-decode cookie" box.
Configure your variable
Congratulations, your variable is now created!

2 - Define two trigger conditions

Go back to the tags you want to modify or create new ones.
Choose the tag you want to modify
In the "Triggering" part, create a new trigger.
Create a new trigger
Select "Just Links" type.
Trigger when a link is clicked
Once this is done, you can condition the tag trigger with the user consent, with the help of our Axeptio variable and the "Vendor": true nomenclature, and by setting the maximal waiting time to 1 millisecond.
Conditional trigger
Finally, you can choose to trigger this tag on click on a specific class and on the URL
Warning, the specified class should be unique

B. Google Tag Manager Debug

If you have the slightest problem about locationg your class or elements that you want to track on GTM, you can use the debug mode on your website, that will show all elements detected by GTM when there is a click on your website.
Variables choice
To activate this mode simply go to your GTM and click on "Preview".
Prévisualiser
Congrats ! You can trigger all your actions in accordance with user choices and preferences.