Guide · Advertising

Marketing attribution for online stores: the complete guide

What marketing attribution is, how it works, every model with a worked example, revenue vs profit attribution and how to choose a model for your store.

Updated · 11 min read

By the ROASaurus team

The short answer
  • Marketing attribution decides which ads, emails and visits get credit for an order, by recording the touchpoints before it and applying a model.
  • Single-touch models (first click, last click) give all credit to one touch; multi-touch models (linear, position-based, time decay) share it; data-driven models learn it from journeys.
  • Ad platforms each attribute by their own rules, so their conversions add up to more than the store's orders; an independent model counts each order once.
  • No model is true; pick one per question, keep it stable, and check it against incrementality tests or a marketing mix model.
  • Attribute profit, not only revenue: a channel that sells low-margin products can lead on ROAS and lose money.

A shopper sees an Instagram ad on Monday, searches your brand on Thursday, opens an email on Friday and buys on Saturday. Which of these sold the product? Marketing attribution is the method that answers that question, consistently, for every order. This guide covers what attribution is, how it works on a webshop, every common model with a worked example, revenue and advertising attribution, the problems that make it hard, and how to choose and use a model.

What is marketing attribution?

Marketing attribution assigns credit for a conversion (an order, a lead, a sign-up) to the marketing touchpoints that came before it: ad clicks, ad views, organic search visits, emails, affiliate links. Ecommerce attribution is the same for an online store, where the conversion is an order with a value. Revenue attribution goes one step further and splits the order's revenue across the touchpoints, so each channel and campaign gets a revenue figure and a ROAS.

The output is a table: per channel, campaign or ad, the orders and revenue credited to it under a chosen model, next to its spend.

How marketing attribution works

Capture touchesUTM tags, click ids (gclid, fbclid, ttclid) and referrers on each visit
Identify the visitorA first-party cookie, then email or customer id at checkout
Match the orderThe visitor id travels with the cart and arrives with the order
Apply a modelCredit is split across the touches in the lookback window
ReportOrders, revenue and ROAS per channel and campaign
The attribution chain on a webshop. A break at any step leaves the order unattributed or credited to Direct.

Two settings shape every result: the attribution model (how credit is split) and the lookback window (how far back a touch may be to count). A touch 40 days before the order counts under a 90-day window and not under a 7-day one.

Types of marketing attribution models

ModelHow credit is splitTends to favour
First clickAll to the first touchProspecting: social and display
Last clickAll to the last touchClosing channels: brand search, email, retargeting
Last non-direct clickAll to the last touch that is not a direct visitSame as last click, without Direct
LinearEqual shares to every touchChannels with many touches
Position-based (U-shaped)40% first, 40% last, 20% shared by the middleOpeners and closers
Time decayMore credit the closer a touch is to the orderLate touches
W-shapedEqual large shares to first touch, lead creation and order; the rest sharedStores with a lead step (sign-up, quiz)
Data-drivenLearned from converting and non-converting journeys (Markov chains, Shapley values)Touches that change the odds of buying

Swipe the table sideways to see every column.

Each model has its own glossary page: last-click attribution, and the models linked from the attribution model entry.

One €120 order under four modelsSample data

Journey: Meta ad click (day 1), Google search click (day 5), email click (day 6), Google search click (day 7), order on day 7.

Last click: Google€120
First click: Meta€120
Linear: Meta / Google / Email€30 / €60 / €30
Position-based: Meta / Google / Email€48 / €60 / €12
Credit to Meta, from lowest to highest€0 (last click) to €120 (first click)
Example numbers. Position-based: 40% to the first touch (Meta, €48), 40% to the last (Google, €48), 20% shared by the two middle touches (€12 each: email €12, Google €12). The same order makes Meta look worthless or essential depending on the model.

Why attribution matters for ecommerce

  • Budget: without attribution, budget follows the platform that claims the most conversions, and every platform claims a lot.
  • Creative and campaigns: knowing which campaigns start journeys and which close them stops you cutting the ones that fill the funnel.
  • One count: an independent model credits each order once, so channel totals add up to the store's real sales.
  • Profit: once orders are attributed, their costs can be too, giving profit per channel and campaign.
  • Bidding: better-matched conversions sent back to the platforms improve their optimisation.

How to choose the right ecommerce attribution model

Your situationStart withWhy
One main channel, short buying cycleLast click or last non-directFew touches; simple models agree
Spending on prospecting (social, video)Position-based or first click next to last clickShows which channels open journeys
Long consideration, many touchesTime decay or linearCredit spread over the journey
Enough orders and journeys (hundreds a month)Data-drivenLearns from your own paths
Brand search and email take most last-click creditLast non-direct plus a lift testSeparates closers from causes
Large share of spend on platforms without clicks (TV, podcasts)Marketing mix model next to attributionAttribution needs a trackable touch

Swipe the table sideways to see every column.

Whatever you choose, keep the model and window stable for comparisons over time, and look at two models side by side when deciding about a channel. If a channel only looks good under one model, be cautious with it.

Revenue attribution

What revenue attribution is

Revenue attribution credits the value of each order, not only the order count, to the touchpoints before it. A €200 order credited 50/50 gives each touch €100 of revenue. Summed per channel, it gives revenue per channel that adds up to total attributed revenue.

Revenue attribution vs conversion tracking

Conversion tracking
  • Records that a purchase happened
  • Sends it to a platform (pixel, Conversions API)
  • Each platform credits itself by its own rules
  • Answers: did my ads lead to purchases?
Revenue attribution
  • Joins all touches before each order
  • One model across every channel
  • Each order credited once
  • Answers: how much revenue did each channel bring?

They depend on each other: conversion tracking feeds the platforms' bidding; attribution decides your budget. See ecommerce ad tracking for the tracking side.

Why revenue attribution matters

Without itWith it
Platform-reported revenue adds up to more than total salesChannel revenue adds up to attributed sales
ROAS per platform is not comparableROAS per channel on one definition
Email and brand search look like the biggest earnersOpeners and closers visible side by side
Budget decisions by whoever shouts loudestBudget decisions on one table

Seven revenue attribution models for ecommerce

ModelRevenue goes toUse for
First clickThe first touchJudging prospecting
Last clickThe last touchJudging closing channels; comparing with platforms
Last non-direct clickThe last non-direct touchA default for stores with many direct visits
LinearEvery touch equallyA neutral view of all channels
Position-basedMostly the first and last touchBalancing openers and closers
Time decayRecent touches mostShort promotions and sales
Data-drivenTouches by their measured effectStores with enough journeys

Swipe the table sideways to see every column.

How to decide which revenue attribution model to use

Question you are answeringModel
Which channels find new customers?First click, on new-customer orders
Which channels close sales?Last click or last non-direct
How should the total budget be split?Data-driven or position-based, checked with MMM
Did this week's sale work?Time decay or last click, short window

Beyond revenue: attributing profit

Channel (fictional store)SpendAttributed revenueROASContribution after ads
Paid social€4,000€14,0003.5€1,600
Shopping ads€4,000€16,0004.0€800
Example numbers. Paid social sells products with a 40% margin before ads (€5,600 − €4,000); Shopping sells discounted best-sellers at 30% (€4,800 − €4,000). The lower-ROAS channel earns twice as much.

Swipe the table sideways to see every column.

Attributing profit needs the cost of each order (product cost, shipping, fees) next to its revenue. See Shopify profit tracking.

Advertising attribution

What advertising attribution is

Advertising attribution is attribution applied to paid media: which ad platform, campaign, ad set and ad gets credit for each order. Each platform does it for itself (Meta's default is 7-day click and 1-day view; Google Ads uses data-driven attribution by default), and an independent tool does it across all of them.

Benefits

  • Campaign-level ROAS and cost per order on the store's own order data.
  • A fair comparison between platforms that each report on their own terms.
  • Better signals for bidding when matched orders are sent back server-side.

Challenges in advertising attribution

  • Consent and privacy rules: visitors who decline cookies leave no trackable journey.
  • Browser limits: Safari and Firefox shorten cookie lifetimes and strip some click ids; iOS app tracking prompts limit in-app data.
  • Cross-device journeys: an ad seen on a phone and an order on a laptop look like two people unless the shopper logs in or leaves an email.
  • Views without clicks: platforms report view-through conversions that an outside tool cannot observe per impression.
  • Double counting: every platform claims the same order; summing platform conversions overstates sales.
  • Correlation, not causation: attribution shows which touches came before an order, not whether the order would have happened without them.

How to measure advertising attribution

  1. Fix tracking first

    UTMs on every non-Google link, server-side conversions, consent set up. Missing touches cannot be credited.

  2. Read platform reports as one view

    Useful for optimising inside a platform, not for comparing platforms.

  3. Use one independent model

    Attribute every order once across channels with a chosen model and window.

  4. Test incrementality

    Geo-lift or on/off tests show what a channel adds beyond what would have happened anyway.

  5. Calibrate with a marketing mix model

    An MMM uses spend and sales over time, without user tracking, to check what attribution credits.

Attribution tools for online stores

Attribution data comes from five kinds of tools, each with its own view:

  • Ad platforms (Meta Ads Manager, Google Ads, TikTok Ads Manager): their own conversions, their own rules.
  • Google Analytics 4: cross-channel, data-driven by default, but limited to sessions it recorded and without most costs.
  • Shopify's marketing reports: sales by marketing source and UTM campaign on Shopify's own data, with a choice of a few attribution models.
  • Independent attribution tools: first-party tracking joined to orders and spend from every platform, with several models and profit.
  • Marketing mix modelling tools: channel effects from aggregated spend and sales, for channels without clicks and as a check on attribution.

How to use attribution reports effectively

  1. Pick a default model and window

    And write them down. Change them only on purpose.

  2. Compare two models before a big decision

    For example last click and first click. A channel that is strong under both is safe to scale.

  3. Split new and returning customers

    Acquisition channels should be judged on new-customer orders.

  4. Look at journeys, not only totals

    Open a sample of orders and read their touches: it shows what the model does.

  5. Judge on profit

    ROAS against break-even ROAS, or contribution after ad spend per channel.

  6. Check against tests

    Run a lift test on the largest channel once a year.

Attribution on Shopify: data flow and where to find it

A dependable data flow

On Shopify the weak link is getting the touch from the first visit to the order. The reliable way is to capture UTMs and click ids first-party on the store's own domain, store a visitor id on the cart (as a cart attribute) and read it back from the order, so the match does not depend on the thank-you page loading. Fallbacks such as the customer's email (hashed) join visits across devices.

Consistent cart-level attribution

Because the visitor id travels with the cart, the attribution of an order is decided by data on the order itself. Express checkouts, closed tabs and slow payment returns then no longer break the link.

Observed touches, modelled views

Click-based models work on touches that were actually recorded. Credit for ad views is different: an outside tool cannot see which person saw which impression, so view credit is modelled from the views each platform reports. Know which of your numbers are observed and which are modelled.

Where to find attribution data

  • Shopify: Analytics › Reports, Marketing category, and the conversion summary on each order.
  • GA4: Advertising › Attribution (model comparison and conversion paths) and Admin › Attribution settings.
  • Ad platforms: the attribution setting column in each campaign report.

Marketing attribution in ROASaurus

In ROASaurusMarketing › Channels & campaigns › Attribution
  1. Install the ROASaurus Shopify app or tracking script: UTMs and click ids are captured first-party and the visitor id is written to the cart, so it arrives with the order.
  2. Open Marketing › Channels & campaigns › Attribution for orders, revenue and ROAS per channel and campaign.
  3. Choose one of 12 models in the top bar: last click, first click, last non-direct click, linear, linear paid, position-based, time decay, data-driven (Markov), data-driven (Shapley), Total Impact (post-purchase survey plus clicks), any click, or clicks & views.
  4. Set the lookback window (1 to 90 days or unlimited; 7 days by default), the conversion type, and whether to report by order date or click date.
  5. Open Profit › Orders › Journeys and pick an order to see its clicks, the time to convert, how it was matched and its credit under every model.
  6. Switch to Marketing › Profit per campaign to see contribution and POAS per campaign under the same model.
The ROASaurus Mac app showing Attribution: orders, revenue, ad spend and ROAS per channel under the chosen model. Fictional demo store, simulated data.
The ROASaurus iPhone app showing Attribution: orders, revenue, ad spend and ROAS per channel under the chosen model. Fictional demo store, simulated data.
Marketing › Attribution: orders, revenue and ROAS per channel under the chosen attribution model. Fictional demo store, simulated data.

View-through credit in the "clicks & views" model is modelled from the views each platform reports; it is not matched per impression.

Start freeOpen the live demo14-day trial of every feature, no credit card.

The ROASaurus Mac app showing Journeys: recent orders with their last click, touches and how they were matched. Fictional demo store, simulated data.
The ROASaurus iPhone app showing Journeys: recent orders with their last click, touches and how they were matched. Fictional demo store, simulated data.
Profit › Orders › Journeys: the clicks before each order and the time to convert. Fictional demo store, simulated data.

Sources

  1. Google Analytics Help: Get started with attribution
  2. Google Ads Help: About attribution models
  3. Meta Business Help: About attribution settings

More guides on advertising · All guides

FAQ

Questions, answered

More answers in the FAQ and the help center.

What is marketing attribution?

It is the method of giving credit for an order or lead to the marketing touchpoints before it, such as ad clicks, searches and emails, using a model that decides how the credit is split.

What is ecommerce attribution?

Marketing attribution for an online store: each order and its revenue are credited to the channels, campaigns and ads the shopper interacted with before buying.

What is revenue attribution?

Splitting the value of each order across its touchpoints under a model, so every channel gets attributed revenue and a ROAS that add up to total attributed sales.

Which attribution model should a Shopify store use?

There is no single right model. Many stores use last non-direct click as a default, compare it with first click or position-based for prospecting channels, and move to data-driven once they have enough orders.

Why do Meta and Google report more conversions than I have orders?

Each platform credits itself under its own window, often including views and modelled conversions, so the same order is claimed by several platforms. An independent model counts each order once.

What is a lookback window?

The period before an order in which a touch can receive credit, for example 7 or 30 days. Longer windows credit more early touches; shorter ones favour recent channels.

How is attribution different from incrementality?

Attribution shows which touches came before an order. Incrementality measures whether the order would have happened without the marketing, using lift tests or a marketing mix model.

Does attribution work with cookie consent?

Only for visitors whose journey may be recorded. Visitors who decline have no stored touches, so their orders are unattributed or credited without a click; aggregated methods such as MMM cover them.

Every sale, traced to the ad that earned it

Server-side tracking, profit and lifetime value in one app. Free plan, no credit card.