When you integrate Axeptio with Google Tag Manager, our SDK automatically sends several events and variables to the dataLayer.
This data can be used to trigger or block tags based on consent state, and adapts to different technical contexts.
Here is an overview of what Axeptio sends to GTM, to help you decide what to rely on in your triggers.
The technical name of services — used in both events (e.g. axeptio_activate_google_analytics) and variable content (axeptio_authorized_vendors: ["google_analytics"]) — is defined by the cookie names you added in your Axeptio project configuration (see Retrieve the technical names of your services).
Events sent to the dataLayer
axeptio_activate_ (and axeptio_enable_)
Each time a user interacts with the Axeptio banner (accepts a service, updates their choices, etc.), an event is sent to the dataLayer.
The event name is specific to the service involved.
Examples:
axeptio_activate_facebook_pixelaxeptio_activate_google_analyticsaxeptio_activate_google_ads
These events are useful for creating custom event triggers in GTM: they ensure a tag only fires after the user has explicitly given consent.
axeptio_disable_
When a user refuses a service or withdraws their consent, Axeptio sends an axeptio_disable_<service_name> event to the dataLayer.
axeptio_update
This event is sent on every consent update, whether at the first display of the banner or when the user changes their choices via the widget.
You can use it as a base trigger, combined with a condition on the list of authorized services (see below), to fire a tag only if a given service has been consented to.
Axeptio Consent State variable template
The Axeptio Consent State variable template, available in the GTM gallery, lets you easily retrieve the list of services the user has consented to.
It is based on the axeptio_authorized_vendors dataLayer variable (described in the next section), but has the advantage of being ready to use, more readable and simpler to use in your GTM triggers.
Example usage:
Create an Axeptio Consent State variable based on this template, then add a condition to your triggers:
{{Axeptio Consent State}} contains google_ads
axeptio_authorized_vendors variable
On each axeptio_update, a variable is also pushed to the dataLayer:
axeptio_authorized_vendors, which contains an array with the list of services the user has consented to.
Example value:
axeptio_authorized_vendors: [ "google_analytics", "google_ads", "clarity", "facebook_pixel", "mailchimp", "hubspot", "youtube", "googletagmanager", "axeptio", "cloudflare", "$$googleConsentMode", "Google_Ads", "MailChimp", "Youtube", "CloudFlare", "$$completed" ]
Some services may appear twice with different names (e.g. "google_ads" and "Google_Ads") to ensure compatibility with older integrations.
Entries starting with $$ are internal technical services used by the SDK (such as $$googleConsentMode or $$completed)
In GTM, you can create a data layer variable pointing to axeptio_authorized_vendors, and use it in your triggers:
{{DLV - axeptio_authorized_vendors}} contains google_analytics
This allows you to block or fire a tag depending on whether the relevant service has been consented to.
Advanced options
The Axeptio CMP tag template has two options that influence the behaviour described in this article: dataLayer Name and Trigger GTM Events. For their full description, see Axeptio CMP GTM template parameters.
