Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GA4 init code #2868

Merged
merged 1 commit into from
Sep 13, 2022
Merged

Use GA4 init code #2868

merged 1 commit into from
Sep 13, 2022

Conversation

andysellick
Copy link
Contributor

@andysellick andysellick commented Sep 8, 2022

What

  • runs the new GA4 init code, which starts the analytics code only after cookie consent
  • note that this will not run anywhere but integration because the code it refers to is only included on integration

This will depend on a new version of the components gem that includes alphagov/govuk_publishing_components#2915, until then this will silently do nothing. See that PR for details of how this works.

Why

Part of the process to move away from using the GTM component and integrating all of the new analytics code properly into the cookie consent mechanism.

Visual changes

None.

Trello card: https://trello.com/c/vrMj18et/353-integrate-gtm-with-cookie-consent-mechanism

JamesCGDS
JamesCGDS previously approved these changes Sep 9, 2022
Copy link
Contributor

@JamesCGDS JamesCGDS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good 👍

@JamesCGDS JamesCGDS dismissed their stale review September 9, 2022 13:29

Additional changes are being made beyond what was originally reviewed

- runs the new GA4 init code, which starts the analytics code only after cookie consent
- note that this will not run anywhere but integration because the code it refers to is only included on integration
- remove test that checked for the existing of the Google Tag Manager component, as we're not using it anymore
Copy link
Contributor

@AshGDS AshGDS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good 👍

@andysellick andysellick merged commit 6311480 into main Sep 13, 2022
@andysellick andysellick deleted the ga4-consent branch September 13, 2022 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants