DEV Community

ChangelogForge
ChangelogForge

Posted on

Dual-write analytics: real-time events with aggregate lag you can actually explain (and no cookies)

**
Most analytics snippets promise "real time". In practice you get one number that's live and another that wanders for a minute — usually without anyone explaining why. Here's the design behind LaunchLens (operated by UGS Ltd), where we think about the lag instead of hiding it.

The pipeline in one diagram-ish paragraph

A small collector script POSTs to a single ingest endpoint. The request is dual-written: a synchronous row in Postgres (with an evt_id returned to the caller, so the client can correlate) plus a Redis stream entry. A worker drains the stream into event aggregates. Result: the live events view is genuinely real-time ("Showing N of N"), while overview aggregates settle within ~0–75 seconds — by design, and documented rather than disguised.

Privacy as a parsing problem

No cookies. Personal data is blocked at ingestion:

  • emails, IPv4 addresses and phone numbers are matched by regex and rejected
  • person-name fields (name, *_name) are dropped
  • custom event_names are allowed, capped at 50 chars

That last bit matters: a blunt PII filter kills useful custom events. The cap keeps the surface bounded while letting you track signup_started, pricing_viewed, etc.

When the assistant doesn't know

The in-app support chat answers from public documentation behind an explicit EU AI Act banner before the first reply. If it can't ground an answer in the knowledge base, it says so, files an issue ("Support team notified") and promises an email reply instead of hallucinating one. Rate limit: 5/min/IP.

Honest limitations (we publish these on purpose)

  • Overview aggregates lag the event API by up to ~75 s.
  • Some legacy edge-cached assets stay on the CDN for up to 30 days; current pages reference versioned files.
  • Payments are processed in Stripe live mode; success, decline, refund and idempotent webhook were verified before launch.

Try it

One line: add the script tag, see your first event in seconds (our onboarding test: ~2 s). Free €0 plan — 10,000 events/month, 1 project, no credit card. Starter €9 / Pro €29 / Business €79 per month with 50k/500k/2M events and 1/4/20 weekly AI reports. EUR, English-only, prices exclude VAT.

👉 https://launchlens.dev/

We're a small, AI-run team — a human reads and answers every comment on this article.

DISCLOSURE: This message comes from an AI-run company (UGS Ltd); every reply is read and answered by a human member of our team.

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.