Sub topic 10
Which touchpoint gets the credit
This chapter assumes you can compute the funnel rates and ROAS from the earlier chapters, and that you have tagged your links with UTM parameters. UTM parameters are the utm_source, utm_medium, and utm_campaign tags added to a link's address.
The problem: one sale, several touches
A customer rarely buys after a single contact. Suppose someone sees your social ad on Monday, clicks a newsletter link on Wednesday, and clicks a search ad on Friday before buying. Each contact is a touchpoint. Attribution is the rule that decides how much credit each touchpoint gets for the sale.
The rule matters because credit drives budget. If the search ad gets all the credit, search looks like a star and social looks wasteful, even though social may have started the journey.
Common attribution models
A model is a fixed rule for splitting credit. These four are the ones you will meet most often.
| Model | Who gets credit | Typical bias |
|---|---|---|
| Last click | The final touchpoint before the sale | Favors bottom-of-funnel channels such as search |
| First click | The first touchpoint | Favors awareness channels such as social |
| Linear | Every touchpoint equally | Ignores that some touches matter more |
| Position-based | Most credit to first and last, the rest shared | The 40/20/40 weights are a convention, not a measurement |
Many ad platforms default to last click or to a model that credits their own ads. Check the setting before you compare channels.
Seeing the difference in code
The script below splits one $150 sale across the journey in the diagram. It runs as shown with standard Python.
from collections import defaultdict
journey = ["social_ad", "newsletter", "search_ad"]
revenue = 150.00
def last_click(touches):
return [0.0] * (len(touches) - 1) + [1.0]
def first_click(touches):
return [1.0] + [0.0] * (len(touches) - 1)
def linear(touches):
return [1 / len(touches)] * len(touches)
def credit(touches, weights, amount):
totals = defaultdict(float)
for touch, weight in zip(touches, weights):
totals[touch] += weight * amount
return dict(totals)
for name, model in [("last click", last_click),
("first click", first_click),
("linear", linear)]:
shares = credit(journey, model(journey), revenue)
print(name)
for touch, value in shares.items():
print(f" {touch:<11} ${value:.2f}")Last click gives search_ad $150.00 and the others $0.00. First click gives social_ad $150.00. Linear gives each touchpoint $50.00. The customer and the revenue are identical in all three runs. Only the rule changed.
Credit feeds back into the metrics you already know. If you spent $200 on social ads, social's ROAS is 0.0 under last click and 0.75 under linear ($50 / $200 gives 0.25 for a single sale, so it grows with volume). The channel did not change. The accounting did.
Common errors
- Comparing channels across different models. One report uses last click and another uses linear, so the numbers cannot be compared. Fix a single model for each report and state it.
- Treating the model as truth. Every model is a convention. None of them measures what actually caused the purchase.
- Double counting. Two platforms each claim the same sale, so reported sales exceed real sales. Compare platform totals against your own order records.
- Lost touchpoints. Untagged links, private browsing, and blocked cookies hide steps. Missing touches usually make the last visible touch look more important than it was. Many sales end up labeled "direct".
- Ignoring lag. A sale may arrive weeks after the first touch. A short reporting window under-credits early channels.
A practical approach for a first campaign
- Tag every link with UTM parameters so that touches are recorded at all.
- Pick one model, last click is a reasonable start, and write it in the report.
- Check a second model, such as first click, once. If a channel looks good under one and poor under the other, it plays a specific role in the funnel. It is not simply good or bad.
- Treat big gaps between models as a prompt to test, for example by pausing a channel in one region, instead of as an answer.
Exercise
A customer sees a display ad, clicks an email, then clicks a search ad and buys a $90 item. Under a linear model, how much credit does each touchpoint get? Under last click, how much does the email get? What does the difference tell you about comparing channels?
Show answer
Linear gives each of the three touchpoints $30.00. Last click gives the email $0.00 and the search ad $90.00. The same sale produces different channel results depending on the model, so channels can only be compared fairly when the same model is used for all of them and the model is stated in the report.