-
Notifications
You must be signed in to change notification settings - Fork 982
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
Update Google Analytics Code #49
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Google is sunsetting Universal Analytics on July 1, 2023: [GA4] Make the switch to Google Analytics 4 - Analytics Help |
The code above is valid for GA4 so would be future-proof. If this isn't updated in the template then it will be required by the dev to override the template to add their own, which sort of defeats the purpose of the template. |
Seems that for now this is the officially supported way if one would like to have Google Analytics version 4 (GA4) for theme slate: https://github.com/shivioua/slate#customizing-google-analytics-code With a bit inspiration from here: |
Yup, it worked for my GH Page, this is the custom header templated that I've added. Hope it will save a bit of time for more people out there. Have fun :) |
I'm not an jekyll expert, but in additon to above comment I've created this PR: #82 I assume that similar PRs should be created for all officially supported github pages themes before this one will be merged in. |
@shivioua Works great! Thanks! |
@shivioua While adding the new client code to _includes/head-custom-google-analytics.html works, Google's process for migrating the account, and setting up the "properties" and "flows" for the new Analytics is entirely incomprehensible to me. Rather than spending an absurd amount of time to learn a wildly overbuilt system (that may or may not act ethically with my users' data) for my extremely modest needs, I've used that same file to integrate with GoatCounter.com, which is simple and works just great for my needs. |
Thanks for sharing @brianary. I've put a brief look both on the GH project of Goat Counter and your implementation, looks like worth investigating. My needs are couple levels less sophisticated as what's offered by GA. Will definately give it a try at some point. @ahwm Looks like this thread can be closed or you'd like to wait for the result of #82? |
Google has upgraded Google Analytics and is recommending using
gtag.js
instead ofanalytics.js
(and sending emails to anyone usinganalytics.js
on their sites).Instead of
Google is now using this:
The text was updated successfully, but these errors were encountered: