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:
@@ -74,7 +74,7 @@ describe ContentSecurityPolicy do
|
||||
SiteSetting.gtm_container_id = 'GTM-ABCDEF'
|
||||
|
||||
script_srcs = parse(policy)['script-src']
|
||||
expect(script_srcs).to include('https://www.google-analytics.com/analytics.js')
|
||||
expect(script_srcs).to include('https://www.googletagmanager.com/gtag/js')
|
||||
expect(script_srcs).to include('https://www.googletagmanager.com/gtm.js')
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user