Skip to content

Commit

Permalink
installing google tag manager script
Browse files Browse the repository at this point in the history
  • Loading branch information
tchisama committed Sep 18, 2023
1 parent 37e5f3a commit 38b755c
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,22 @@

<link rel="icon" type="image/png" href="/src/assets/imags/logo.jpeg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<!-- Google Tag Manager -->
<script src="/scripts/gtm.js"></script>
<!-- End Google Tag Manager -->

<title>Cactusia: Your Mini Cactus Oasis</title>
</head>
<body class="background-market">
<script src="https://cdn.lordicon.com/bhenfmcm.js"></script>

<!-- Google Tag Manager (noscript) -->
<noscript>
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WR7WKSJF" height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->

<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
Expand Down
8 changes: 8 additions & 0 deletions public/scripts/gtm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
(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-WR7WKSJF')

0 comments on commit 38b755c

Please sign in to comment.