mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-04-16 08:02:24 -06:00
Merge pull request #155 from hallowf/update-analytics-to-gtag
Replaced old script for analytics with gtag
This commit is contained in:
commit
4f5930dbbe
@ -15,13 +15,13 @@
|
|||||||
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
|
<link rel="stylesheet" href="{{ "/assets/css/just-the-docs.css" | absolute_url }}">
|
||||||
|
|
||||||
{% if site.ga_tracking != nil %}
|
{% 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>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag(){dataLayer.push(arguments);}
|
function gtag(){dataLayer.push(arguments);}
|
||||||
gtag('js', new Date());
|
gtag('js', new Date());
|
||||||
|
|
||||||
gtag('config', "{{site.ga_tracking}}");
|
gtag('config', "{{ site.ga_tracking }}");
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -33,5 +33,5 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
{% seo %}
|
{% seo %}
|
||||||
</head>
|
</head>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user