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 1870959
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

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');
title #{data.title} - #{data.description}
meta(charset='utf-8')
meta(name='description' content=data.description)
Expand All @@ -27,17 +33,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')
section.header
.piano
.piano-key
Expand Down

0 comments on commit 1870959

Please sign in to comment.