so-simple-theme
so-simple-theme copied to clipboard
Google analytics now has two different styles of tracking codes that require different javascript.
Google analytics now has two different kinds of tracking ids. The old Universal Analytics style starts with "UA-" and works properly with what's already checked in. The new Google Analytics 4 style starts with "G-" and requires the new Javascript below.
Note that I was going to submit a pull request but couldn't figure out why the analytics code was in two different places and what the interactions were. It's in both scripts.html and google-analytics.html
This issue has been automatically marked as stale because it has not had recent activity.
If this is a bug and you can still reproduce this error on the master
branch, please reply with any additional information you have about it in order to keep the issue open.
If this is a feature request, please add as an Idea under discussions and elaborate on why it is core to this project and why you feel more than 80% of users would find it beneficial.
This issue will automatically be closed in 7 days if no further activity occurs. Thank you for all your contributions.
From reading the code, I believe the google-analytics.html
include is currently completely unused. It was probably meant to be used in scripts.html
.
So I think a PR fixing that (including google-analytics.html
in scripts.html
) and then upgrading google-analytics.html
would be ideal :+1: .
I've submitted a PR to address this one. https://github.com/mmistakes/so-simple-theme/pull/429
Hi, any chance @mikebowler's PR could be merged?
Is there any other workaround?
I'm also interested in seeing this get merged.
Thank you so much @mikebowler, I've applied this manually to my site, I couldn't figure out why my update in google-analytics.html wasn't working.