Skip to content

Commit

Permalink
feat: make Google Analytics scripts loads on the end
Browse files Browse the repository at this point in the history
  • Loading branch information
nashiradeer committed Dec 23, 2024
1 parent 54a7e95 commit f51d112
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,32 @@
<!-- Set the default consent for Google Analytics -->
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
function gtag() {
dataLayer.push(arguments);
}

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

gtag('config', 'G-VBMMNEN7F7');
</script>
</head>
<body data-sveltekit-preload-data="hover">
<div style="display: contents">%sveltekit.body%</div>
</body>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-VBMMNEN7F7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());

gtag('config', 'G-VBMMNEN7F7');
</script>
<!--Secular One font-->
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
Expand Down

0 comments on commit f51d112

Please sign in to comment.