2018-09-10 10:17:56 +08:00
|
|
|
<%= tag.meta id: 'data-ga-universal-analytics', data: {
|
|
|
|
tracking_code: SiteSetting.ga_universal_tracking_code,
|
|
|
|
json: ga_universal_json,
|
|
|
|
auto_link_domains: SiteSetting.ga_universal_auto_link_domains
|
|
|
|
} %>
|
2014-01-26 08:42:25 +08:00
|
|
|
|
2020-11-07 04:15:36 +08:00
|
|
|
<% if SiteSetting.ga_version == "v3_analytics" %>
|
|
|
|
<%= preload_script "google-universal-analytics-v3" %>
|
|
|
|
<% elsif SiteSetting.ga_version == "v4_gtag" %>
|
2024-02-16 19:16:54 +08:00
|
|
|
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= SiteSetting.ga_universal_tracking_code %>" nonce="<%= csp_nonce_placeholder %>"></script>
|
2020-11-07 04:15:36 +08:00
|
|
|
<%= preload_script "google-universal-analytics-v4" %>
|
|
|
|
<% end %>
|