Skip to main content

Integrate Axeptio via Google Tag Manager

Written by Alexandre Dias Da Silva

This article is part of the Integration series. Before following the guide below, make sure you have reviewed the general introduction article Choose your Axeptio integration method.

Are you already loading Axeptio via another method (CMS plugin, hardcoded, or other)? In that case, you do not need to follow this guide. If you are looking to manage your cookie blocking using GTM, see this article.

Basic GTM functionality

This article does not cover Google Tag Manager account and container creation. For installation instructions, consult the official documentation.

Google Tag Manager works primarily in two parts:

  • Tags: these are the snippets of code that you will inject into your site (tracking code, conversion pixel, etc.)

  • Triggers: this is what allows you to trigger the injection of tags on your site. They allow you to define the condition for injecting your tag (💡 on every page load, after a purchase, etc.)

Load Axeptio via GTM

🍪 If you are already loading Axeptio via another method (script, plugin, etc.), you do not need to reload Axeptio in GTM

Go to your GTM interface:

  • Select the Tags tab in the left menu

  • Then click New

Capture_d_e_cran_2022-03-08_a__11.27.28.png

Click in the Tag configuration rectangle. In the page that just opened:

  • Then in the list that appeared, click on "Discover more tag types in the gallery":

  • Search for "Axeptio CMP" and select the template:

  • Add the template to your workspace. You should now have this in your tag:

  • Now enter your project ID in the Project ID field.
    (Optional) You can also enter the name of your cookies version if you have multiple configurations of the cookie widget:

All that's left is to choose a trigger:

  • Click on the Triggering rectangle

  • Select the trigger named Consent Initialization - All Pages so that Axeptio loads first. This trigger is the first event in the GTM lifecycle — it ensures that default consent signals are set before your Google tags (GA4, Ads, etc.) are executed. If you use a different trigger (All Pages, DOM Ready, etc.), your Google tags may fire without a consent signal, which causes data loss, GA4 traffic displayed as "Unattributed", or consent signals applied too late.

  • Finally, give your tag a name and save it:


Your Axeptio tag is now completely configured. All that's left is to publish your GTM container so your changes are active on your site.

📌 If you use Google Analytics 4 and/or Google Ads, you will need to configure Consent Mode v2 in this same tag. You can find all the information about setting up Consent Mode v2 here: Installation of Google Consent Mode v2

Did this answer your question?