While implementing analytics with a next.js project yesterday I tried searching for an example with the app router, but was not able to find one. Since router.events was replaced it now uses a new setup.
I made a small example on how I set it up myself using the provider and the hooks with the new next/router.
While implementing analytics with a next.js project yesterday I tried searching for an example with the app router, but was not able to find one. Since
router.events
was replaced it now uses a new setup.I made a small example on how I set it up myself using the provider and the hooks with the new
next/router
.