This article is part of the series on cookie blocking using Google Tag Manager.
Before following the guide below, make sure you have read the article Understanding the current operation of your GTM tags.
Are you instead looking to condition consent to a tag that should fire when a specific event occurs? This way!
These are tags that must be present on all pages of the site, from loading, such as:
GA4 configuration tag and Google Ads global tag
Facebook, Pinterest, TikTok pixels, etc.
They are often configured with the "All Pages" trigger in GTM, which fires the tag systematically, regardless of the consent status.
To make this type of tag compliant, you must replace "All Pages" with a custom event type trigger that listens for the axeptio_activate_<service_name> event.
In order for your consent-dependent tags to fire only once the user has accepted the relevant service (e.g., Facebook Pixel), you will need to modify your tag triggers via the corresponding Axeptio custom event.
Retrieving the list of events in Axeptio
Go to your project, then to the desired cookie configuration
Click the Integrate on your site button in the top left
Scroll down to the third section Recording user preferences
You will have access to a list of events classified according to the stages of your Axeptio widget:
Modifying GTM tag triggers
Go to your GTM container interface:
Select the desired tag
Click in the Triggering section
💡 You will see a "+" symbol for adding new triggers, and a "-" symbol next to your existing triggers if you have any
Delete your existing triggers, then click the "+" to create a new one
Click in the Trigger configuration box. GTM will then offer you several types of triggers
Scroll down and select Custom Event
Copy and paste the desired event in the Event name field
Give your trigger a name in the top left
Save it in the top right
✅ Your tag will now fire only after user consent
Example of a Facebook Pixel tag and its trigger
