snowplow / snowplow/snowplow-javascript-tracker
Support dependency-based wait for tracking
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 590
- Forks
- 232
- Avg merge
- 2h 22m
- Merged PRs (30d)
- 3
Description
In the scenario that Augur (e.g.) can retrieve a user fingerprint in 400ms, you may prefer to wait that 400ms and attach an Augur fingerprint to all events, rather than have some late-firing events have Augur data and some early-firing events have no Augur data. The exact same applies in a non-Augur-world to setUserId.
This ticket would make it possible to delay all event tracking based on a precondition such as the Augur data being available. You can think of this as effectively a blocking wait-to-send, except of course in a JavaScript async world this wouldn't be literally implemented with a block.
We should probably consider a "dead man's handle", where after a configuration timeout, the block is removed (because e.g. there is an instrumentation bug and that user ID is never going to be passed into the dataLayer for this page load).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing event tracking and the setUserId path, including how Augur data reaches the dataLayer. Define how a precondition delays all events, how the configuration timeout releases the wait, and tests that cover both data arriving and the dead-man's-handle case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- analytics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100