Skip to content

Commit

Permalink
GTM + GA4
Browse files Browse the repository at this point in the history
  • Loading branch information
blancometrics committed May 3, 2024
1 parent cebc405 commit 051f136
Showing 1 changed file with 32 additions and 4 deletions.
36 changes: 32 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,37 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Github - Google Analytics 4 - Learning /title </title>

<!-- 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-W4JBVXZ4');
</script>
<!-- End Google Tag Manager -->

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-KEQ1423EH1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
window.dataLayer = window.dataLayer || [];

function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'G-KEQ1423EH1');
gtag('config', 'G-KEQ1423EH1');
</script>
</head>

Expand Down Expand Up @@ -40,6 +63,11 @@ <h1>Aprendiendo V8</h1>
<h2></h2>

<script src="script.js"></script>

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

</html>

0 comments on commit 051f136

Please sign in to comment.