diff --git a/_config.yml b/_config.yml index 5bc2a4f038..03f438833c 100644 --- a/_config.yml +++ b/_config.yml @@ -107,6 +107,9 @@ JB : site_id : 'SITE ID' google : tracking_id : 'UA-123-12' + googleUA : + tracking_id : 'UA-123-12' + property_name : 'auto' getclicky : site_id : mixpanel : diff --git a/_includes/JB/analytics b/_includes/JB/analytics index 2bb4c80281..76c1889ae2 100644 --- a/_includes/JB/analytics +++ b/_includes/JB/analytics @@ -7,6 +7,8 @@ {% include JB/analytics-providers/gauges %} {% when "google" %} {% include JB/analytics-providers/google %} +{% when "googleUA" %} + {% include JB/analytics-providers/google-universal %} {% when "getclicky" %} {% include JB/analytics-providers/getclicky %} {% when "mixpanel" %} diff --git a/_includes/JB/analytics-providers/google-universal b/_includes/JB/analytics-providers/google-universal index 834f2eec65..8d04eae06f 100644 --- a/_includes/JB/analytics-providers/google-universal +++ b/_includes/JB/analytics-providers/google-universal @@ -4,6 +4,6 @@ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); - ga('create', {{ site.JB.analytics.googleUA.tracking_id }}', {% if site.JB.analytics.googleUA.property_name %}{{ site.JB.analytics.googleUA.property_name }}{% else %}'auto'{% endif %}); + ga('create', {{ site.JB.analytics.googleUA.tracking_id }}', {% if site.JB.analytics.googleUA.property_name %}'{{ site.JB.analytics.googleUA.property_name }}'{% else %}'auto'{% endif %}); ga('send', 'pageview'); \ No newline at end of file