---
title: "Tracking and attribution: what the numbers mean"
description: "Why attribution isn't perfect Attribution tries to answer: \"Which content caused this sale?\" In reality, buyers often see you several times, discuss with…"
url: https://optimizeall.com/learn/discount-code-affiliate-sales-mastery/tracking-and-attribution
updated: 2026-10-05
---

Discount-Code & Affiliate Sales Mastery · Code placement, tracking and attribution · lesson 6 of 12 · 15 min

# Tracking and attribution: what the numbers mean

## Why attribution isn't perfect

Attribution tries to answer: "Which content caused this sale?" In reality, buyers often see you several times, discuss with friends and buy days later on another device. No system captures every influence. Understanding the gaps helps you interpret your numbers — and avoid unfair assumptions about your performance.

## How sales get attributed to you

1. **Code redemption** — the customer enters your code at checkout. Usually the most reliable for creator programmes.
2. **Tracked link** — the click carries an identifier; if the customer buys within the window on the same browser/device, you get credit.
3. **Platform-native shopping tags** — some platforms track sales from in-app shops.
4. **Manual reporting with proof** — in some campaigns you submit order IDs and evidence, which the brand or platform verifies.

## Common reasons you don't get credit

- The customer forgot to enter the code.
- They clicked your link on mobile and bought on a laptop.
- Cookies were blocked or cleared, or the attribution window expired.
- Another affiliate's link or code was used later (last-click rules).
- The order was placed outside the eligible region or excluded category.
- The sale was returned or cancelled.

Reduce these by using code **and** link, reminding buyers to enter the code, and being clear about eligibility.

## Metrics to track

- **Clicks** — how many people clicked your link.
- **Code uses / orders** — attributed purchases.
- **Conversion rate** — orders ÷ clicks.
- **Average order value (AOV)** — revenue ÷ orders.
- **Earnings per click (EPC)** — commission ÷ clicks. Useful for comparing campaigns.
- **Reversal rate** — reversed orders ÷ total orders. A high rate suggests poor fit, misleading expectations or quality problems.
- **Confirmed earnings** — after validation.

## Illustrative comparison

*Illustrative numbers only.* Campaign A: 1,000 clicks, 20 orders, commission 300 per order → 6,000 earned, EPC 6. Campaign B: 400 clicks, 16 orders, commission 350 → 5,600 earned, EPC 14. B earns far more per click, suggesting better fit — worth prioritising, even though A had more clicks.

## Using UTM-style tags and separate codes (where allowed)

Some programmes let you create sub-IDs or separate codes per platform. This helps answer "Does YouTube or Instagram convert better for me?" Only do this where the programme allows, and keep naming consistent (for example, AYESHA-YT, AYESHA-IG).

## Keeping your own records

Don't rely solely on dashboards. Keep a simple log: date, platform, content link, clicks, orders, earnings, notes. When numbers look wrong, your records help you raise questions with evidence.

## When numbers look wrong

1. Check the obvious: correct link? Code working? Campaign dates?
2. Compare with your content analytics: did clicks spike when you posted?
3. Gather evidence: screenshots of analytics, the post, any buyer messages confirming code use (with permission).
4. Raise it politely with the platform or brand through official support, with specifics.

Never "fix" a shortfall by submitting orders you can't verify.

## Worked example

Rabia, a UK-based Pakistani fashion creator, notices high clicks but low orders from Pakistan. Investigating, she finds the brand's site defaulted to GBP and international shipping was expensive. She tells the brand, who enables local currency and a Pakistan shipping option. She then clarifies delivery options in her content. Conversion improves — not because of new content, but because she read the data correctly.

## Hands-on: calculate your own campaign metrics

Export your sales log (or the programme's report) to CSV and run this. It uses only the Python standard library.

```python
import csv
import sys
from collections import defaultdict

# Expected columns: campaign,platform,clicks,orders,reversed_orders,revenue,commission
def load(path):
    rows = []
    with open(path, newline="", encoding="utf-8") as f:
        for r in csv.DictReader(f):
            try:
                rows.append({
                    "campaign": r["campaign"], "platform": r["platform"],
                    "clicks": int(r["clicks"]), "orders": int(r["orders"]),
                    "reversed": int(r["reversed_orders"]),
                    "revenue": float(r["revenue"]), "commission": float(r["commission"]),
                })
            except (KeyError, ValueError) as err:
                print(f"skipping bad row {r}: {err}", file=sys.stderr)
    return rows

def summarise(rows, key):
    agg = defaultdict(lambda: {"clicks": 0, "orders": 0, "reversed": 0, "revenue": 0.0, "commission": 0.0})
    for r in rows:
        a = agg[r[key]]
        for k in ("clicks", "orders", "reversed", "revenue", "commission"):
            a[k] += r[k]
    print(f"{key:<16}{'conv%':>7}{'AOV':>10}{'EPC':>8}{'rev%':>7}")
    for name, a in sorted(agg.items()):
        conv = 100 * a["orders"] / a["clicks"] if a["clicks"] else 0
        aov = a["revenue"] / a["orders"] if a["orders"] else 0
        epc = a["commission"] / a["clicks"] if a["clicks"] else 0
        rev = 100 * a["reversed"] / a["orders"] if a["orders"] else 0
        print(f"{name:<16}{conv:>7.1f}{aov:>10.0f}{epc:>8.2f}{rev:>7.1f}")

if __name__ == "__main__":
    data = load(sys.argv[1] if len(sys.argv) > 1 else "sales_log.csv")
    summarise(data, "campaign")
    summarise(data, "platform")
```

Notes: EPC here uses commission before reversals; run it again on confirmed commission once validation ends. Codes do not generate "clicks", so for code-only sales compare orders per post or per 1,000 views instead.

## Reading attribution honestly

- **Views without clicks still sell.** Many buyers watch on one device, remember the brand and buy later. Codes capture some of this; nothing captures all of it.
- **Ask for what the brand can see.** Brands using Shopify, WooCommerce or an affiliate network can usually report orders by code, by your link and, sometimes, "assisted" orders. Ask what they can share.
- **Privacy limits are real.** Browser tracking protections and consent banners mean link-based numbers undercount. Do not try to get around a buyer's privacy choices.

## Do and don't

**Do** use code plus link. **Do** track EPC and reversal rate. **Do** keep your own records.

**Don't** assume low attribution means low influence. **Don't** create sub-codes without permission. **Don't** submit unverifiable orders to "correct" numbers.

## Video lecture: Tracking and attribution: what the numbers mean

Lecture coming soon · 15 chapters · about 8 minutes. Read the full transcript below.

1. Tracking and attribution
2. Why it matters
3. The loyalty card
4. Four attribution routes
5. Why sales go missing
6. Metrics that matter
7. Per-platform codes and sub-IDs
8. Keep your own log
9. Example 1 (illustrative): A vs B
10. Example 2 (illustrative): Rabia, UK/PK
11. Watch me do it: metrics from CSV
12. When numbers look wrong
13. Privacy and tracking
14. Common mistakes
15. Recap + try this now

## Lecture transcript

### Tracking and attribution

Your dashboard says twenty sales. Your DMs say at least forty people bought with your code. Who's right? Probably neither, exactly. Attribution is an estimate, not a perfect record. In this lecture you'll learn how sales get attributed to you, the common reasons you don't get credit, the metrics that really matter, how to calculate them yourself from a spreadsheet, and how to raise a discrepancy with evidence instead of frustration.

### Why it matters

Why does this matter? Because if you misread your numbers, you'll make bad decisions. You might drop a campaign that's actually working, or double down on one that just gets clicks. You might accuse a brand of under-reporting when the real cause is cross-device buying. And you might be tempted to fix a shortfall in ways that look like fraud. Understanding attribution protects your income and your reputation.

### The loyalty card

Here's the analogy. Attribution is like figuring out who convinced your friend to try a new restaurant. Was it the review they read last week, the post they saw yesterday, or the friend who mentioned it at lunch? All of them helped. But the restaurant only has room on the loyalty card for one name. Most programmes write down the last one, or the one whose code was typed. That's not the whole story. It's just the rule.

### Four attribution routes

How do sales get attributed to you? Four ways. Code redemption: the buyer types your code, usually the most reliable in creator programmes. A tracked link: the click carries an identifier, and if they buy within the window on the same browser or device, you get credit. Platform-native shopping tags: some platforms track sales from their in-app shops. And manual reporting with proof: you submit order IDs and evidence, which the brand or platform verifies.

### Why sales go missing

And why do sales go missing? The buyer forgot the code. They clicked on their phone and bought on a laptop. Cookies were blocked or cleared, or privacy settings limited tracking. The window expired. Another creator's link or code was used later. The order was outside the eligible region or category. Or it was returned or cancelled. Most of these you can reduce: use a code and a link, remind people to enter the code, and be clear about eligibility.

### Metrics that matter

Now the metrics. Clicks. Orders. Conversion rate: orders divided by clicks. Average order value: revenue divided by orders. Earnings per click, or EPC: commission divided by clicks, the best single number for comparing campaigns. Reversal rate: reversed orders divided by total orders; a high rate points to poor fit, misleading expectations or quality problems. And confirmed earnings after validation, which is what actually pays your bills.

### Per-platform codes and sub-IDs

Where the programme allows it, separate codes or sub-IDs per platform answer a question every creator has: does YouTube or Instagram convert better for me? Some programmes let you create codes like AYESHA dash YT and AYESHA dash IG, or add a sub-ID to your tracked link. Only do this with permission, and keep the naming consistent so your reports add up. The payoff is real: after a month, you know where your buyers actually come from, and you can spend your limited time where it earns the most.

### Keep your own log

Don't rely only on the programme's dashboard. Keep your own simple log. Date, platform, content link, clicks, orders, commission, reversals, and a notes column for things like the brand sale started today, or the code stopped working. It takes two minutes a day. When numbers look wrong, your records let you raise questions with evidence. When you negotiate, they prove your value. And when a dashboard changes or a platform closes, your history doesn't disappear with it.

### Example 1 (illustrative): A vs B

First example, illustrative numbers. Campaign A: a thousand clicks, twenty orders, three hundred rupees commission each, so six thousand earned, and an EPC of six. Campaign B: four hundred clicks, sixteen orders, three hundred and fifty each, so five thousand six hundred earned, and an EPC of fourteen. A had more clicks and slightly more money. But B earns more than twice as much per click, which suggests a much better fit. If you have limited time, B is where more effort pays.

### Example 2 (illustrative): Rabia, UK/PK

Second example, a realistic business scenario. Rabia, a UK-based Pakistani fashion creator, notices lots of clicks but very few orders from Pakistan. She investigates rather than assuming the worst. The brand's site defaulted to pounds sterling, and international shipping was expensive. She tells the brand, which enables local currency and a Pakistan shipping option, and she clarifies delivery in her content. Illustratively, her Pakistan conversion rate climbed within weeks. Not because of new content, but because she read the data correctly.

### Watch me do it: metrics from CSV

Watch me do it. I export my sales log to a CSV with columns for campaign, platform, clicks, orders, reversed orders, revenue and commission. I run the Python script from the lesson. It prints a table by campaign: conversion, average order value, EPC and reversal rate. The headset campaign: conversion three percent, EPC eleven. The smartwatch: EPC four, and a reversal rate of twenty percent. That reversal rate is a red flag, so I read the return reasons the brand shared: sizing of the strap. Next, the same table by platform. YouTube has the best EPC, Instagram the most clicks. I'll move my comparison video effort to YouTube and add strap sizing to my smartwatch content.

### When numbers look wrong

When numbers look wrong, follow four steps. First, check the obvious: is it the right link, does the code work, are you inside the campaign dates? Second, compare with your content analytics: did clicks spike when you posted? Third, gather evidence: screenshots of analytics, the post, and any buyer messages confirming code use, shared with their permission. Fourth, raise it politely through official support, with specifics. And never fix a shortfall by submitting orders you can't verify.

### Privacy and tracking

A word on privacy. Browser tracking protections and cookie consent choices mean link-based numbers will undercount. That's by design, and it protects buyers. Don't try to get around a buyer's privacy choices, and don't use tools that force tracking without a genuine click; that's cookie stuffing, and it's fraud. Instead, lean on codes, which buyers choose to type, and ask brands what they can see on their side, such as orders by code or assisted orders.

### Common mistakes

Common mistakes. Judging campaigns by clicks alone. Assuming low attribution means low influence. Creating extra codes or sub-IDs without permission. Ignoring the reversal rate until payout day. Relying only on the dashboard with no records of your own. And accusing a brand before checking currency, shipping, eligibility and dates. Most discrepancies have a boring explanation.

### Recap + try this now

Recap. Attribution is a rule, not the whole story. Sales go missing for predictable reasons, and using a code plus a link fixes many of them. Track conversion, average order value, EPC and reversal rate, and calculate them yourself from your own log. Investigate discrepancies with evidence through official channels, and respect buyers' privacy choices. Try this now: build your sales log in the lesson's format and run the script on your last two campaigns. Next module: reporting sales correctly.

## Key takeaways

- Attribution is imperfect: devices, cookies, windows and last-click rules all cause gaps.
- Use both code and link, and remind buyers to enter the code.
- Track conversion rate, EPC, AOV and reversal rate — not just clicks.
- Investigate discrepancies with evidence through official channels.

## Try it

Build a simple tracking log and calculate conversion rate, EPC and reversal rate for your last two campaigns.

- [Previous: Link and code placement that works](https://optimizeall.com/learn/discount-code-affiliate-sales-mastery/link-and-code-placement)
- [Next: Reporting sales correctly: order IDs and proof](https://optimizeall.com/learn/discount-code-affiliate-sales-mastery/reporting-sales-correctly)
- [All lessons of Discount-Code & Affiliate Sales Mastery](https://optimizeall.com/learn/discount-code-affiliate-sales-mastery)
