discourse/app/views/common/_google_universal_analytics...

13 lines
552 B
Plaintext

<%= 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
} %>
<% if SiteSetting.ga_version == "v3_analytics" %>
<%= preload_script "google-universal-analytics-v3" %>
<% elsif SiteSetting.ga_version == "v4_gtag" %>
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= SiteSetting.ga_universal_tracking_code %>"></script>
<%= preload_script "google-universal-analytics-v4" %>
<% end %>