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
Add Google Tag Manager code snippet to the frontend docs
We should be ok to merge these changes as the Google Tag Manager code relies on consent being given for analytics cookies, which a user can't do if we add this before we add the cookie banner.
Why
We need to add the Google Tag Manager code to the frontend docs so we can use analytics to track pageviews and events.
Who needs to know about this
Developers; Performance Analyst
Done when
Talk to Sara about what code needs to be added (get the ID)
Google Tag Manager code should only be loaded when consent has been given for analytics cookies
Load GTM and trigger a pageview event as soon as analytics cookies have been accepted - don't wait for the next pageview
Tests for the above functionality
The text was updated successfully, but these errors were encountered:
We've now moved the design system website to GA4 as part of alphagov/govuk-design-system#3822. From this, I'm not confident about this comment:
We should be ok to merge these changes as the Google Tag Manager code relies on consent being given for analytics cookies, which a user can't do if we add this before we add the cookie banner.
...because some of the GA4 cookies are now appearing on the frontend docs website. I think this is to do with how the domain for the GA4 cookies are being set aka .design-system.service.gov.uk as opposed to design-system.service.gov.uk; note the dot.
Currently this cookie isn't collecting any analytics data because we haven't got the analytics script on the frontend docs yet. This may also be fine as we don't currently have any data collection present via Google Tag Manager specific to the frontend docs. It's worth double checking that this is still the case, otherwise this will need to be done in tandem with #118
Similar to alphagov/govuk-design-system#1616
What
Add Google Tag Manager code snippet to the frontend docs
We should be ok to merge these changes as the Google Tag Manager code relies on consent being given for analytics cookies, which a user can't do if we add this before we add the cookie banner.
Why
We need to add the Google Tag Manager code to the frontend docs so we can use analytics to track pageviews and events.
Who needs to know about this
Developers; Performance Analyst
Done when
The text was updated successfully, but these errors were encountered: