This article is part of the series on blocking cookies using Google Tag Manager.
Before following the guide below, please make sure you have read the article Understanding the current functioning of your GTM tags.
Are you looking instead to condition consent on a tag that should fire when a specific event occurs? It's this way!
These are tags that must be present on all pages of the website, from the initial load, such as:
GA4 configuration tag and global Google Ads 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 to the axeptio_activate_<service_name> event.
In order for your tags subject to consent to fire only after the user has accepted the relevant service (e.g. Facebook Pixel), you will need to modify the triggers of your tags 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 can access 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 a name to your trigger in the top left
Save it in the top right
â Your tag will now fire only after the user's consent
Example of a Facebook Pixel tag and its trigger
