Skip to content

Migration to GA4 - 3863#4904

Merged
roslynwythe merged 11 commits intohackforla:gh-pagesfrom
t-will-gillis:migration-to-GA4-3863
Aug 16, 2023
Merged

Migration to GA4 - 3863#4904
roslynwythe merged 11 commits intohackforla:gh-pagesfrom
t-will-gillis:migration-to-GA4-3863

Conversation

@t-will-gillis
Copy link
Member

@t-will-gillis t-will-gillis commented Jul 1, 2023

Fixes #3863

NOTE: To be reviewed only by Product Manager.

As of 9 pm on 6/30/23, by creating the new GA4 property and linking it to the UA, plus the goal conversions, it appears that the website is already connecting to GA4 without making the suggested changes. Assuming that the data keeps flowing correctly, we may not want to make the proposed changes.

Migration_015

What changes did you make?

  • Goals in UA were automatically converted to GA4
  • The position of the Google tag (gtag.js) property has been placed above Google Tag Manager as recommended by Google.
  • The Google tag (gtag.js) has been identified and reformatted for easier reading.
  • A new GA4 property has been setup for the HfLA website. Because this new GA4 property is tied to the previous UA property, we can continue using the previous property.
  • The Google Tag Manager has not been changed- Google indicates that if Google Tag Manager is already setup it can continue to be used without changes.

Why did you make the changes (we will use this info to test)?

  • Google has discontinued Universal Analytics (UA), now using Google Analytics 4 (GA4)

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

No visual changes to website.

Post migration, will need to monitor Google Analytics to confirm data is being collected as previously.
Data should be available until the end of the year, but will save remaining data.

Final switches locations so Google tag precedes Google tag manager, and both UA and GA4 tags are retained.
Final retains UA and adds GA4 tags
- Places Google tag before Google Tag Manager
- Adds comments identifying the gtag
- Add new GA4 gtag config after UA config
Adds new GA4 config after existing UA config
@github-actions
Copy link

github-actions bot commented Jul 1, 2023

Want to review this pull request? Take a look at this documentation for a step by step guide!

From your project repository, check out a new branch and test the changes.

git checkout -b t-will-gillis-migration-to-GA4-3863 gh-pages
git pull https://github.com/t-will-gillis/website.git migration-to-GA4-3863

@github-actions github-actions bot added Complexity: Large Feature: Analytics google analytics time sensitive Needs to be worked on by a particular timeframe size: 3pt Can be done in 13-18 hours role: dev leads Tasks for technical leads labels Jul 1, 2023
Revised to switch order of 'Google Site Tag' and 'Google Tag Manager' - no other changes
This changes adds comments to highlight 'Google Site Tag', and reformats for readability- no changes otherwise
@ExperimentsInHonesty
Copy link
Member

@t-will-gillis so are you suggesting we don't merge this PR and close it? Or do you want to wait longer before deciding?

added closing </script> line 3
removed trailing whitespaces at gtag
@t-will-gillis
Copy link
Member Author

t-will-gillis commented Jul 12, 2023

@ExperimentsInHonesty I believe we should merge this PR. The main change is to switch the locations of the "gtag.js" and "Google Tag Manager" in _includes/head.html so that "gtag" appears first.

  • The only argument to do this is because one of the Google documents mentions that this should be done.
  • The counter-argument not to do this is that everything appears to be working without making this change.
  • _layouts/redirect.html already is configured in this way.

The other, minor changes are adding comments and reformatting the code snippets for easier reading.

@roslynwythe roslynwythe self-requested a review July 25, 2023 00:09
@roslynwythe
Copy link
Member

Hi @t-will-gillis I apologize for the delay. My only request is that under "What changes did you make?", could you edit the 4th bullet point, about adding the GA4 property in config, since that change was not in the final commit?

@t-will-gillis
Copy link
Member Author

Hi @roslynwythe - thanks for the comments! I edited the 4th bullet point as you suggested.

Copy link
Member

@roslynwythe roslynwythe left a comment

Choose a reason for hiding this comment

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

Thank you @t-will-gillis for your research and documentation re: the GA4 migration, and updates to the head and redirect pages. All of us at Hack for LA learn so much from your contributions.

@roslynwythe roslynwythe merged commit 1433ebd into hackforla:gh-pages Aug 16, 2023
@t-will-gillis t-will-gillis deleted the migration-to-GA4-3863 branch August 21, 2023 03:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complexity: Large Feature: Analytics google analytics role: dev leads Tasks for technical leads size: 3pt Can be done in 13-18 hours time sensitive Needs to be worked on by a particular timeframe

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migration to Google Analytics 4

4 participants