Replies: 6 comments
-
Are you using next.js's Router lib? I've never had issues |
Beta Was this translation helpful? Give feedback.
-
I am using a nextjs template. The code indicates the navigations are implemented using tag. Maybe I should try modify the code? |
Beta Was this translation helpful? Give feedback.
-
After investigating the Network tab, I've observed : |
Beta Was this translation helpful? Give feedback.
-
For SPAs, you generally need to disable auto tracking with |
Beta Was this translation helpful? Give feedback.
-
Although it should track URL change automatically (if using Router?) |
Beta Was this translation helpful? Give feedback.
-
Try loading umami tracking script script using https://nextjs.org/docs/pages/api-reference/components/script or https://nextjs.org/docs/app/api-reference/components/script
Next.js will trigger its own events on pathname change and load event of that Script component will be triggered which results in sending requests to Umami /api/send endpoint. |
Beta Was this translation helpful? Give feedback.
-
Describe the feature or enhancement
I'm using Umami cloud.
My website is built with Next.js, utilizing client-side routing. This means that third-party scripts, such as Umami Analytics, are currently only loaded on the initial page load or upon a refresh. Consequently, Umami Analytics fails to collect page view data when users navigate to other pages within the site.
I’m aware that some other analytics tools offer a feature where they listen to route changes, ensuring that they track the views of all visited pages dynamically.
Inquiry:
Is there any known workaround or configuration that allows Umami Analytics to track page views during client-side navigation?
Beta Was this translation helpful? Give feedback.
All reactions