snowplow / snowplow/snowplow-javascript-tracker

Support dependency-based wait for tracking

Open
#401 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

priority:low status:needs_triage type:enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.