Skip to content

Commit

Permalink
feat: add gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
felipefialho committed Oct 19, 2023
1 parent 1b87670 commit 2630ae5
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@

doctype html
html(lang='en')
head
head
<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-TZDLZX82');</script>
title #{data.title} - #{data.description}
meta(charset='utf-8')
meta(name='description' content=data.description)
Expand All @@ -27,17 +32,13 @@ html(lang='en')
meta(name='viewport' content='width=device-width, initial-scale=1, maximum-scale=5')
meta(name='theme-color' content=data.theme_color)
link(rel='shortcut icon' type='image/favicon' href='favicon.ico')
script(async src='https://www.googletagmanager.com/gtag/js?id=' + data.ga)
script.
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '#{data.ga}');
style.
body {
visibility: hidden;
}
body
body
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TZDLZX82"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
section.header
.piano
.piano-key
Expand Down

0 comments on commit 2630ae5

Please sign in to comment.