Add more analytics
This commit is contained in:
parent
49e754ace1
commit
e32521fb5e
5 changed files with 22 additions and 0 deletions
|
@ -36,6 +36,7 @@ analytics:
|
|||
provider: google-universal
|
||||
google:
|
||||
tracking_id: UA-83783540-1
|
||||
gtm: GTM-55MC869
|
||||
|
||||
# Site Author
|
||||
author:
|
||||
|
|
1
_dev.yml
1
_dev.yml
|
@ -2,3 +2,4 @@
|
|||
url: http://localhost:4000
|
||||
analytics:
|
||||
provider: false
|
||||
gtm: false
|
||||
|
|
6
_includes/body.html
Normal file
6
_includes/body.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% if site.gtm %}
|
||||
<!-- Google Tag Manager (noscript) -->
|
||||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ site.gtm }}"
|
||||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
|
||||
<!-- End Google Tag Manager (noscript) -->
|
||||
{% endif %}
|
13
_includes/head/custom.html
Normal file
13
_includes/head/custom.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!-- start custom head snippets -->
|
||||
|
||||
{% if site.gtm %}
|
||||
<!-- Google Tag Manager -->
|
||||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
||||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
||||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
||||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
|
||||
})(window,document,'script','dataLayer','{{ site.gtm }}');</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
{% endif %}
|
||||
|
||||
<!-- end custom head snippets -->
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
<body class="layout--{{ page.layout | default: layout.layout }}{% if page.classes or layout.classes %}{{ page.classes | default: layout.classes | join: ' ' | prepend: ' ' }}{% endif %}">
|
||||
|
||||
{% include body.html %}
|
||||
{% include_cached browser-upgrade.html %}
|
||||
{% include_cached masthead.html %}
|
||||
|
||||
|
|
Loading…
Reference in a new issue