|
|
@@ -6,7 +6,7 @@ import { getClientConfig } from "./config/client";
|
|
|
import { type Metadata } from "next";
|
|
|
import { SpeedInsights } from "@vercel/speed-insights/next";
|
|
|
import { getServerSideConfig } from "./config/server";
|
|
|
-
|
|
|
+import { GoogleTagManager } from "@next/third-parties/google";
|
|
|
const serverConfig = getServerSideConfig();
|
|
|
|
|
|
export const metadata: Metadata = {
|
|
|
@@ -46,6 +46,11 @@ export default function RootLayout({
|
|
|
<SpeedInsights />
|
|
|
</>
|
|
|
)}
|
|
|
+ {serverConfig?.gtmId && (
|
|
|
+ <>
|
|
|
+ <GoogleTagManager gtmId={serverConfig.gtmId} />
|
|
|
+ </>
|
|
|
+ )}
|
|
|
</body>
|
|
|
</html>
|
|
|
);
|