-
Notifications
You must be signed in to change notification settings - Fork 573
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
support for new Google Analytics #26
Comments
In #30, we are introducing a new include for custom headers. I'd propose that we put this old code there (for backwards compatibility) and then allow folks who want to use v4 to put that custom data into a custom include for Google Analytics. |
To be clearer:
|
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. |
Thank you! It would be great if you could add some information to the main page. I installed GA4, and only then realized that I need the other tracking number. |
I tried to enable Google Analytics using the proper parameter (google_analytics) in _config.yml and the intended code is actually injected in the page, but apparently it is valid only for old Analytics tracking IDs (UA-xxxxxxx). New measurement IDs (G-xxxxxxxx) seems to need a different script code.
I modified _default.html removing current code and I added new code just after HEAD tag as per Google Analytics documentation ( https://developers.google.com/analytics/devguides/collection/gtagjs ). After a few try it seems working now.
It is still compatible with the "google_analytics" parameter in _config.yml, the difference is just in the script code. But in a more general approach probably a dedicated parameter would be better, to have both scripts in the layout.
The text was updated successfully, but these errors were encountered: