Updated Google Analytics code (#123)

GA site tag was updated today, misc.html has been changed to reflect the same.
This commit is contained in:
Mayank Kakodkar 2020-10-03 17:22:39 -05:00 committed by GitHub
parent a734d4a4bc
commit c085a63ca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,15 +6,14 @@ $(function () {$('[data-toggle="tooltip"]').tooltip()})
{% endif %} {% endif %}
{% if site.enable_google_analytics %} {% 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> <script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ window.dataLayer = window.dataLayer || [];
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), function gtag() { dataLayer.push(arguments); }
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) gtag('js', new Date());
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto'); gtag('config', '{{ site.google_analytics }}');
ga('send', 'pageview');
</script> </script>
{% endif %} {% endif %}