I use GoogleAnalytics
imported from @next/third-parties/google
to include a GA4 property in my Next.js 14.2
webapp.
Unfortunately <GoogleAnalytics gaId="G-MY-ID" />
does not accept a debug_mode parameter and DebugView
is not enabled by default. How do I enable the DebugView in this setup?
This is the default setup that I'm using aswell:
import { GoogleAnalytics } from '@next/third-parties/google'
export default function RootLayout({ children }) {
return (
<html lang="en">
<body>{children}</body>
<GoogleAnalytics gaId="G-XYZ" />
</html>
)
}