This article is part of the Cookie Blocking series.
Before following the guide below, make sure you've read the overview article Managing Consent Logic
If you've never installed a CMP on your site before, chances are your GTM tags are firing without taking consent status into account. As we mentioned earlier, to make your tags GDPR-compliant, you need to ensure they only fire when consent has been given. The goal of this article is to guide you through the setup so you can block or allow your tags based on the user's consent status.
Before diving into trigger setup, it’s important to take a moment to review how your tags currently work in Google Tag Manager.
If you’ve never installed a CMP on your site, chances are your tags are currently firing without any consent logic in place. In other words: all your tags are firing as soon as possible, with no consent check whatsoever.
To make your tags GDPR-compliant, you first need to understand how they’re currently being triggered:
Do they fire on all pages as soon as the user lands on the site (e.g., Google Analytics, marketing pixels, etc.)?
Or only in certain cases, like on a click, a purchase, or another specific event (form submission, scroll, button click, etc.)?
This distinction is key, because it determines the method you’ll need to use to integrate consent management:
Tags that fire globally (on “All Pages”) will need to be blocked until explicit consent is given.
Tags that already rely on specific triggers can include an additional condition to check whether the service has been accepted before firing.
How to Trigger Your Tags Based on Consent
To implement consent management, you'll use the events and variables that Axeptio sends to GTM.
For a tag that needs to fire on all pages
You’ll configure the tag so it only fires ONCE Axeptio gives the green light (using an event likeaxeptio_activate_
).See the dedicated guide
For a tag that should only fire when a specific event occurs
You’ll configure the tag so it fires when the event happens UNLESS consent hasn’t been given (meaning the related service is missing from the list of accepted services, which you can access through the Axeptio variable).
In GTM, this logic can be expressed in several valid ways. In the rest of this article series, we’ll use the most straightforward method, which works for the vast majority of GTM setups.
However, if you have specific needs, check out our article How Axeptio Communicates with GTM: Events and Variables to explore other approaches.