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 certain tags based on consent status, and adapts to different technical contexts.
Here is an overview of what Axeptio transmits to GTM, to help you choose what to rely on in your triggers.
The technical name of services, used both at the event level (e.g.: axeptio_activate_google_analytics) and in the content of variables (axeptio_authorized_vendors: ["google_analytics"]), is defined at the level of cookies you have added in your Axeptio project configuration (see the article 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, modifies 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 that the tag only fires after explicit user consent.
axeptio_disable_
When the 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 each time consent is updated, whether on first display of the banner or when changes are made 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 accepted.
Axeptio Consent State Variable Template
The Axeptio Consent State variable template, available in the GTM gallery, makes it easy to retrieve the list of services for which the user has given consent.
It relies on a dataLayer variable called axeptio_authorized_vendors (presented in the next section), but has the advantage of being ready to use, more readable and easier to use in your GTM triggers.
Usage example:
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
With each axeptio_update, a variable is also pushed to the dataLayer:
axeptio_authorized_vendors, which contains an array with the list of services for which the user has given consent.
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 duplicated 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 service in question is consented to or not.
Advanced Options
Our Axeptio CMP tag template has two options that affect the behavior described in this article: dataLayer Name and Trigger GTM Events. For their complete description, see Parameters of the Axeptio CMP GTM template.
