Skip to content

Commit 3d110b6

Browse files
author
KHOUBZA Younes
committed
google tag manager
1 parent 2fb1f4b commit 3d110b6

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{% unless site.data.dev.dev_mode %}
2+
<!-- Google Tag Manager (noscript) -->
3+
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5N8JQTF"
4+
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
5+
<!-- End Google Tag Manager (noscript) -->
6+
{% endunless %}

_includes/head.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,12 @@
5050
gtag('js', new Date());
5151
gtag('config', 'G-T4D78SM7TC');
5252
</script>
53+
54+
<!-- Google Tag Manager -->
55+
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
56+
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
57+
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
58+
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
59+
})(window,document,'script','dataLayer','GTM-5N8JQTF');</script>
60+
<!-- End Google Tag Manager -->
5361
{% endunless %}

_layouts/homepage.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{% include head.html %}
55
</head>
66
<body class="bg-gray-100 min-h-screen bg-squared leading-tight leader overflow-x-hidden">
7+
{% include google-tag-manager-no-script.html %}
78
{% include size-helper.html %}
89

910
<header class="container mx-auto flex flex-col items-center text-center">

_layouts/main.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
{% include head.html %}
55
</head>
66
<body class="min-h-screen min-w-full leading-normal bg-gray-50 overflow-x-hidden">
7+
{% include google-tag-manager-no-script.html %}
8+
{% include size-helper.html %}
9+
710
<div class="h-16 z-10 top-0 w-screen bg-white border-b border-indigo-200 shadow">
811
<div id="header-logo" class="px-4 py-2">
912
<div class="flex items-center flex-no-shrink pt-1">

0 commit comments

Comments
 (0)