middleman-google-analytics
middleman-google-analytics copied to clipboard
Replace analytics.js with gtag.js
Google is now recommending that all new sites adopt the gtag.js script instead of analytics.js.
gtag.js is the web tagging library that works for Google's site measurement, conversion tracking, and remarketing products – giving you better control while making implementation easier. By using gtag.js, you will be able to benefit from the latest dynamic features and integrations as they become available.
The gtag.js script merges the functionality of Google Tag Manager and Google Analytics into one and fixes some cross domain cookie issues, as far as I understand it.
This issue is to request for this extension to use gtag.js instead of analytics.js, or offer an option to enable it.
For details, see:
- https://developers.google.com/analytics/devguides/collection/gtagjs/migration
- https://support.google.com/analytics/answer/7538414
Thank you for your request 💛
If gtag.js
is the new recommended variant, then we should replace analytics.js
.
I would be happy about a PR.
Already done it. https://github.com/danielbayerlein/middleman-google-analytics/pull/33
I think it's too premature to switch from analytics.js because not everyone is convinced about the transition yet. So there were be a period we should probably support both.