From aee6d1fb8c3886428762acd78d7b460ea947dbc8 Mon Sep 17 00:00:00 2001 From: Patrick Marsceill <patrick.marsceill@gmail.com> Date: Sat, 2 Feb 2019 13:59:41 -0800 Subject: [PATCH] Use analytics.js instead of tag manager --- _includes/head.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/_includes/head.html b/_includes/head.html index ac0fc674..fa5dee7c 100644 --- a/_includes/head.html +++ b/_includes/head.html @@ -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 %} -- GitLab