Skip to content

Commit

Permalink
Updated Google Analytics code (#123)
Browse files Browse the repository at this point in the history
GA site tag was updated today, misc.html has been changed to reflect the same.
  • Loading branch information
kakodkar authored Oct 3, 2020
1 parent a734d4a commit c085a63
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions _includes/scripts/misc.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,14 @@
{% endif %}

{% if site.enable_google_analytics %}
<!-- Google Analytics -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
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');
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());

ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
gtag('config', '{{ site.google_analytics }}');
</script>
{% endif %}

Expand Down

0 comments on commit c085a63

Please sign in to comment.