Skip to content

Commit

Permalink
Merge pull request #30 from autumnfound/malowe/main/20
Browse files Browse the repository at this point in the history
Add hardcoded GTM call to head partial
  • Loading branch information
kito99 authored Mar 18, 2024
2 parents 3e93335 + c16a997 commit acd6939
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/partials/head-scripts.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{{#with site.keys.googleAnalytics}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{this}}"></script>
<script>function gtag(){dataLayer.push(arguments)};window.dataLayer=window.dataLayer||[];gtag('js',new Date());gtag('config','{{this}}')</script>
{{/with}}
<!-- 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','GTM-5WLCZXC');</script>
<!-- End Google Tag Manager -->
<script>var uiRootPath = '{{{uiRootPath}}}'</script>
<script>!function (theme) {
if (theme === 'dark') document.documentElement.classList.add('theme-dark')
Expand Down

0 comments on commit acd6939

Please sign in to comment.