-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
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
NextJs 13 & app router #99
Comments
any update? |
What about this approach, maybe this could be used? https://sdorra.dev/posts/2022-11-11-next-with-fathom |
Also looking into this. Anyone got it working? |
I created such component but I used it just as a standalone one placed in the code like any other. Any help to make it align with current implementation and make it backwards-compatible will be appreciated.
|
Thanks for the snippet. It does work, but it looks like it tracks page views very sporadically? |
Maybe, I noticed that too. Eventually, I abandoned Matomo and implemented Google Tag Manager, so feel free to modify my snippet however you like, maybe you will make it work as it should be. |
This is an attempt to set up Matomo for a simpler case, with no GDPR consent banner. Might need some adjustments, I'll watch the Matomo events. https://github.com/betagouv/reno/blob/master/utils/Matomo.tsx |
Thanks laem, very useful, I used your code attempt, and it is tracking. However, and I might be wrong, it doesn't seem to track the different paths, I can only see the root path in Matomo. I've pushed a custom URL to Matomo and now it's working. On line 26: |
Thanks @laem ! your repo is is very useful 😁 Check the repo here https://github.com/betagouv/reno/blob/master/utils/Matomo.tsx, |
Thanks, done ! |
Implementation with prevention of double tracking on the first site visit.
|
Looks like the new "app router" in NextJS@13 removed the
router.events
.A fix is required to handle this news navigation pattern
vercel/next.js#42016
some example implementation : SocialGouv/mda#286
The text was updated successfully, but these errors were encountered: