Skip to main content
All CollectionsDigging deeper
How to use Consent Studio as a trigger for GTM Tags
How to use Consent Studio as a trigger for GTM Tags

Leverage our custom dataLayer events

J
Written by Juul van Schayik
Updated over 2 weeks ago

Trigger GTM tags based on user consent in Consent Studio

With Consent Studio, you may use a custom trigger to activate tags for your users.

In opposite to the “All pages” trigger, this method will allow tags to be loaded without requiring a page refresh. In other words, only with the custom trigger, tags will instantly be activated when the user provides their initial consent.

Adding this custom trigger can be done by creating a custom even trigger that listens to the cookie_consent_update event for a general update, or one of the category specific events:

  • cookie_consent_granted_functional

  • cookie_consent_granted_analytics

  • cookie_consent_granted_marketing

Remember: the Consent Studio CMP tag itself should have the “Consent Initialization - All Pages” trigger at all times.

Whenever a user retracts their consent, they do need to reload the page in order to de-activate the tags that were triggered under their previous consent.

Did this answer your question?