Attribution for online shops: models, windows and incrementality

TL;DR

Difficulty: Advanced

Attribution shares the credit for orders that happened. Incrementality measures which orders a channel caused. Use the first to understand journeys and the second to set budgets.

  • GA4 and Google Ads now offer only data driven and last click. Compute first click, linear and time decay yourself from your own visit data if you want them.
  • Every platform counts inside its own windows and dates, so their claims overlap and their sum overstates the shop. Write the window next to every number.
  • Measure cause with a random holdout on your customer list or a geo test, read in your own order data, and decide on the interval, not the point.
  • Turn each test into an incrementality factor that calibrates the platform claims, and add a marketing mix model once you have two years of weekly data.

Google Ads, Meta and your newsletter tool all claim the same order, and the sum of their claims is far larger than your shop. This chapter separates the two questions hiding in "which channel made the sale": how the credit is shared, and what a channel actually causes. It works both through on one invented homeware shop in Limerick, with SQL, Python and two real tests.

Which channel made the sale? Usually several, and sometimes none

A customer sees an Instagram ad for a linen tablecloth, clicks it, looks, and leaves. Nine days later she searches for a lamp and lands on your shop through an ordinary Google result. Six days later your newsletter arrives, and she clicks through to the sale. The next day she types your brand name into Google, clicks the paid ad at the top, and buys. Four channels touched one order. Which one made the sale?

Every tool you own will answer that question, and they will answer it differently. Google Ads will say the brand search ad did it. Your email tool will say the newsletter did it. Meta may well say the Instagram ad did it. Each of them is reporting something true about its own part of the journey, and the sum of their claims is far larger than the orders in your shop.

This chapter answers the question properly, in two halves. The first half is attribution: the rules that share the credit for an order between the touchpoints on its path. Attribution is bookkeeping. It tells you how journeys look. The second half is incrementality: whether a channel caused sales that would not have happened without it. Incrementality is cause and effect, and it is the only thing that should move a budget. The two are often confused, and that confusion is the most expensive mistake in shop marketing.

It is the last chapter of the series and builds on when analytics, ads and orders disagree, which explains why the systems count different totals.

Example: one order at Shannonside Home, four claims

Shannonside Home is the invented homeware shop in Limerick that runs through this series (shannonsidehome.example). Niamh owns it, Callum builds and runs the shop software. The example's baseline numbers: 110,000 sessions a month, a conversion rate of 1.8%, so 1,980 orders, an average order value of €84, a gross margin of 52% on product, and an ad spend of €16,500 a month, of which €10,600 goes to Google Ads and €5,900 to Meta. Callum runs that money as five lines: brand search €1,750, non brand Google Shopping €6,500, non brand Google search €2,350, Meta prospecting to new people €2,850 and Meta retargeting to past customers €3,050.

The order from the opening paragraph is real in the example's world: €112, a tablecloth and a lamp. Here is who claims it:

SystemWhat it reportsWhy
Google Ads1 conversion, €112the last ad click before the purchase was a brand search ad
Meta0 or 1 conversion, €112the ad click was 16 days earlier, so it counts only if she also saw a Shannonside ad in the last day
Email tool1 conversion, €112a newsletter click the day before
GA4, data drivena fraction of the order per channela model shares the one order between the touchpoints
The shop1 order, €112the only system that counts money

Look at the Meta row closely, because it already shows how windows decide credit. Meta's default setting counts a purchase within seven days of an ad click, or within one day of an ad view.1 The click on day 0 is 16 days before the purchase, so it is outside the window. If she happened to scroll past another Shannonside ad the evening before she bought, Meta claims the order anyway, as a view through conversion. Three or four systems can claim one €112 order, and none of them is lying. They are answering different questions.

What attribution can answer, and what it cannot

Attribution answers a descriptive question: on the paths that ended in an order, which channels appeared, and in what order? It shows which channels open journeys and which close them, and how long people take to decide.

Attribution cannot answer the causal question: how many of these orders would not have happened without this channel? A path only records what happened. It never records what would have happened if one touchpoint had been missing. The customer who clicked the brand search ad was typing your name. She was coming anyway. The ad sat in her path, and it gets credit, but removing it might have changed nothing at all.

So use attribution to understand journeys, and use incrementality to decide budgets. The rest of this chapter follows that split.

Example: Niamh's budget question

Niamh asks Callum: "Should I move €2,000 a month from Meta to Google?" Callum opens the attribution report built from the shop's own visit data. Under last click, paid search earns a return on ad spend (ROAS, revenue divided by ad spend) of 430×84÷10,600=3.4430 \times 84 \div 10{,}600 = 3.4, and Meta 150×84÷5,900=2.1150 \times 84 \div 5{,}900 = 2.1. Under first click the order flips: Meta reaches 390×84÷5,900=5.6390 \times 84 \div 5{,}900 = 5.6 and paid search drops to 380×84÷10,600=3.0380 \times 84 \div 10{,}600 = 3.0. (The order counts come from the four model table further down.)

Neither report answers Niamh's question. Her question is about the next €2,000, and what it would cause. The attribution report is about the last month's orders, and how to share them out. Callum writes the question down as an incrementality question, which the second half of this chapter answers, and he uses attribution only to describe the journeys.

What an attribution model actually sees

An attribution model in GA4, or in your own database, works on paths: the list of sessions one browser had before it bought, each labelled with a channel. The channel comes from the UTM parameters on the link, from the Google Ads click identifier, or from the referring site. If your UTM tagging is messy, every model inherits the mess. UTM tracking for your online campaigns covers the tagging itself.

Three gaps shape every path:

  • Consent. A visitor who declines analytics cookies has no stored browser identifier, so their visits cannot be linked into a path. Their orders still happen. They are just missing from the path data.
  • Devices. Someone who clicks an ad on the phone and buys on the laptop leaves two separate paths, unless they log in on both.
  • Views and offline touches. A path holds visits to your site. An ad that was seen but not clicked, a podcast, a friend's recommendation and a parcel insert are invisible. Private sharing alone is a large blind spot, described in dark social.

GA4 adds one rule of its own. All its attribution models exclude direct visits from credit, unless the path consists only of direct visits.2 So in GA4, the customer who typed your address as her last step does not give credit to "Direct". The credit goes to the last channel before it.

Example: how many Shannonside orders have a path at all

In one month Shannonside's shop records 1,980 orders. Callum's own visit records, which only link visits for browsers that accepted analytics cookies, hold a usable path for 1,540 of them. That is 1,540÷1,980=0.7781{,}540 \div 1{,}980 = 0.778, so about 78% of orders have a path, and 22% have none. Every attribution figure in this chapter is a share of those 1,540 orders, not of all 1,980. The ratio is an ordinary proportion, explained in Foundations: ratios and rates. Callum adds a line to every attribution report: "Based on 1,540 of 1,980 orders (78%)." That one line stops anyone treating the credited numbers as the whole shop.

Rule based models: five ways to share one order

A rule based model shares the credit by a fixed rule that someone chose. Five are common:

  • Last click: the last channel before the purchase gets everything.
  • First click: the first channel gets everything.
  • Linear: every touchpoint gets an equal share.
  • Position based: the first and last get 40% each, and the touchpoints in between share the remaining 20%.
  • Time decay: touchpoints closer to the purchase get more, and the weight halves every so many days.

Time decay is the only one that needs a formula. Each touchpoint ii gets a raw weight, and the shares are the raw weights divided by their sum:

wi=2−ti/h,si=wi∑j=1nwjw_i = 2^{-t_i / h}, \qquad s_i = \frac{w_i}{\sum_{j=1}^{n} w_j}

where wiw_i is the raw weight of touchpoint ii, tit_i is the number of days between touchpoint ii and the purchase, hh is the half life in days (after hh days a touchpoint counts half as much), nn is the number of touchpoints on the path, and sis_i is the share of the credit touchpoint ii receives. The halving is exponential decay, covered in Foundations: logarithms, and dividing by the sum turns weights into shares, as in Foundations: percentages.

None of these rules is right. Each one encodes an opinion about which touch matters, so the honest habit is to look at more than one.

Example: the €112 order under five rules

The path from the opening, with the number of days before the purchase:

  1. Paid social (Instagram ad click), 16 days before.
  2. Organic search, 7 days before.
  3. Email (newsletter click), 1 day before.
  4. Paid search (brand ad click), on the day.

Last click: paid search gets €112.

First click: paid social gets €112.

Linear: four touchpoints, so each gets 112÷4=€28112 \div 4 = €28.

Position based: paid social gets 40%, so 0.40×112=€44.800.40 \times 112 = €44.80. Paid search gets 40%, also €44.80. The two in the middle share 20%, so 10% each: organic search €11.20 and email €11.20. Check: 44.80+11.20+11.20+44.80=112.0044.80 + 11.20 + 11.20 + 44.80 = 112.00.

Time decay with a half life of seven days. The raw weights:

wsocial=2−16/7=0.2051,worganic=2−7/7=0.5,wemail=2−1/7=0.9057,wpaid=20=1w_{\text{social}} = 2^{-16/7} = 0.2051, \quad w_{\text{organic}} = 2^{-7/7} = 0.5, \quad w_{\text{email}} = 2^{-1/7} = 0.9057, \quad w_{\text{paid}} = 2^{0} = 1

where each ww is the raw weight from the formula above, with tt set to that touchpoint's days before the purchase and h=7h = 7. Their sum is 0.2051+0.5+0.9057+1=2.61080.2051 + 0.5 + 0.9057 + 1 = 2.6108. Divide each weight by 2.6108 and multiply by €112:

TouchpointWeightShareCredit
Paid social0.20517.9%€8.80
Organic search0.500019.2%€21.45
Email0.905734.7%€38.85
Paid search1.000038.3%€42.90
Total2.6108100%€112.00

The same order gives paid social anything from €0 to €112, depending only on the rule. Nothing about the customer changed.

The same month under four models

One order is a curiosity. A month of orders shows the pattern. When Callum runs the four models over all 1,540 paths, the totals per model are identical, because every model shares out the same orders. What moves is the split between channels.

Example: Shannonside's 1,540 orders, credited four ways

Callum computes the credit from the shop's own visit records (the SQL is further down). Each column sums to 1,540:

ChannelLast clickFirst clickLinearTime decay
Paid search430380410425
Paid social150390260200
Organic search360420390370
Email27090180235
Direct230160200215
Other10010010095
Total1,5401,5401,5401,540
Grouped bar chart of Shannonside Home's 1,540 orders with a known path in one invented month, credited to six channels under four attribution models. Paid search: last click 430, first click 380, linear 410, time decay 425. Paid social: 150, 390, 260 and 200. Organic search: 360, 420, 390 and 370. Email: 270, 90, 180 and 235. Direct: 230, 160, 200 and 215. Other: 100, 100, 100 and 95. Paid social and email swing the most: paid social opens journeys, email closes them. Tap or click to open full screen and move around

Two channels swing hard. Paid social goes from 150 orders under last click to 390 under first click, a factor of 390÷150=2.6390 \div 150 = 2.6. Email goes the other way, from 270 to 90. The reading is not that one model is right. The reading is about roles: at Shannonside, Meta opens journeys and email closes them, and paid search sits steadily in the middle and at the end. That is useful for planning creative and timing. It still says nothing about what any channel causes.

Data driven attribution in GA4 and Google Ads

Today GA4 offers three models in its attribution settings: data driven, paid and organic last click, and Google paid channels last click. First click, linear, time decay and position based were removed from GA4 in November 2023.2 Google Ads followed the same path: it supports last click and data driven, and conversion actions that used the retired rule based models were upgraded to data driven.3 So if you want the four rule based views from the previous section, you compute them yourself from your own data. GA4 will not show them any more.

Data driven attribution learns the shares from your own account's data instead of using a fixed rule. Google describes it as machine learning that evaluates both converting and non converting paths, with a counterfactual approach that compares what happened with what could have happened, and gives credit by how much each touchpoint changes the likelihood of a key event.2 Two details matter in practice. Credit can be reattributed for up to seven days after the conversion, so last week's channel numbers can still move.2 And GA4's attribution settings say which channels may receive credit at all: Google paid channels only, or paid and organic.4

Google does not publish the full algorithm. The textbook version of the counterfactual idea is the Shapley value from cooperative game theory, which Lloyd Shapley described in 1951.5 It asks: if channels joined the journey in every possible order, how much would each one add on average? The formula for two channels is short enough to work by hand:

ϕA=12[v({A})−v(∅)]+12[v({A,B})−v({B})]\phi_A = \tfrac{1}{2}\big[v(\{A\}) - v(\varnothing)\big] + \tfrac{1}{2}\big[v(\{A,B\}) - v(\{B\})\big]

where ϕA\phi_A is the credit channel AA receives, v(S)v(S) is the conversion rate of visitors exposed to exactly the set of channels SS, v(∅)v(\varnothing) is the conversion rate with neither channel, and the two halves are AA's added value when it comes first and when it comes second. It is an average of two possible outcomes, the idea behind Foundations: expected value.

Example: sharing credit between Meta and Google, the Shapley way

This is an illustration of the idea, with invented rates, not Google's own computation. Among Shannonside's visitors in one month:

  • Neither channel touched them: conversion rate 0.5%.
  • Only Meta: 1.0%.
  • Only Google Ads: 2.0%.
  • Both: 3.6%.

Meta's added value when it comes first is 1.0−0.5=0.51.0 - 0.5 = 0.5 points. When it comes second, after Google: 3.6−2.0=1.63.6 - 2.0 = 1.6 points. Its Shapley credit is the average:

ϕMeta=12(0.5)+12(1.6)=1.05\phi_{\text{Meta}} = \tfrac{1}{2}(0.5) + \tfrac{1}{2}(1.6) = 1.05

where ϕMeta\phi_{\text{Meta}} is Meta's credit in percentage points of conversion rate. Google's added value: first, 2.0−0.5=1.52.0 - 0.5 = 1.5 points; second, after Meta, 3.6−1.0=2.63.6 - 1.0 = 2.6 points. So

ϕGoogle=12(1.5)+12(2.6)=2.05\phi_{\text{Google}} = \tfrac{1}{2}(1.5) + \tfrac{1}{2}(2.6) = 2.05

with ϕGoogle\phi_{\text{Google}} the same kind of credit for Google Ads. The two credits add up to the full gap between exposed to both and exposed to neither: 1.05+2.05=3.1=3.6−0.51.05 + 2.05 = 3.1 = 3.6 - 0.5. As shares, Meta gets 1.05÷3.1=33.9%1.05 \div 3.1 = 33.9\% and Google 66.1%66.1\%.

Now the catch. Those conversion rates come from people who were exposed, and exposure is not random. Google's brand ads are shown to people already searching for Shannonside, who were likely to buy anyway. Meta's retargeting is shown to people who already visited. So "exposed to Google" partly means "already keen", and the Shapley shares inherit that bias. A large study of 15 advertising experiments at Facebook found that observational methods, even with rich data, often failed to recover the effect that the randomised experiments measured.6 The deeper reason is covered in causal inference in marketing. Data driven attribution is a better description than a fixed rule. It is still a description.

Lookback windows and dates decide what gets counted

A lookback window, also called a conversion window, is how far back from a purchase a system looks for touchpoints that may take credit. A click outside the window simply does not exist for that system.

The defaults differ, and they are worth writing down:

SystemSettingDefaultOptions
GA4Acquisition key events (first visit, first open)30 days7 or 30 days4
GA4All other key events, including purchase90 days30, 60 or 90 days4
Google AdsClick through30 days1 to 90 days, depending on the source7
Google AdsView through1 day1 to 30 days7
Google AdsEngaged view (video)3 days1 to 30 days7
MetaAttribution setting7 day click, 1 day viewthe API offers 1, 7 and 28 day click, 1 day view and 1 day engaged view1

Meta also stopped returning the 7 day view and 28 day view windows through its reporting API from 12 January 2026.8 If an old report of yours used them, its numbers cannot be reproduced today.

Dates add a second trap. Google Ads has always reported conversions on the date of the ad click, not the date of the purchase. Newer "by conversion time" columns show them on the day they actually happened.9 Your shop counts orders on the day they were placed. So a click on 28 February and a purchase on 3 March is a February conversion in Google Ads' standard columns and a March order in your shop. The previous chapter, when analytics, ads and orders disagree, works through this gap in reconciliation. For attribution, the rule is simpler: never compare channels measured with different windows, and always say the window next to the number.

Example: shortening the window at Shannonside

Niamh reads that "most people decide within a month" and asks Callum to shorten GA4's purchase window from 90 to 30 days. Callum checks the paths first. Of the 1,540 paths, 210 have their first touch more than 30 days before the purchase. In 160 of those, the old first touch was paid social: someone clicked an Instagram ad in spring and bought a sideboard five weeks later.

With a 30 day window, those 160 first touches fall out. Under first click, paid social drops from 390 orders to 390−160=230390 - 160 = 230. Nothing changed in the shop. The window cut off the start of the slowest journeys, and the slowest journeys at a homeware shop are the furniture ones, with the biggest baskets. Callum keeps 90 days and adds the window to the report title.

Every platform marks its own homework

Each advertising platform reports the conversions it can link to its own ads, inside its own windows, counted its own way. It does not deduct the orders another platform also claims, because it cannot see them. So the claims overlap, and their sum regularly exceeds the shop's real orders.

So add up the platforms' claims every month, put the sum next to your real order count, and treat each platform's ROAS as an input to its bidding, never as its worth.

Example: Shannonside's month of claims

In the same month, the systems report:

  • Google Ads: 1,000 conversions.
  • Meta: 600 conversions, of which 190 are one day view through.
  • The newsletter tool: 380 conversions (it counts a purchase after any email click within its own window).

Their sum is 1,000+600+380=1,9801{,}000 + 600 + 380 = 1{,}980 orders. The shop also holds 1,980 orders in total, from every channel including organic search and direct. When Callum matches each order against the click identifiers stored with it, only 1,150 distinct orders had any paid ad touch at all, and GA4's data driven model credits the three channels with 860 of the 1,540 orders it can see. The ROAS, POAS and MER chapter works through that deduplication step by step.

Bar chart of one invented month at Shannonside Home. Google Ads claims 1,000 conversions, Meta 600 and the newsletter tool 380. Their sum is 1,980, exactly the number of orders the shop recorded from all channels together. Matching orders to stored click identifiers shows that only 1,150 orders had any paid ad touch. The claims overlap, so their sum equals the whole shop. Tap or click to open full screen and move around

The three tools together claim 1,980÷1,980=1.001{,}980 \div 1{,}980 = 1.00 of the shop: every single order, as if organic search, direct visits and referrals brought in nothing. Google and Meta alone claim 1,000+600=1,6001{,}000 + 600 = 1{,}600 orders, while only 1,150 orders had a paid touch, so 1,600−1,150=4501{,}600 - 1{,}150 = 450 claims are double counted. Both figures are credit, and neither is cause. Callum's monthly report now shows the platform sum next to the order count.

The brand search trap

The clearest case of credit without cause is the ad on your own name. When someone searches "Shannonside Home", your organic result is usually first anyway. A paid ad above it collects the click, and with it a very high ROAS, because the people searching your name were going to buy at a high rate.

eBay tested exactly this. In large field experiments it switched off brand keyword ads on two search engines, and found no measurable short term benefit from them. For non brand keywords, the ads mostly reached frequent users who would have bought anyway, and the average return was negative.10 One fair caveat: a shop whose competitors bid on its name can lose the top spot when it stops, so the answer for a small shop can differ. That is exactly why it is a question to test, not to assume.

There is a quick calculation that tells you how much of a campaign's claim must be real for it to pay. Call it the break even incrementality:

q∗=CN×mq^{*} = \frac{C}{N \times m}

where q∗q^{*} is the share of the claimed conversions that must be truly incremental for the campaign to cover its cost, CC is the campaign's spend, NN is the number of conversions the platform claims, and mm is the gross margin earned per order. It is a ratio of cost to claimed profit, see Foundations: ratios and rates. The fuller margin per order, after delivery, payment fees and returns, is worked out in unit economics per order. Using that fuller margin makes the test stricter.

Example: Shannonside's brand campaign

Shannonside spends €1,750 a month on its brand search campaign. Google Ads claims 200 conversions, worth 200×84=€16,800200 \times 84 = €16{,}800, a ROAS of 16,800÷1,750=9.616{,}800 \div 1{,}750 = 9.6. On paper it looks grand, the best money in the account.

The gross margin per order is 0.52×84=€43.680.52 \times 84 = €43.68. So q∗=1,750÷(200×43.68)=1,750÷8,736=0.200q^{*} = 1{,}750 \div (200 \times 43.68) = 1{,}750 \div 8{,}736 = 0.200. Only 20% of the claimed conversions, about 40 orders, need to be truly caused by the ad for it to break even on gross margin. That is a fair hurdle, and the eBay result says it is not a safe one. Callum does not switch the campaign off on a hunch. He puts it on the list of things to test, which is where the second half of this chapter starts.

Incrementality: the only number that should move a budget

Incrementality is the share of a channel's sales that would not have happened without it. You measure it by comparing two groups that differ only in whether they got the channel: a test group that receives it and a control group that does not. Because the groups are split at random, any difference in sales between them is caused by the channel.

Three numbers come out of a test:

Δ=rT−rC,I=Δ×nT,iROAS=I×vˉC\Delta = r_T - r_C, \qquad I = \Delta \times n_T, \qquad \text{iROAS} = \frac{I \times \bar{v}}{C}

where rTr_T is the conversion rate in the test group, rCr_C is the conversion rate in the control group, Δ\Delta is the difference between them (the lift in percentage points), nTn_T is the number of people in the test group, II is the number of incremental orders, vˉ\bar{v} is the average order value, CC is what the channel cost during the test, and iROAS is the incremental return on ad spend. These are differences and ratios of rates, covered in Foundations: ratios and rates.

One more number connects the test back to the daily reports. The incrementality factor is the measured incremental orders divided by the orders the platform claimed for the same people and period:

k=INk = \frac{I}{N}

where kk is the incrementality factor, II the incremental orders from the test and NN the conversions the platform claimed, one more ratio from Foundations: ratios and rates. Multiply a platform's future claims by kk and you get a calibrated figure you can budget with, until the next test.

Randomised tests in advertising are noisy, and it is better to know that before you run one. Lewis and Rao analysed 25 large field experiments with retailers and brokerages and found that the median confidence interval on the return on investment was more than 100 percentage points wide.11 Individual purchases vary so much that a modest ad effect drowns in the noise unless the test is large or long. Plan for that, or the test will tell you nothing.

Google and Meta also run randomised lift studies inside their own systems, for accounts that qualify. Five ways to prove a campaign actually worked describes what each offers. Below are the two tests a shop can run on its own, at any size, and read in its own orders.

Holdout tests on your own customer list

The simplest incrementality test a shop can run uses its own customers. You split the list at random, show the ads to one part, hold the other part back, and count orders in your own shop database. No platform report is needed to read the result. Five ways to prove a campaign actually worked shows the same design on an email list. Here it runs on a paid social audience, which is where shops most often overpay for credit.

The split must be random and stable: the same customer lands in the same group every time, and nobody chooses who goes where. A hash of the customer number does that without a lookup table:

require "digest"

module Holdout
  # Same customer, same group, every time, with no table to keep
  def self.control?(customer_id, test:, percent:)
    Digest::SHA256.hexdigest("#{test}:#{customer_id}").to_i(16) % 100 < percent
  end
end

# Example: everyone who lands in the 10% control is left out of the audience upload
Holdout.control?(48_213, test: "meta-customers-2027q2", percent: 10)

The test name goes into the hash, so each new test reshuffles the groups. Callum keeps the control customers out of the audience file that goes to Meta, and leaves everything else in the shop the same for both groups: same newsletter, same prices, same website.

Then he measures the difference and its uncertainty. The confidence interval for a difference of two rates:

Δ±1.96rT(1−rT)nT+rC(1−rC)nC\Delta \pm 1.96 \sqrt{\frac{r_T(1-r_T)}{n_T} + \frac{r_C(1-r_C)}{n_C}}

where Δ\Delta is the difference in conversion rates, rTr_T and rCr_C are the two groups' rates, nTn_T and nCn_C their sizes, and 1.96 is the multiplier for a 95% interval. Foundations: confidence intervals explains where the 1.96 comes from, and Foundations: sample size why small groups give wide intervals. In Python, the whole calculation is six lines:

from math import sqrt

def lift_interval(orders_t, n_t, orders_c, n_c, z=1.96):
    r_t, r_c = orders_t / n_t, orders_c / n_c
    diff = r_t - r_c
    se = sqrt(r_t * (1 - r_t) / n_t + r_c * (1 - r_c) / n_c)
    return round(diff, 4), round(diff - z * se, 4), round(diff + z * se, 4)

print(lift_interval(1296, 21600, 132, 2400))  # (0.005, -0.0047, 0.0147)

Example: Meta ads to past customers, tested twice

The retargeting line is a Meta campaign to past customers who agreed to marketing: 24,000 people. Over four weeks it costs €2,820, and Meta claims 380 purchases for it.

First test: four weeks, 10% held back. The test group has 21,600 customers, the control 2,400. In the shop database, 1,296 test customers ordered (6.0%) and 132 control customers ordered (5.5%).

  1. The lift: Δ=0.060−0.055=0.005\Delta = 0.060 - 0.055 = 0.005, half a percentage point.
  2. Incremental orders: I=0.005×21,600=108I = 0.005 \times 21{,}600 = 108.
  3. The standard error: 0.06×0.94/21,600+0.055×0.945/2,400=0.00000261+0.00002166=0.00493\sqrt{0.06 \times 0.94 / 21{,}600 + 0.055 \times 0.945 / 2{,}400} = \sqrt{0.00000261 + 0.00002166} = 0.00493.
  4. The 95% interval: 0.005±1.96×0.004930.005 \pm 1.96 \times 0.00493, so from −0.0047-0.0047 to +0.0147+0.0147.

The interval runs from minus 0.47 points to plus 1.47 points. It includes zero. In orders, the effect could be anything from about −0.0047×21,600=−101-0.0047 \times 21{,}600 = -101 to +0.0147×21,600=+317+0.0147 \times 21{,}600 = +317. The point estimate of 108 looks precise, and it is not. This is the Lewis and Rao problem in miniature: the control group of 2,400 is too small for an effect of half a point.

Second test: twelve weeks, 20% held back. Callum doubles the control share and triples the length. Test group 19,200, control 4,800. Over twelve weeks, 3,072 test customers ordered (16.0%) and 696 control customers ordered (14.5%). Meta claimed 1,150 purchases for the campaign over the period, which cost €8,450.

  1. Δ=0.160−0.145=0.015\Delta = 0.160 - 0.145 = 0.015.
  2. I=0.015×19,200=288I = 0.015 \times 19{,}200 = 288 incremental orders.
  3. Standard error: 0.16×0.84/19,200+0.145×0.855/4,800=0.0000070+0.0000258=0.00573\sqrt{0.16 \times 0.84 / 19{,}200 + 0.145 \times 0.855 / 4{,}800} = \sqrt{0.0000070 + 0.0000258} = 0.00573.
  4. 95% interval: 0.015±1.96×0.005730.015 \pm 1.96 \times 0.00573, from 0.00380.0038 to 0.02620.0262. It excludes zero.
  5. Incremental revenue: 288×84=€24,192288 \times 84 = €24{,}192. iROAS: 24,192÷8,450=2.8624{,}192 \div 8{,}450 = 2.86.
  6. Incremental gross margin: 0.52×24,192=€12,579.840.52 \times 24{,}192 = €12{,}579.84, against €8,450 of spend. The campaign pays.
  7. Incrementality factor: k=288÷1,150=0.25k = 288 \div 1{,}150 = 0.25.

So the campaign works, and Meta's own report claims four times what it causes. Both statements are true at once. From now on, Callum multiplies Meta's claims for this campaign by 0.25 in the budget sheet, and keeps letting Meta optimise on its own numbers.

Geo experiments: switching a channel off in some places

Some channels cannot be held back from a list. You cannot keep a random 10% of the country away from Google Shopping. You can, though, keep some regions away from it. A geo experiment assigns non overlapping regions at random to test or control, which is how Google's researchers described the design in 2011.12 An online shop is well placed to run one, because every order carries a delivery Eircode.

The analysis builds a counterfactual: what the test regions would have sold without the change. Google's time based regression method predicts that counterfactual series from the control regions, using the weeks before the test to learn the relationship.13 Meta publishes GeoLift, an open source R package for the same job, based on synthetic control methods, which build the counterfactual from a weighted blend of control regions.14 Both are worth using once you run tests regularly. The simplest version, which shows the logic, is a ratio:

y^t=ρ xt,ρ=∑prey∑prex\hat{y}_t = \rho \, x_t, \qquad \rho = \frac{\sum_{\text{pre}} y}{\sum_{\text{pre}} x}

where y^t\hat{y}_t is the predicted revenue of the test regions in week tt, xtx_t is the actual revenue of the control regions in week tt, ρ\rho is the ratio between the two groups learned in the weeks before the test, and the sums run over the pre test weeks only. The effect is the gap between y^t\hat{y}_t and the actual test revenue during the test. Indexing one series to another is covered in Foundations: indexing and base rates.

A test that switches spend off is called a go dark test. It answers the question "what do we lose without it?", which is the right question for a channel you already pay for. It also saves money while it runs.

Example: switching off non brand Shopping ads in a quarter of the country

Callum groups Eircode routing keys (the first three characters of an Eircode) into matched pairs with similar revenue and trend over the previous year, and a random draw sends one of each pair to the test group. The test regions carry about 23% of Shannonside's revenue. For four weeks, Shannonside's non brand Google Shopping campaign excludes the test regions. Everything else stays the same everywhere.

Revenue by week, in euro:

WeekControl regionsTest regionsPredicted testGap
Pre 129,2008,6008,760
Pre 228,5008,7608,550
Pre 330,5009,3309,150
Pre 429,9008,8408,970
Pre 529,0008,5608,700
Pre 630,2009,2109,060
Pre 729,5008,7608,850
Pre 829,5008,8308,850
Test 130,0006,9009,0002,100
Test 230,7007,1109,2102,100
Test 329,8006,8808,9402,060
Test 430,5007,0509,1502,100
  1. The ratio from the eight pre weeks: control revenue sums to €236,300 and test revenue to €70,890, so ρ=70,890÷236,300=0.30\rho = 70{,}890 \div 236{,}300 = 0.30.
  2. Predicted test revenue in each test week is 0.300.30 times the control revenue that week, for example 0.30×30,000=9,0000.30 \times 30{,}000 = 9{,}000.
  3. Predicted test revenue over the four test weeks: 9,000+9,210+8,940+9,150=€36,3009{,}000 + 9{,}210 + 8{,}940 + 9{,}150 = €36{,}300. Actual: 6,900+7,110+6,880+7,050=€27,9406{,}900 + 7{,}110 + 6{,}880 + 7{,}050 = €27{,}940.
  4. Revenue lost without the ads: 36,300−27,940=€8,36036{,}300 - 27{,}940 = €8{,}360.
  5. Spend saved in the test regions: €340 a week (the campaign costs €6,500 a month nationally), so €1,360 over four weeks.
  6. iROAS: 8,360÷1,360=6.158{,}360 \div 1{,}360 = 6.15. Incremental gross margin: 0.52×8,360=€4,347.200.52 \times 8{,}360 = €4{,}347.20, which is €2,987.20 more than the €1,360 spent.
  7. Google Ads claims a ROAS of 7.24 for this campaign (560 conversions a month), which in these regions would be 7.24×1,360=€9,8467.24 \times 1{,}360 = €9{,}846 over four weeks. The incrementality factor: k=8,360÷9,846=0.85k = 8{,}360 \div 9{,}846 = 0.85.

How sure is the €8,360? In the pre weeks the prediction missed by between €20 and €210 a week, with a standard deviation of about €156. Over four weeks that is roughly 156×4=€312156 \times \sqrt{4} = €312 of noise, so a rough 95% range for the loss is 8,360±1.96×3128{,}360 \pm 1.96 \times 312, about €7,750 to €8,970. Even at the low end, 0.52×7,750=€4,0300.52 \times 7{,}750 = €4{,}030 of gross margin is far above the €1,360 spent. This rough range ignores the uncertainty in ρ\rho itself, which time based regression and GeoLift handle properly, so the true range is wider still. See Foundations: spread for the standard deviation.

Line chart of weekly revenue in the test regions of an invented geo experiment at Shannonside Home, over eight weeks before and four weeks during the test. The actual revenue line runs close to the predicted line in the eight pre weeks, between 8,560 and 9,330 euro. In the four test weeks, with non brand Shopping ads switched off, actual revenue is 6,900, 7,110, 6,880 and 7,050 euro, while the prediction from the control regions is 9,000, 9,210, 8,940 and 9,150. The gap totals 8,360 euro over four weeks. Tap or click to open full screen and move around

The decision follows from the range, not the point. Non brand Shopping clearly pays, and Google's report claims only about 18% more than it causes, since 9,846÷8,360=1.189{,}846 \div 8{,}360 = 1.18. That is a far better ratio than the retargeting line on Meta, and it makes sense: generic Shopping ads reach people who were not already on their way to Shannonside. Callum keeps the campaign. Whether it should get more money is a question about the next pound, not the average one, which allocating an eCommerce ad budget answers.

Marketing mix modelling, the third leg

Attribution describes journeys, and tests measure one channel at one moment. A marketing mix model (MMM) looks at all channels at once over years of weekly data, and estimates how much each one adds, including the ones with no clicks at all, such as print, podcasts or a sponsorship. It needs no cookies, because its input is one row per week. The price is resolution and history: it works at channel level, and it needs about two years of weekly data to say anything firm.

The best setup uses all three together. Tests give clean, causal numbers for single channels. The model spreads that knowledge across all channels and spend levels, and the tests keep the model honest. Media mix modelling, adstock and where the next pound goes explains the model in depth. How to turn the results into a budget, channel by channel, is the subject of allocating an eCommerce ad budget.

Example: when Shannonside is ready for a model

Shannonside has 14 months of clean weekly data: spend per channel, orders, revenue, promotions and bank holidays. Meta and Google spend rose together over the year, so a model could not yet tell them apart. Callum keeps the weekly table growing and runs one test a quarter. In ten months there will be two years of history and a second round of line by line tests to calibrate a model with. That is the moment to build it.

Computing first and last touch from your own data

GA4 no longer shows first click or linear, and its paths only cover consented browsers anyway. If the shop records its own visits, you can compute every rule based model yourself, and check GA4 against it. In a Rails shop, a common way is the Ahoy gem, which stores visits in your own database and can link an order to the visit that placed it through an ahoy_visit_id column on the orders table.15 Callum adds that column to Solidus's spree_orders table. Each visit carries a visitor_token, so all earlier visits by the same browser can be found.

The query below shares each March order between the channels on its 30 day path, under first touch, last touch and linear. It runs on PostgreSQL:

WITH touches AS (
  SELECT o.id AS order_id,
         CASE
           WHEN v.landing_page LIKE '%gclid=%'                 THEN 'Paid search'
           WHEN v.utm_medium IN ('cpc', 'shopping')            THEN 'Paid search'
           WHEN v.utm_medium = 'paid_social'                   THEN 'Paid social'
           WHEN v.utm_medium = 'email'                         THEN 'Email'
           WHEN v.referring_domain ~ '(google|bing|duckduckgo)\.' THEN 'Organic search'
           WHEN v.referring_domain IS NULL                     THEN 'Direct'
           ELSE 'Other'
         END AS channel,
         ROW_NUMBER() OVER (PARTITION BY o.id ORDER BY v.started_at)      AS pos_first,
         ROW_NUMBER() OVER (PARTITION BY o.id ORDER BY v.started_at DESC) AS pos_last,
         COUNT(*)     OVER (PARTITION BY o.id)                            AS n_touches
  FROM spree_orders o
  JOIN ahoy_visits buyer ON buyer.id = o.ahoy_visit_id
  JOIN ahoy_visits v     ON v.visitor_token = buyer.visitor_token
  WHERE o.completed_at >= '2027-03-01' AND o.completed_at < '2027-04-01'
    AND v.started_at <= o.completed_at
    AND v.started_at >  o.completed_at - INTERVAL '30 days'
)
SELECT channel,
       SUM(CASE WHEN pos_first = 1 THEN 1 ELSE 0 END) AS first_touch,
       SUM(CASE WHEN pos_last  = 1 THEN 1 ELSE 0 END) AS last_touch,
       ROUND(SUM(1.0 / n_touches), 1)                 AS linear
FROM touches
GROUP BY channel
ORDER BY last_touch DESC;

The CASE block turns each visit into a channel, and every report depends on it, so keep it in one place. The joins find the visit that placed the order, then every visit by the same browser. The window functions number each order's visits from both ends and count them. The WHERE clause is the 30 day lookback window written in code. The final SELECT counts first and last touches per channel and gives each visit 1/n1 / n of an order for the linear model.

Two differences from GA4 remain. This query gives direct visits credit, which GA4 does not. To match GA4, drop direct visits from every path that also holds another channel. And the browser token only exists where the visitor accepted the cookie, or where the law allows it without consent, which is the next section.

Example: checking GA4 against the shop

Callum runs the query for March and compares its last touch column with GA4's paid and organic last click report for the same month. Paid search: 430 in his query, 452 in GA4. The gap of 22 orders is close to the number of March paths that ended on a direct visit after a paid search click, which GA4 hands to paid search and his query hands to direct. With that one rule aligned, the two agree within a handful of orders. Now he trusts both, and he can compute first click and linear, which GA4 no longer offers.

Path data needs an identifier stored in the visitor's browser, and storing or reading one is regulated. This is general information, not legal advice.

In Ireland, Regulation 5(3) of the ePrivacy Regulations, S.I. No. 336 of 2011, allows storing information on a user's device, or reading it, only with consent based on clear and comprehensive information that names the purposes.16 The exceptions cover only what is needed to carry a communication or what is strictly necessary for a service the user asked for. Irish law has no exception for statistics, so even a self hosted visit log that sets a cookie needs consent here, and advertising pixels certainly do. The Data Protection Commission (DPC) enforces these rules.

Uploading a customer list to an advertising platform, as in the holdout example, is processing of personal data and needs a lawful basis under Article 6 of the GDPR.17 That is why the Shannonside example only uses customers who agreed to marketing. The rest of the consent picture, including what may run before a visitor decides, is in the first chapter of this series and in event tracking and consent mode.

Incrementality tests have one quiet advantage here. A geo test needs nothing but orders by Eircode routing key, which the shop holds anyway to deliver them. It measures the effect of advertising without following anyone.

Shannonside's 1,540 paths out of 1,980 orders reflect declined consent and cross device journeys together. Niamh asks whether a pushier cookie banner would raise the share. Callum talks her out of it: under Article 4(11) of the GDPR, consent only counts if it is freely given,17 and a banner that steers people towards yes puts exactly that at risk. So the 22% without a path stay dark. He works out what that costs the attribution report: 1,980−1,540=4401{,}980 - 1{,}540 = 440 orders, or 440×84=€36,960440 \times 84 = €36{,}960 of revenue a month with no path. For the budget question it makes no difference, because the geo test counted those orders by Eircode routing key, cookie or no cookie.

A practical attribution stack for a shop this size

Here is the setup that fits a shop like Shannonside, with around 2,000 orders and €16,500 of ad spend a month. Each question gets the tool that can actually answer it:

QuestionToolHow often
How much did we really sell?Shop orders, net of refundsDaily
What do journeys look like, which channels open and close?GA4 data driven next to your own first, last and linearMonthly
What should each platform bid on?The platform's own conversions, sent from the serverContinuous
Does a channel cause sales, and how many?Customer list holdout or geo testOne test a quarter
How do the platforms' claims translate into real orders?Incrementality factor kk from the latest testAfter every test
How should the whole budget be split?Marketing mix model, calibrated with the testsYearly, once two years of data exist

The flow below turns the table into a decision: which method fits the question in front of you.

Tap or click to open full screen and move around

Example: Shannonside's budget sheet, every line tested

The two tests above cover the retargeting line and non brand Shopping. Callum ran the same kind of geo test on the other three lines: brand search, non brand search and Meta prospecting, which has no list to split. His monthly budget sheet now has the incremental figure next to each platform claim.

LineSpend a monthPlatform claimsFactor kkIncremental ordersCost per incremental order
Brand search€1,7502000.2550€35.00
Google Shopping, non brand€6,5005600.85475€13.68
Google search, non brand€2,3502400.83200€11.75
Meta prospecting€2,8501850.4991€31.32
Meta retargeting, past customers€3,0504150.25104€29.33
All five€16,5001,6000.58920€17.93

Each factor is incremental orders divided by the claim, for example 104÷415=0.25104 \div 415 = 0.25, and the cost per incremental order is spend divided by incremental orders, for example 3,050÷104=€29.333{,}050 \div 104 = €29.33. Google's three lines add up to 50+475+200=72550 + 475 + 200 = 725 incremental orders of the 1,000 it claims, and Meta's two lines to 91+104=19591 + 104 = 195 of 600.

Against the gross margin of €43.68 per order, every line pays. Against the contribution per order of €22.44, which also pays for delivery, payment fees and returns (worked out in the ROAS, POAS and MER chapter), only the two non brand Google lines earn. Brand search passes the gross margin hurdle of 40 orders from the brand section but not the contribution hurdle of about 78 orders, and both Meta lines cost more per incremental order than an order contributes. So Niamh's question, whether to move €2,000 from Meta to Google, has a sharper answer than either attribution report gave: the money to move is in retargeting and brand search, not in Meta as a whole. Where it goes next is a question of marginal returns, the subject of allocating an eCommerce ad budget.

Conclusion

Attribution and incrementality answer different questions. Attribution shares the credit for orders that happened, by a rule or a model, and it is the right tool for understanding journeys: which channels open them, which close them, how long people take. It is the wrong tool for budgets, because every path records what happened and never what would have happened without a channel.

GA4 now offers data driven and last click only, Google Ads the same, and every platform counts within its own windows and dates, so the platforms' claims overlap and their sum overstates the shop. Write down every window, compute the rule based views yourself from your own visit data if you want them, and always put the platforms' sum next to the real order count.

Incrementality is measured, not modelled: a random holdout on your own customer list, or a geo test that switches a channel off in some regions, read in your own order data. Expect noise, size the test for it, and decide on the interval, not the point. Then carry the result into daily work as an incrementality factor, and add a marketing mix model once you have two years of weekly history. That is the series in one line: count orders in the shop, describe with attribution, and decide with experiments.

If every platform claims your sales and you are not sure which spend actually works, book the free workshop: I set up your first holdout or geo test with you, read in your own orders, and the first two weeks of work are on me.

Sources

  1. 1.

    Meta, Ad Campaign Insights reference, action_attribution_windows (default 7d_click and 1d_view), Meta for Developers, checked 22 November 2026, https://developers.facebook.com/documentation/ads-commerce/marketing-api/reference/ad-campaign/insights

  2. 2.

    Google, Get started with attribution, Analytics Help, checked 22 November 2026, https://support.google.com/analytics/answer/10596866

  3. 3.

    Google, About attribution models, Google Ads Help, checked 22 November 2026, https://support.google.com/google-ads/answer/6259715

  4. 4.

    Google, Select attribution settings, Analytics Help, checked 22 November 2026, https://support.google.com/analytics/answer/10597962

  5. 5.

    Lloyd S. Shapley, Notes on the n-Person Game, II: The Value of an n-Person Game, RAND Corporation, RM-670, 1951, https://www.rand.org/pubs/research_memoranda/RM0670.html

  6. 6.

    Brett R. Gordon, Florian Zettelmeyer, Neha Bhargava and Dan Chapsky, A comparison of approaches to advertising measurement: evidence from big field experiments at Facebook, Marketing Science, volume 38, number 2, pages 193 to 225, 2019, working paper version, https://www.kellogg.northwestern.edu/faculty/gordon_b/files/fb_comparison.pdf

  7. 7.

    Google, About conversion windows, Google Ads Help, checked 22 November 2026, https://support.google.com/google-ads/answer/3123169

  8. 8.

    Meta, Ads Insights API metric availability updates, Meta for Developers blog, 16 October 2025, https://developers.facebook.com/blog/post/2025/10/16/ads-insights-api-metric-availability-updates/

  9. 9.

    Google, Understand conversions by time with new columns, Google Ads Help, checked 22 November 2026, https://support.google.com/google-ads/answer/9549009

  10. 10.

    Thomas Blake, Chris Nosko and Steven Tadelis, Consumer Heterogeneity and Paid Search Effectiveness: A Large-Scale Field Experiment, Econometrica, volume 83, number 1, pages 155 to 174, 2015, NBER working paper 20171, https://www.nber.org/papers/w20171

  11. 11.

    Randall A. Lewis and Justin M. Rao, The Unfavorable Economics of Measuring the Returns to Advertising, The Quarterly Journal of Economics, volume 130, number 4, pages 1941 to 1973, 2015, https://ideas.repec.org/a/oup/qjecon/v130y2015i4p1941-1973.html

  12. 12.

    Jon Vaver and Jim Koehler, Measuring Ad Effectiveness Using Geo Experiments, Google, 2011, https://research.google/pubs/measuring-ad-effectiveness-using-geo-experiments/

  13. 13.

    Jouni Kerman, Peng Wang and Jon Vaver, Estimating Ad Effectiveness using Geo Experiments in a Time-Based Regression Framework, Google, 2017, https://research.google/pubs/estimating-ad-effectiveness-using-geo-experiments-in-a-time-based-regression-framework/

  14. 14.

    Meta, GeoLift: an end to end geo experimental methodology based on synthetic control methods, R package, MIT licence, GitHub, checked 22 November 2026, https://github.com/facebookincubator/GeoLift

  15. 15.

    Andrew Kane, Ahoy: first party analytics for Rails (visitable orders and the ahoy_visit_id column), GitHub, checked 22 November 2026, https://github.com/ankane/ahoy

  16. 16.

    European Communities (Electronic Communications Networks and Services) (Privacy and Electronic Communications) Regulations 2011, S.I. No. 336 of 2011, Regulation 5, Irish Statute Book, checked 22 November 2026, https://www.irishstatutebook.ie/eli/2011/si/336/made/en/print

  17. 17.

    Regulation (EU) 2016/679 (General Data Protection Regulation), Articles 4 and 6, EUR-Lex, https://eur-lex.europa.eu/eli/reg/2016/679/oj