The attribution pipeline we wrote

First-party tracking, from first visit to closed deal

A marketing visit is recorded first-party at the edge, carried across sessions, and matched to a conversion that arrives asynchronously on a message queue — then reconciled on a schedule to catch what the live path missed. It is our code, so when a number looks wrong we can read why.

Every number here names where it came from and when it was measured.
MeasureValueSourceMeasured
Attribution components written and operatedIngest controller, ingest worker, conversion consumer, scoreboard service, reconciliation jobmarketing package in the media service source tree
Where the visitor identifier is setFirst-party, by edge middleware on the site's own domainmarketing tracking implementation in the marketing site and media service
Analytics hostingSelf-hosted on our own clusterkubectl get deployments -n kamo
Conversion delivery mechanismMessage queue consumer with a scheduled reconciliation passmarketing conversion consumer and reconcile job

What building it taught us

The ordinary arrangement is that an agency pastes a tag manager snippet, and from then on every question about the data ends at a dashboard neither party controls. Third-party cookies are being removed, ad blockers remove more, and the gap between what happened and what was recorded widens every year. You cannot fix what you do not own.

Ours is first-party throughout. The visit identifier is set by edge middleware on our own domain rather than by a script from someone else's. Attribution survives a session ending. Conversions are published as events and consumed by a worker rather than counted inline, which means a slow conversion path cannot slow a customer down, and a lost message can be recovered — there is a reconciliation job precisely because the live path is not trusted to be complete.

Small details decide whether numbers are honest. There is a self-exclusion mechanism so that our own staff browsing the site do not appear in the marketing figures, and it must actively delete the visitor cookie rather than merely stop recording, or the visit that was already recorded stays in the data. Roll-ups are all-time while windowed figures are computed from the underlying rows, because the two disagree and pretending otherwise produces a scoreboard that cannot be reconciled with its own detail. These are the kinds of thing that make a dashboard trustworthy, and they are invisible from outside.

Analytics run self-hosted on the same cluster, so page-level data is ours as well. For clients, we set all of this up in the client's own accounts — the point is that you own the measurement, not that we do.

Built with

  • NATS JetStream
  • Java
  • Spring Boot
  • Next.js middleware
  • Umami
  • YugabyteDB

What this qualifies us for

Analytics and attributionNumbers you can interrogate, in accounts you ownTechnical SEOMaking a site legible to search engines, at the sourceConversion rate optimizationTesting with enough traffic to learn somethingPaid media managementYour accounts, your billing, your data — management fee only

Tell us what you are trying to do

A short conversation is usually enough to tell whether we are the right people. If we are not, we will say so and point you somewhere better.

Start a conversationI already use KamoCRMHow we quote