Skip to content

Commit 70ca6dd

Browse files
committed
Google Tag update
+utm_source detection
1 parent 2110b63 commit 70ca6dd

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

index.html

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
<!DOCTYPE html>
22
<html lang="en">
33
<head>
4+
5+
<!-- Google tag (gtag.js) -->
6+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9FWQFZME3Z"></script>
7+
<script>
8+
window.dataLayer = window.dataLayer || [];
9+
function gtag(){dataLayer.push(arguments);}
10+
gtag('js', new Date());
11+
12+
gtag('config', 'G-9FWQFZME3Z');
13+
</script>
14+
415
<script id="Cookiebot" src="https://consent.cookiebot.com/uc.js" data-cbid="06e4a97f-2c34-41ed-8ab6-d53b581ff080" type="text/javascript" async></script>
516
<meta charset="UTF-8" />
617
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
@@ -17,6 +28,22 @@ <h2>🎉 Happy New Year 2026!</h2>
1728
</p>
1829
</div>
1930

31+
<!-- UTM SOURCE DETECT SCRIPT -->
32+
<script>
33+
const params = new URLSearchParams(window.location.search);
34+
35+
const utmSource = params.get('utm_source');
36+
const utmMedium = params.get('utm_medium');
37+
const utmCampaign = params.get('utm_campaign');
38+
39+
if (utmSource) {
40+
console.log('UTM Source:', utmSource);
41+
}
42+
</script>
43+
<script>
44+
document.cookie = `utm_source=${utmSource}; path=/; max-age=2592000`; // 30 days
45+
</script>
46+
<!-- SCRIPT END-->
2047
<script src="https://cdn.logwork.com/widget/countdown.js"></script>
2148
<a href="https://logwork.com/countdown-timer" class="countdown-timer" data-timezone="Europe/Athens" data-textcolor="#ffffff" data-date="2026-03-28 00:00" data-background="#19336e" data-digitscolor="#ffffff" data-unitscolor="#ffffff">Days until anniversary</a>
2249

@@ -40,13 +67,6 @@ <h2>🎉 Happy New Year 2026!</h2>
4067

4168
</head>
4269

43-
<!-- Google tag -->
44-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9FWQFZME3Z"></script>
45-
<script>
46-
window.dataLayer = window.dataLayer || [];
47-
function gtag(){dataLayer.push(arguments);}
48-
gtag('js', new Date());
49-
gtag('config', 'G-9FWQFZME3Z');
5070
</script>
5171

5272
<body>

0 commit comments

Comments
 (0)