EG.

System / 03 · Affiliate and attribution

From a creator's link to a paid commission.

My role

Led the backend build of the first affiliate services and the Go foundation under them. Designed partner integrations and wrote most of the public documentation. Then led the affiliate systems as Engineering Lead.

Others

More than 20 engineers have built on it since.

Stack

Go, protobuf, gRPC, AMQP, Google Tag Manager, Shopify, public REST APIs.

01 The problem

A creator platform measured reach. Affiliate marketing has to prove a sale, and pay the right person for it.

That means following one shopper from a social post to a checkout on someone else's website, through fulfilment and returns, without owning any of the stores involved.

02 Follow one click

One ID, from the first tap to the payout.

  1. 01

    Link

    A creator makes an affiliate link in the platform.

  2. 02

    Click

    The gateway issues a unique click ID and redirects.

  3. 03

    Events

    The store reports views, carts and purchases with that ID.

  4. 04

    Order

    The sale is attributed to the creator and the program.

  5. 05

    Commission

    Fulfilment and returns adjust it until it is paid.

→ In practice

Five doors, one ledger.

Each door reports the sale differently. The record and the commission stay the same, and every change to the order is a new row.

Tag manager, custom web, server API, batch file or discount code: every door ends in the same attribution record, and returns become new ledger rows.

03 What I built

ATTRIBUTION CORE

One model for every source

Clicks, events, orders and commissions share one data model, whichever way they arrive.

FIVE DOORS

Meet brands where they are

Tag-manager tags, custom web tracking, a server-to-server API, file uploads and discount codes.

RETURNS

A sale is not final

Fulfilment, partial returns and commission adjustments are part of the model, not an afterthought.

DEVELOPER EXPERIENCE

Integration as a product

Public docs, an API playground and an onboarding tool that shows test events live.

04 The result

Over 100 million requests a day.

100M+

API requests per day

31

services

5 · 4

integration paths · network and commerce connectors

74 pages of public documentation a partner can follow alone.

05 Where it goes next

One record today. A tool for agents next.

The attribution core already serves creators and brands. The next steps put it on the shared platform, and then in the hands of agents.

  1. 01 · NOWSYSTEM 03

    One attribution layer

    Links, codes, storefronts and networks share one record. The same record pays the creator and informs the brand.

  2. 02 · NEXTSYSTEM 01

    Onto the platform

    The affiliate services move onto the contract-first service platform, each described once in its contract.

  3. 03 · THENSYSTEM 02

    Tools for agents

    On the platform, they become tools for the agents. A campaign agent can check program performance, conversions and commissions before it suggests the next step.

Where it began

This is also where the other two stories began. The first Go services and the first service template in the monorepo were written here.

Next: the person behind the work.

About