Skip to main content

How Axeptio Communicates with GTM: Events and Variables

Axeptio sends events and variables to GTM that you can use to configure your tag triggers.

Written by Alexandre Dias Da Silva

When you integrate Axeptio with Google Tag Manager, our SDK automatically sends multiple events and variables to the dataLayer.

This data can be used to trigger or block certain tags based on the consent status, and adapts to different technical contexts.

Here is an overview of what Axeptio sends 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 the cookies you 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 in question.

Examples:

  • axeptio_activate_facebook_pixel

  • axeptio_activate_google_analytics

  • axeptio_activate_google_ads

These events are useful for creating custom event triggers in GTM: they ensure that the tag fires only 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 every time consent is updated, whether at the initial 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 their consent.

It is based 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 simpler 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 their 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 in duplicate 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 trigger 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 full description, see Axeptio CMP GTM Template Parameters.

Did this answer your question?