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

Adding support for Google Analytics v4 (GA4) properties #788

Merged
merged 6 commits into from Nov 8, 2023

Conversation

blast-hardcheese
Copy link
Contributor

Google seems to be pushing people to "Migrate from UA to GA4", including (seemingly) deprecating some levels of support for the legacy properties.

To get ahead of this, I propose adding the new tag structure in, alongside the current UA- collector, as guidance in the migration notes includes:

If your website is manually tagged with analytics.js, don't remove the old analytics.js tag when you add the Google tag (above). The analytics.js tag will continue to collect data for your UA property. The Google tag (gtag.js) that you're adding will collect data for your new GA4 property.

There are import guides for converting your UA data over to GA4, so I think this is to avoid gaps in analytics.

Thank you for creating and maintaining sbt-microsites!

The advice from [Google's Migration Page](https://support.google.com/analytics/answer/13486733) states:

    To establish a connection between your website and Google Analytics,
    copy and paste the entire Google tag in the code of every page of your
    website, **immediately after** the <head> element.

and considering that **immediately after** is bold, I'm inclined to
comply even though I strongly suspect it should not matter.
@blast-hardcheese
Copy link
Contributor Author

Force-push was because I neglected to supply the arbitrary instance in tests

@juanpedromoreno juanpedromoreno added the enhancement New feature or request label Nov 7, 2023
@juanpedromoreno
Copy link
Member

Thanks for your time, @blast-hardcheese !

@juanpedromoreno juanpedromoreno merged commit b792b8d into 47degrees:main Nov 8, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants