question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Expose "sendUpdate" function for external use.

See original GitHub issue

It’d be nice if the sendUpdate function in script.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:

Router.events.on("routeChangeComplete", () => {
  fathom.trackPageview();
});

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
milesmcccommented, Jun 28, 2020

Yeah, I’d like to do a pretty significant refactoring of the script – I’ll definitely expose some kind of shynet.newHit() function.

1reaction
milesmcccommented, Jul 3, 2020

Yep! Shynet.newPageLoad() is what you want to use.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Expose only required functions in C - Stack Overflow
I am writing a small API library sort of module in C. I will compile this module and give it to my fellow...
Read more >
Use the Outlook mail REST API - Microsoft Graph v1.0
Use cases REST resources See al... Let user view more important messages first inferenceClassificationOverride Focus... Query for messages and get them in a search folder...
Read more >
Events: insert | Google Calendar
Property name Value Notes end nested object start nested object anyoneCanAddSelf boolean writable
Read more >
Moobot Modules - Moogsoft Docs
Using external modules. Moobots can load external JavaScript modules. This means that modules can be reused as generic functions in multiple ...
Read more >
[Feature] Spawning Actors · Issue #428 · statelyai/xstate - GitHub
Write external ad-hoc functionality for managing a system of Actors; Delegate handling to an external framework, such as React.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found