You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all, thank you for the amazing work on this library — it's incredibly helpful and flexible.
We are currently trying to integrate CookieConsent with Google Tag Manager (GTM) and Consent Mode (v2), following the opt-in approach. Our goal is to load GTM only after the user has accepted the analytics category, and to properly update consent settings before any tags fire.
Here’s the general setup:
mode: 'opt-in'
onConsent and onAccept callbacks are used to dynamically load GTM
Consent update is pushed using gtag('consent', 'update', { ... })
GTM loads correctly after acceptance, and tags do fire
However, consent remains "denied" in the Consent Mode debugger, and no collect request is sent to GA4
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hy everyone,
first of all, thank you for the amazing work on this library — it's incredibly helpful and flexible.
We are currently trying to integrate CookieConsent with Google Tag Manager (GTM) and Consent Mode (v2), following the opt-in approach. Our goal is to load GTM only after the user has accepted the
analyticscategory, and to properly update consent settings before any tags fire.Here’s the general setup:
mode: 'opt-in'onConsentandonAcceptcallbacks are used to dynamically load GTMgtag('consent', 'update', { ... })collectrequest is sent to GA4✅ What we are doing in
onAccept:Beta Was this translation helpful? Give feedback.
All reactions