GTM Distribution
When a user makes a consent decision, ConsentForge automatically pushes events to your GTM dataLayer.
dataLayer events
On consent decision
{
event: 'cf_consent',
cf_consent: {
necessary: true,
analytics: true,
marketing: false,
functional: true
}
}
On Consent Mode update
ConsentForge also fires the standard Consent Mode update:
gtag('consent', 'update', {
analytics_storage: 'granted',
ad_storage: 'denied',
ad_user_data: 'denied',
ad_personalization: 'denied'
});
Using cf_consent as a GTM trigger
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:
- In GTM, go to Triggers → New → Custom Event
- Event name:
cf_consent - Use this trigger on tags that should fire after consent
See also
- GTM Setup Guide — full setup instructions including Consent Mode v2