Add google analytics

This commit is contained in:
Chris Dill 2021-02-06 23:51:36 +00:00
parent c591ea7568
commit 412e01b0e3

View File

@ -25,6 +25,19 @@
<!-- This contains the contents of the <svelte:head> component, if
the current page has one -->
%sapper.head%
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-120787474-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-120787474-1', {
'anonymize_ip': true,
cookie_domain: '{{ site.title }}',
cookie_flags: 'SameSite=None;Secure'
});
</script>
</head>
<body>
<!-- The application will be rendered inside this element,