Next JS GTM

/* eslint-disable linebreak-style */
// import { Inter } from 'next/font/google'
import LayoutChat from "@/Components/Layout/LayoutChat";
import { GoogleAnalytics } from "@next/third-parties/google";
import "./globals.css";
import NavBar from "@/Components/NavBar/NavBar";
import Provider from "./provider";

// const inter = Inter({ subsets: ['latin'] })

export const metadata = {
	title: "Create Next App",
	description: "Generated by create next app",
};

export default function RootLayout({ children }) {
	return (
		<html lang="en">
			<body>
				<Provider>
					<LayoutChat>
						<NavBar/>
						{children}
					</LayoutChat>
				</Provider>
				<GoogleAnalytics gaId="GTM-K3GRZ8PJ" />
			</body>
		</html>
	);
}



If error

Cannot find module '@next/third-parties/google' when trying to import GoogleTagManager

npm i @next/[email protected]

Last updated