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

Migrate to GA4 (Google Analytics) #109

Merged
merged 2 commits into from
Jul 11, 2023
Merged

Migrate to GA4 (Google Analytics) #109

merged 2 commits into from
Jul 11, 2023

Conversation

rmseifried
Copy link
Member

@rmseifried rmseifried commented Jul 11, 2023

Replacing the previous GA code (UA-XXXXXXXX-X) with the GA4 code (G-XXXXXXXXXX) in the .env settings did not properly link the site to Google Analytics.

Jim Lacy at UWisconsin shared this code, which he came up with to migrate GeoData@Wisconsin to GA4: https://github.com/WIStCart/GeoData/commit/b95385bc7034a6a5c22d9b521e440043e5788ef2.

Key files changed:

  • app/views/layouts/blacklight/base.html.erb
  • app/views/shared/_analytics.html.erb

Jim reported that the previous analytics file (app/assets/javascripts/analytics.js) is no longer being used. This contains the old Big Ten analytics code that collects custom events.

@rmseifried rmseifried merged commit a16bcfb into main Jul 11, 2023
@rmseifried rmseifried deleted the ga4 branch July 11, 2023 15:40
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.

None yet

1 participant