Skip to main content

GTM Distribution

When a user makes a consent decision, ConsentForge automatically pushes events to your GTM dataLayer.

dataLayer events

{
event: 'cf_consent',
cf_consent: {
necessary: true,
analytics: true,
marketing: false,
functional: true
}
}

ConsentForge also fires the standard Consent Mode update:

gtag('consent', 'update', {
analytics_storage: 'granted',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied'
});

You can use the cf_consent event as a custom event trigger in GTM to activate specific tags only after the relevant consent is given:

  1. In GTM, go to Triggers → New → Custom Event
  2. Event name: cf_consent
  3. Use this trigger on tags that should fire after consent

See also