Remove partytown
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m32s
All checks were successful
Docker Deploy / build-and-push (push) Successful in 3m32s
This commit is contained in:
@@ -66,14 +66,22 @@ const isProd = import.meta.env.PROD;
|
||||
<title>{metaTitle}</title>
|
||||
{
|
||||
isProd && (
|
||||
<script
|
||||
is:inline
|
||||
type="text/partytown"
|
||||
defer
|
||||
src="https://analytics.atri.dad/script.js"
|
||||
data-website-id="c7e24af4-5f14-4881-9c25-85a97abda9f1"
|
||||
data-astro-rerun
|
||||
/>
|
||||
<script>
|
||||
(function() {
|
||||
function loadAnalytics() {
|
||||
var script = document.createElement('script');
|
||||
script.src = "https://analytics.atri.dad/script.js";
|
||||
script.defer = true;
|
||||
script.setAttribute('data-website-id', 'c7e24af4-5f14-4881-9c25-85a97abda9f1');
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
if ('requestIdleCallback' in window) {
|
||||
requestIdleCallback(loadAnalytics, { timeout: 2000 });
|
||||
} else {
|
||||
setTimeout(loadAnalytics, 2000);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
)
|
||||
}
|
||||
</head>
|
||||
|
||||
Reference in New Issue
Block a user