Skip to content

Commit

Permalink
feat: add gtm
Browse files Browse the repository at this point in the history
  • Loading branch information
martyanovandrey committed Apr 19, 2024
1 parent ccb6efa commit 777f256
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/index.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ function generateHTML({env, jspath, csspath} = {}) {
<!doctype html>
<html lang="en">
<head>
<!-- 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-D84DCCD2');</script>
<!-- End Google Tag Manager -->
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width,initial-scale=1"/>
<title>playground</title>${
Expand All @@ -31,6 +38,10 @@ function generateHTML({env, jspath, csspath} = {}) {
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-D84DCCD2"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div id="app" class="app"></div>
<script src="${jspath}"></script>
</body>
Expand Down

0 comments on commit 777f256

Please sign in to comment.