Most consent management platforms are usually deployed client-side, meaning scripts are loaded directly in the user's browser. While this setup is quick to implement, it's increasingly impacted by browser restrictions (like Safari or Firefox) and widespread use of ad blockers.
In this context, Server-side Tracking is quickly emerging as a key technology. By routing data collection and consent signals through your own subdomain and a server container, you gain control over what gets sent, improve data accuracy, and bypass ad blockers and browser limitations.
Ensure that the user’s consent, collected via Axeptio, is properly sent from the web container to your server container. This requires setting up a variable and a tag in your GTM web container.
This variable contains the list of all cookies (authorized vendors) accepted by the user. Follow this step-by-step guide to creating the Axeptio Consent State variable in GTM.
This variable is the equivalent of axeptio_authorized_vendors
from the dataLayer, and it’s essential for sending granular consent signals to the server container.
If you’ve enabled Google Consent Mode v2 in your Axeptio configuration, it will map your consent categories to the expected Google signals: ad_storage
, ad_user_data
, ad_personalization
and analytics_storage
. To check and adjust Google Consent Mode v2 configuration with Axeptio, follow the guide Configuring Google Consent Mode v2 in Axeptio.
Next, you need to create a tag that fires when Axeptio updates the user’s consent preferences. This tag will pass the user’s consent state (stored in the 'Axeptio Consent State' variable) to your server container.
Here, for example, we use GA4 as a technical bridge to transfer the consent information to TAGGRS, but other alternatives are possible.
So, first, in your GA4 configuration tag settings, add your server_container_url
. This tells the tag where to route the data instead of sending it directly to Google’s servers.
Next, we’ll create a new GA4 Event tag that will send consent state information to the server container at the appropriate moment.
Then, use the custom axeptio_update event, which is sent by Axeptio each time the consent is read or modified.
Now that the first container setup is complete and the “Axeptio consent state” is being sent to your server container via a GA4 event, the next step is to configure your TAGGRS server-side container to receive and interpret this data correctly.
To do this, you will need to set up a GA4 client in your server container.
In your Server GTM container, start by creating a User-defined Variable of type Event Data.
This variable will now contain the list of authorized vendors (cookies or tags the user has consented to), sent from the browser when the axeptio_update
event fires.
With the axeptio_consent_state
variable available server-side, you can now granularly condition the triggering of your tags based on the vendors accepted by the user.
For example, to fire a GA4 Page View server-side only if the user consented to Google Analytics:
Each vendor in Axeptio has a technical name stored inside the “Axeptio consent state” variable. You can find these names in this section of Axeptio’s documentation here: How to retrieve the name of cookies
This setup allows you to selectively trigger tags for each vendor the user has consented to.
For every technology or partner you want to load server-side (Meta, TikTok, Hotjar, etc.), you can:
This modular logic ensures full compliance with user choices while maintaining maximum flexibility in your server-side tracking strategy.
All in all, this setup offers a future-proof approach to consent management: more resilient data collection, full respect for user preferences, and scalable, compliant tracking for every vendor in your stack.