Skip to content

Grokem · https://www.grokem.com/data/data-analytics/marketing-measurement/attribution/attribution-models-explained

AttributionExplainer

Attribution models explained: who gets the credit for a sale?

First click, last click, linear, time decay and position-based, applied to one customer journey so you can see exactly how much each model changes the answer.

Grokem Editorial

Editorial desk

Published
  • Beginner
  • 5 min read

What you will learn

  • Describe how each common attribution model assigns credit
  • Read a model comparison on a single journey
  • Explain why every model is a simplification
  • Choose a model, or a comparison, that suits a decision

A customer rarely buys after a single visit. They might open an e-mail, click a search ad a week later, find you again through organic search and finally type your address and buy. The sale is worth the same whatever happened, but who gets the credit decides which channels look good and where budget goes. An attribution model is the rule that divides that credit.

One journey, five models

Take a customer who buys something worth 100. Their path, and how long before the purchase each touchpoint happened:

  1. Email, 12 days before
  2. Paid search, 6 days before
  3. Organic search, 3 days before
  4. Direct (typed the address), on the day of purchase

This script gives the 100 out under each model.

python
JOURNEY = [("Email", 12), ("Paid search", 6), ("Organic search", 3), ("Direct", 0)]   # (channel, days before purchase)
VALUE = 100.0


def first_click(j):
    return {c: (VALUE if i == 0 else 0.0) for i, (c, _) in enumerate(j)}


def last_click(j):
    return {c: (VALUE if i == len(j) - 1 else 0.0) for i, (c, _) in enumerate(j)}


def linear(j):
    return {c: VALUE / len(j) for c, _ in j}


def time_decay(j, half_life_days=7):
    weights = [0.5 ** (days / half_life_days) for _, days in j]
    total = sum(weights)
    return {c: VALUE * w / total for (c, _), w in zip(j, weights)}


def position_based(j, first=0.4, last=0.4):
    n = len(j)
    middle = (1 - first - last) / max(n - 2, 1)
    out = {}
    for i, (c, _) in enumerate(j):
        out[c] = VALUE * (first if i == 0 else last if i == n - 1 else middle)
    return out


models = {"First click": first_click, "Last click": last_click, "Linear": linear, "Time decay": time_decay, "Position-based": position_based}
print(f"{'Channel':<16}" + "".join(f"{name:>16}" for name in models))
for channel, _ in JOURNEY:
    print(f"{channel:<16}" + "".join(f"{fn(JOURNEY)[channel]:>16.1f}" for fn in models.values()))
text
Channel              First click      Last click          Linear      Time decay  Position-based
Email                      100.0             0.0            25.0            11.7            40.0
Paid search                  0.0             0.0            25.0            21.2            10.0
Organic search               0.0             0.0            25.0            28.6            10.0
Direct                       0.0           100.0            25.0            38.5            40.0

Every column adds up to 100. Only the rule changed, and the same sale makes e-mail look worth everything, or nothing.

The models

First click. All the credit goes to the first touchpoint. It rewards the channels that introduce people to you and ignores everything that convinced them.

Last click. All the credit goes to the final touchpoint. It is simple, and it flatters whatever comes last: branded search, direct visits and retargeting. It undervalues the channels that started the journey. Here "Direct" gets the whole sale, though it is unlikely to be what created the interest.

Linear. Equal credit to every touchpoint. It acknowledges the whole path but treats a decisive click and a casual one as the same.

Time decay. Touchpoints closer to the conversion get more credit. In the script credit halves for every 7 days of distance, so the e-mail 12 days out gets 11.7 and the direct visit gets 38.5. It suits short buying cycles, where recent contact matters most, and it underrates the long early nurture of a slow one.

Position-based (U-shaped). A fixed share, here 40%, to the first and last touchpoints, and the remaining 20% shared among the middle ones. It values both the introduction and the close.

Data-driven. Instead of a fixed rule, a statistical model estimates each touchpoint's contribution from many real paths, including those that did not convert. It can be the most informative when you have enough data, but it is harder to explain and to audit.

What every model gets wrong

  • They only see what is tracked. A podcast mention, a conversation or an offline ad leaves no touchpoint. Browser privacy features, consent choices and ad blockers hide others.
  • Credit is not cause. A touchpoint that appears on the path may have changed nothing: the customer was going to buy anyway. Only a controlled experiment, such as a holdout group that does not see the channel, measures the effect of a channel.
  • The lookback window matters. A 7-day window and a 90-day window produce different answers from the same data.
  • People use several devices. Without a way to join them, one person looks like several, each with a short path.

How to use this well

  1. Compare, do not crown. Run two or three models side by side. A channel that looks good under all of them is probably good. One that changes completely from model to model is a question mark, not an answer.
  2. Match the model to the decision. Judging a brand awareness campaign by last-click tends to make it look poor. Judging a retargeting campaign by first-click tends to make it look poor.
  3. Write down the rule you use. Teams argue about numbers that differ only because each used a different model or window.
  4. Test the big claims. When a lot of money rides on a channel, a holdout or geographic test shows what attribution cannot.

Glossary

Touchpoint
One interaction before a conversion: an e-mail click, an ad, a search visit.
Conversion
The outcome you are measuring: a purchase, a signup, a lead.
Attribution model
A rule that divides the credit for a conversion among the touchpoints that came before it.
Lookback window
How far back from a conversion touchpoints are considered.
Data-driven attribution
A model that estimates each touchpoint's contribution from observed paths, instead of using a fixed rule.

Frequently asked questions

Which model is correct?

None is a measurement of cause. They are accounting rules. The useful question is which rule leads to better decisions for your business, and whether the answer changes when you switch.

What does a tool's data-driven model do?

It uses the paths of converting and non-converting users to estimate how much each touchpoint added. It needs enough data to work, and it is only as good as the touchpoints it can see.

Next steps

  • Compare two models on your own conversion paths
  • Pair attribution with a controlled test when the budget at stake is large

References

From Grokem: https://www.grokem.com/data/data-analytics/marketing-measurement/attribution/attribution-models-explained

How did this strike you?

Be the first to react – it is anonymous.

Community

Questions about this?

Ask in Questions and help and get help from other readers.

Ask a questionBrowse Questions and help

Comments

No comments yet. Share what worked for you, or ask a question.

Choose what we may use. You can change this at any time with “Privacy choices” at the foot of every page. Details are in the Cookie policy and the Privacy policy.

Strictly necessary

Remembers your theme, the lessons you marked as done and this choice. It stays on your device, tracks nothing and cannot be switched off.

Always on
What exactly is collected, and why

Grokem’s own counts

Collects
The pages you open and how long you stay, how far you scroll, where you came from, your device type, browser, screen size, language and time zone. Your IP address is turned into a code that changes every day; it is never stored as it is.
Why
To see how long lessons are read and where readers leave. Not shared with anyone.
Stored
A random visitor ID, a visit ID and the time of your last page view in your browser’s storage (gr_vid, gr_sid, gr_last). No name or email is attached.