-
Bug
-
Resolution: Merged
-
Must have
-
None
-
2
-
Analytics, Cookies
-
Sprint #183, Sprint #184
-
tavros
Cf. comment on PLANET-6625
“Take a note that Page View event fires on the gtm.js event which fires before the consent event. That's why the first collect? hit doesn't have gcs a parameter and gid is the same on any page. Let's try to fire event with consent before gtm.js - it should help”
Can we send the ‘consent’ arguments before the GTM script is loaded? That should fix our last issue.
Fire consent mode before gtm.start
GTM starts in templates/blocks/google_tag_manager.twig, included at the top of html_header.twig
Consent mode is fired later, included in the bottom of the page, and requires the window.p4bk_vars also declared at the bottom of the page.
This ticket probably requires us to declare window.p4bk_vars at the top of the page.
We could also declare gtag functions at the top and use them in cookies.js, so that we don't duplicate functions.
- has to be done after
-
PLANET-6625 Consent Mode Pilot: doesn't persist when navigation on pages
- CLOSED