Skip to main content

# Conditioning Your GTM Tags to Consent: Introduction

Written by Alexandre Dias Da Silva

This article is part of the Cookie Blocking series.

Before following the guide below, make sure you have reviewed the general overview article Manage consent conditioning logic.

If you had never installed a CMP on your site before, there is a good chance that your GTM tags are firing without considering the consent state. However, as we explained previously, to make your tags GDPR compliant, you must ensure that they only fire if consent has been given. The purpose of this article is to guide you through the configuration to allow you to block/unblock your tags based on the consent state.

Before diving into the trigger configuration, it is essential to take a moment to analyze how your tags currently function in Google Tag Manager. If you have never installed a CMP on your site, there is a strong chance that your tags are currently firing without any consent logic. In other words: all tags fire as soon as possible, with no consent control whatsoever.

To adapt your tags to GDPR requirements, it is important to understand their current firing logic:

  • Do they fire on all pages, immediately upon arriving on the site (for example: Google Analytics, marketing pixels, etc.)?

  • Or only in certain cases, such as 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 will need to use to integrate consent management:

  • Tags that fire globally (on "All Pages") must be blocked until explicit consent is obtained.

  • Tags that already rely on specific triggers can integrate an additional condition to verify that the service has been accepted before executing them.

How do you condition your tags to consent?

To integrate consent management, you will use the events and variables that Axeptio sends to GTM.

For a tag that must fire on all pages

You will configure the tag so that it fires ONLY ONCE the "green light" is given by Axeptio (via the event in the form axeptio_activate_).

For a tag that must fire only when a specific event occurs

You will configure the tag so that it fires when the event occurs UNLESS consent has not been obtained (that is, if the service in question is not in the list of consented services, accessible via the Axeptio variable).

In GTM, this logic can be expressed in several valid ways. In the rest of this article series, we will use the most direct method applicable to the vast majority of GTM configurations. However, if you have specific needs, refer to our article How Axeptio communicates with GTM: events and variables to explore other approaches.

Did this answer your question?