1
0
mirror of https://github.com/thangisme/notes.git synced 2024-12-21 10:56:31 -05:00

Use analytics.js instead of tag manager

This commit is contained in:
Patrick Marsceill 2019-02-02 13:59:41 -08:00
parent f5d6cf6222
commit aee6d1fb8c
No known key found for this signature in database
GPG Key ID: 286B93882D828F40

View File

@ -9,15 +9,12 @@
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
{% if site.ga_tracking != nil %}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-2709176-10"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.ga_tracking }}');
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ site.ga_tracking }}', '{{ site.url }}');
ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
{% endif %}
{% if site.search_enabled != nil %}