mirror of
https://github.com/thangisme/notes.git
synced 2024-11-20 07:55:54 -05:00
Merge pull request #162 from nergmada/google-analytics-patch
Modified the google analytics code to match the new tags used by GA
This commit is contained in:
commit
efbc5c2a19
@ -15,12 +15,15 @@
|
||||
<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>
|
||||
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');
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
|
||||
gtag('config', "{{site.ga_tracking}}");
|
||||
</script>
|
||||
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if site.search_enabled != nil %}
|
||||
|
Loading…
Reference in New Issue
Block a user