fridays / next-routes

Universal dynamic routes for Next.js
MIT License
2.47k stars 230 forks source link

How can call function on every route change #191

Closed khakestani closed 6 years ago

khakestani commented 6 years ago

I want to set google analytic event on every changing route What's the best solution?

khakestani commented 6 years ago

I find my solution here

williamli commented 5 years ago

_app.js's getInitialProps is triggered everytime user navigate to a different page.

I placed my ga trigger there.