We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, how do I used react-ga4 in NextJS V15 especially with the App Router? Is it sufficient to put
import ReactGA from 'react-ga4'; (...) const TRACKING_ID = "G-R85LV3LZ4X"; ReactGA.initialize(TRACKING_ID);
into the page.tsx and it will track all other routes as well?
The text was updated successfully, but these errors were encountered:
Haven't tested this with v15 yet but at least in this post it's said to work right out of the box: https://medium.com/@vergil333/google-analytics-4-in-react-a250005c2455
Sorry, something went wrong.
Next.js has native support for Google Analytics: https://nextjs.org/docs/app/building-your-application/optimizing/third-party-libraries#google-analytics
No branches or pull requests
Hello, how do I used react-ga4 in NextJS V15 especially with the App Router?
Is it sufficient to put
import ReactGA from 'react-ga4'; (...) const TRACKING_ID = "G-R85LV3LZ4X"; ReactGA.initialize(TRACKING_ID);
into the page.tsx and it will track all other routes as well?
The text was updated successfully, but these errors were encountered: