---
title: "Konga retail ads: billing and attribution | Amos Godwin"
url: "https://amosgodwin.com/work/konga-ads-platform"
---

Case study, 2026

# Charging every click once: billing and attribution for Konga’s retail ads

Konga’s retail media network sells sponsored product placements in search and listings, priced per click. I built the part that turns clicks into money: campaign escrow, click billing, budget control across campaigns running at the same time, and the attribution that tells sellers what their spend returned. The platform is running as a phased pilot.

**Role**
Senior software engineer

**Where**
Konga Group

**When**
2026, in pilot

**Stack**
NestJS, MySQL, Redis, BullMQ, Elasticsearch

## The problem

On a cost-per-click network, every click is an invoice line. Sellers fund a campaign, their products appear in sponsored slots on search and listing pages, and each click draws down their budget. The marketplace earns on every search, but only if the ledger is right.

That makes billing the part of an ads platform where mistakes cost the most. Count a click twice and a seller is overcharged. Miss one and Konga gives away inventory. Let a campaign run past its budget and someone has to explain the difference.

## Money is set aside before it is spent

Each campaign is funded into escrow when it launches, and click charges draw from that escrow rather than from the seller’s open wallet, so a campaign can never spend money that wasn’t set aside for it. When a seller raises a live campaign’s budget, the shortfall is moved into escrow before the new budget takes effect.

## A click is charged once

Shoppers double-tap, networks retry and trackers resend. Every charge carries its own key, tied to the impression it came from, so a click is billed at most once per impression and a retry finds the existing charge instead of making a new one. Impressions are recorded in the same transaction as the accounting, and only for products actually returned to the shopper, with projections that are safe to retry.

## Budgets that hold under concurrency

Many campaigns compete for the same traffic at the same moment. I added daily budget counters, an enforced daily allowance on every click charge, and paid budget resets. Along the way I found and fixed a deadlock between charges for different campaigns.

Because these changes touch money and schema together, I shipped them as two staged deploys: the counters and the deadlock fix first, enforcement second, so the data was in place before any rule depended on it.

## Attribution sellers can trust

Purchase attribution correlates tracking receipts with the clicks and impressions that came before them, deduplicates repeated events, and counts clicks as touchpoints, including purchases of a catalogue variant of the advertised product. ROI and conversion analytics are built on top of it.

## Proving the ledger is right

Because this is money, I built audit, recovery and replay tools for the accounting, and covered the accounting paths with integration tests against real MySQL and Redis rather than mocks. The rollout is phased through a pilot mode that limits which ads are served while the numbers are checked.

The platform runs on NestJS and MySQL, with Redis, BullMQ and Elasticsearch.

## Need an engineer who can own work like this? Write to me.

[amosgodwin500@gmail.com](mailto:amosgodwin500@gmail.com)

[View CV](https://amosgodwin.com/cv/amos-godwin-cv.pdf)[LinkedIn](https://www.linkedin.com/in/godwin-amos/)[GitHub](https://github.com/donkizzy)

```json
[
  {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "Charging every click once: billing and attribution for Konga’s retail ads",
    "description": "How Amos Godwin built campaign escrow, once-only click billing, daily budgets and attribution for Konga’s cost-per-click retail ads, now in pilot.",
    "url": "https://amosgodwin.com/work/konga-ads-platform",
    "mainEntityOfPage": "https://amosgodwin.com/work/konga-ads-platform",
    "image": "https://amosgodwin.com/work/konga-ads-platform/og.png",
    "dateModified": "2026-11-19",
    "inLanguage": "en-NG",
    "author": {
      "@type": "Person",
      "name": "Amos Godwin",
      "url": "https://amosgodwin.com",
      "jobTitle": "Senior Software Engineer"
    },
    "about": {
      "@type": "Organization",
      "name": "Konga Group",
      "url": "https://www.konga.com"
    }
  },
  {
    "@context": "https://schema.org",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Amos Godwin",
        "item": "https://amosgodwin.com/"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Konga Group",
        "item": "https://amosgodwin.com/#konga"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Konga Ads Platform",
        "item": "https://amosgodwin.com/work/konga-ads-platform"
      }
    ]
  }
]
```
