Skip to content

Commit ec60b95

Browse files
committed
add new gtag
1 parent aacf27f commit ec60b95

File tree

4 files changed

+11
-40
lines changed

4 files changed

+11
-40
lines changed

src/components/widgets/Footer.astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const { personalIcons = [], theme = 'light' } = Astro.props;
4848
)
4949
}
5050
</div>
51-
<p class="inline-block font-bold text-xs">Last Updated: 2025-05-25</p>
51+
<p class="inline-block font-bold text-xs">Last Updated: 2025-08-29</p>
5252
</div>
5353
</div>
5454
</div>

src/config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const CONFIG = {
2121
timeZone: 'UTC',
2222
}),
2323

24-
googleAnalyticsId: 'G-7YKMWLRCBW', // or false,
24+
googleAnalyticsId: 'G-H5R1XF3HSX', // or false,
2525
googleSiteVerificationId: false, //false Or some value,
2626
};
2727

src/layouts/BaseLayout.astro

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -22,46 +22,17 @@ const { language = 'en', textDirection = 'ltr' } = SITE;
2222
<head>
2323
<meta name="google-site-verification" content="61aW0-deg4Um50lR3I5HKtRQOagsSWFXHzf00Zd-_kY" />
2424
<!-- Google tag (gtag.js) -->
25-
<script async src="https://www.googletagmanager.com/gtag/js?id=G-7YKMWLRCBW"></script>
26-
<script>
27-
window.dataLayer = window.dataLayer || [];
28-
function gtag(){dataLayer.push(arguments);}
29-
gtag('js', new Date());
30-
gtag('config', 'G-7YKMWLRCBW');
31-
</script>
32-
<!-- Hotjar Tracking Code for -->
33-
<script>
34-
(function(h,o,t,j,a,r){
35-
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
36-
h._hjSettings={hjid:3867970,hjsv:6};
37-
a=o.getElementsByTagName('head')[0];
38-
r=o.createElement('script');r.async=1;
39-
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
40-
a.appendChild(r);
41-
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');
42-
</script>
43-
<script type="text/javascript">
44-
(function(window, document, dataLayerName, id) {
45-
function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString();f="; SameSite=Strict"}document.cookie=a+"="+b+d+f+"; path=/"}
46-
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
47-
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
48-
document.write('<script src="https://sofiahag.containers.piwik.pro/'+id+'.sync.js' + qPString + '"></' + 'script>');
49-
})(window, document, 'dataLayer', '2629ff1f-d822-46d5-bb17-5396bef88c7e');
50-
</script>
25+
<script async src="https://www.googletagmanager.com/gtag/js?id=G-H5R1XF3HSX"></script>
26+
<script>
27+
window.dataLayer = window.dataLayer || [];
28+
function gtag(){dataLayer.push(arguments);}
29+
gtag('js', new Date());
30+
gtag('config', 'G-H5R1XF3HSX');
31+
</script>
5132
<MetaTags {...meta} />
5233
</head>
5334

5435
<body class="antialiased text-page bg-white dark:bg-black tracking-tight dark:text-white dark:from-black dark:to-slate-600">
55-
<script async type="text/javascript">
56-
(function(window, document, dataLayerName, id) {
57-
window[dataLayerName]=window[dataLayerName]||[],window[dataLayerName].push({start:(new Date).getTime(),event:"stg.start"});var scripts=document.getElementsByTagName('script')[0],tags=document.createElement('script');
58-
function stgCreateCookie(a,b,c){var d="";if(c){var e=new Date;e.setTime(e.getTime()+24*c*60*60*1e3),d="; expires="+e.toUTCString();f="; SameSite=Strict"}document.cookie=a+"="+b+d+f+"; path=/"}
59-
var isStgDebug=(window.location.href.match("stg_debug")||document.cookie.match("stg_debug"))&&!window.location.href.match("stg_disable_debug");stgCreateCookie("stg_debug",isStgDebug?1:"",isStgDebug?14:-1);
60-
var qP=[];dataLayerName!=="dataLayer"&&qP.push("data_layer_name="+dataLayerName),isStgDebug&&qP.push("stg_debug");var qPString=qP.length>0?("?"+qP.join("&")):"";
61-
tags.async=!0,tags.src="https://sofiahag.containers.piwik.pro/"+id+".js"+qPString,scripts.parentNode.insertBefore(tags,scripts);
62-
!function(a,n,i){a[n]=a[n]||{};for(var c=0;c<i.length;c++)!function(i){a[n][i]=a[n][i]||{},a[n][i].api=a[n][i].api||function(){var a=[].slice.call(arguments,0);"string"==typeof a[0]&&window[dataLayerName].push({event:n+"."+i+":"+a[0],parameters:[].slice.call(arguments,1)})}}(i[c])}(window,"ppms",["tm","cm"]);
63-
})(window, document, 'dataLayer', '2629ff1f-d822-46d5-bb17-5396bef88c7e');
64-
</script>
6536
<slot />
6637
<BasicScripts />
6738
<style is:global>

src/layouts/PageLayout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ const { meta } = Astro.props;
7676
function loadGoogleAnalytics() {
7777
const script = document.createElement('script');
7878
script.async = true;
79-
script.src = "https://www.googletagmanager.com/gtag/js?id=G-7YKMWLRCBW";
79+
script.src = "https://www.googletagmanager.com/gtag/js?id=G-H5R1XF3HSX";
8080
document.head.appendChild(script);
8181

8282
script.onload = function() {
8383
window.dataLayer = window.dataLayer || [];
8484
function gtag() { dataLayer.push(arguments); }
8585
gtag('js', new Date());
86-
gtag('config', 'G-7YKMWLRCBW');
86+
gtag('config', 'G-H5R1XF3HSX');
8787
};
8888
}
8989

0 commit comments

Comments
 (0)