Merge pull request #155 from hallowf/update-analytics-to-gtag

Replaced old script for analytics with gtag
This commit is contained in:
Patrick Marsceill 2019-08-13 11:12:35 -04:00 committed by GitHub
commit 4f5930dbbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -15,13 +15,13 @@
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
{% if site.ga_tracking != nil %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{site.ga_tracking}}"></script>
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.ga_tracking }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', "{{site.ga_tracking}}");
gtag('config', "{{ site.ga_tracking }}");
</script>
{% endif %}
@ -33,5 +33,5 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
{% seo %}
{% seo %}
</head>