-
Notifications
You must be signed in to change notification settings - Fork 194
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
Expose "sendUpdate" function for external use. #54
Comments
The JS script could probably use some other updates too, like using |
Yeah, I'd like to do a pretty significant refactoring of the script -- I'll definitely expose some kind of |
Latest update works great in my Next.js app - thanks! |
Hi @milesmcc, as I can tell you did not expose newHit function yet? Should I just use shynet.newPageLoad() for SPA then? |
Yep! |
Thank you! |
It'd be nice if the
sendUpdate
function inscript.js
was exposed. In SPAs, Shynet doesn't properly detect page transitions because the browser page is never reloaded. Hence you have to wait for the next heartbeat for anything to be tracked.If the
sendUpdate
function was exposed, it could be called in your router transition event handler and would allow for these events to be tracked. For example with Fathom and Next.js you can do something like this:The text was updated successfully, but these errors were encountered: