fix: track user on page load

This commit is contained in:
Christel Westerberg
2024-07-15 09:13:20 +02:00
parent edb6005a72
commit c96008fb78
18 changed files with 247 additions and 122 deletions

View File

@@ -1,8 +1,11 @@
import "@/app/globals.css"
import "@scandic-hotels/design-system/style.css"
import Script from "next/script"
import TrpcProvider from "@/lib/trpc/Provider"
import AdobeSDKScript from "@/components/Current/AdobeSDKScript"
import { getIntl } from "@/i18n"
import ServerIntlProvider from "@/i18n/Provider"
@@ -23,6 +26,12 @@ export default async function RootLayout({
const { defaultLocale, locale, messages } = await getIntl()
return (
<html lang={params.lang}>
<head>
<AdobeSDKScript />
<Script id="ensure-adobeDataLayer">{`
window.adobeDataLayer = window.adobeDataLayer || []
`}</Script>
</head>
<body className={styles.layout}>
<ServerIntlProvider intl={{ defaultLocale, locale, messages }}>
<TrpcProvider lang={params.lang}>{children}</TrpcProvider>