Accept a client-supplied event id on /track so retries are deduplicated

Open
#676 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@hassanabrar202 is already working on this.

Since Nov 23, 2026.

  • #684 by @hassanabrar202 — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript
Domain
analytics

Research direction

Start by locating the /track ingestion path and how it currently applies the short-lived payload hash lock. Trace how events are stored and whether ingestion exposes an event identifier that can support deduplication. The work is done when a resend with the same optional client-supplied id is dropped while events without an id continue to be accepted; the issue names no files or tests.

Written by the indexing model from the issue text.

Description

The only deduplication on /track is a ~100 ms lock on a hash of the payload. A sender that hits a timeout or a 5xx cannot tell whether the event was stored, and a retry a few seconds later is stored as a second event. For server-side revenue events that doubles revenue.

Example: send {"type":"track","payload":{"name":"purchase","profileId":"u1","properties":{"__revenue":999}}} twice, 2 s apart → two events.

Request: an optional per-event id (like the insert ids other analytics APIs accept) that ingestion uses to drop a resend with the same id. Today we send each event at most once and accept losing it on a network error.

Dominant language
TypeScript
Stars
7.3k
Forks
552
Avg merge
1d 2h
Merged PRs (30d)
18

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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.

More from Openpanel-dev/openpanel

All issues in Openpanel-dev/openpanel

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.