You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using counterscale with Next.js and on page load it sends a trackPageview event to Cloudflare. However, on subsequent page views (where Next.js is effectively a SPA) nothing is sent to Cloudflare. I have tried:
Calling window.counterscale("trackPageview") on navigation
Setting the data-spa="auto" property on the counterscale script tag. (This property is available on the Fathom script so I thought I'd give it a go here!)
How can I make sure that my SPA page views are tracked? Thanks!
The text was updated successfully, but these errors were encountered:
How can I make sure that my SPA page views are tracked?
I think we need to augment tracker.js to be aware of (and track) navigation changes using PopStateEvent (mdn).
But before that, we need to add tests to the tracker using Playwright or something similar. I've been reticent to add functionality to the tracker because it's not covered at the moment.
I'm using counterscale with Next.js and on page load it sends a trackPageview event to Cloudflare. However, on subsequent page views (where Next.js is effectively a SPA) nothing is sent to Cloudflare. I have tried:
window.counterscale("trackPageview")
on navigationdata-spa="auto"
property on the counterscalescript
tag. (This property is available on the Fathom script so I thought I'd give it a go here!)How can I make sure that my SPA page views are tracked? Thanks!
The text was updated successfully, but these errors were encountered: