mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: Upgrade analytics.js to gtag.js (#10893)
Per Google, sites are encouraged to upgrade from `analytics.js` to `gtag.js` for Google Analytics tracking. This commit updates core Discourse to use the new `gtag.js` API Google is asking sites to use. This API has feature parity with `analytics.js` but does not use trackers.
This commit is contained in:
@@ -4,4 +4,6 @@
|
||||
auto_link_domains: SiteSetting.ga_universal_auto_link_domains
|
||||
} %>
|
||||
|
||||
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= SiteSetting.ga_universal_tracking_code %>"></script>
|
||||
|
||||
<%= preload_script "google-universal-analytics" %>
|
||||
|
||||
Reference in New Issue
Block a user