Files
web/components/Current/GTMScript.tsx
Linus Flood e29dff1874 Refactor
2024-10-03 15:16:56 +02:00

22 lines
626 B
TypeScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
export default function GTMScript() {
return (
<script
data-cookieconsent="statistics"
dangerouslySetInnerHTML={{
__html: `
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://analytics.scandichotels.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','adobeDataLayer','GTM-KNJCW67W');
`,
}}
async
/>
)
}