Filter out localhost analytics

This commit is contained in:
Marcus Noble 2018-02-04 14:22:15 +00:00
parent 599a5872b4
commit f771bb4960
1 changed files with 6 additions and 4 deletions

View File

@ -44,9 +44,11 @@
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-321884-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-321884-1');
if (window.location.host.indexOf('marcusnoble.co.uk') >= 0) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-321884-1');
}
</script>
</head>