Data Science
What Is Marketing Channel Attribution? A Practical Introduction
Part 1: How GA4 records a customer journey? What does first touch, last click and last non-direct click means? Why dashboards disagree on credit?
- A customer's journey is the list of visits that came before a purchase. Tools like GA4 record each visit with a source / medium label, such as google / cpc.
- Marketing attribution is the rule that decides which of those visits gets credit for the sale. First touch, Last Click (LC) and Last Non-Direct Click (LNDC) give three different answers for the same order.
- Dashboards disagree mainly because each tool sees different visits and applies a different rule.
If we ask three marketers which channel drove last week's sales, we may get 3 different answers, each backed by a dashboard. This post explains why that happens and introduces the idea of marketing attribution that settles the argument.
The series overview in brief is mentioned below:
- Part 1 (this post): Covers, What is attribution and What it can and cannot tell us?.
- Part 2 - Attribution Models Explained: First Touch, Last Click & More walks through the common models
- Part 3 - The Last-Click Trap: Why LC and LNDC Starve Top of Funnel shows how those models play out in budget meetings.
If a term is unfamiliar, the jargon checklist explains it in simple terms.
What is a Customer journey, and How is it recorded?
Let us consider a customer Priya. She shops at Kesari Threads, a fictional online ethnic-wear brand we will follow through this series. Over the two weeks she:
- Sees an Instagram ad
- Clicks a festive-sale email
- Clicks a Google Shopping ad
- Finally types the site address and buys a ₹3,000 kurta set.
A few terms come up throughout this series:
- Touchpoint (or touch): Any recorded interaction that brings a customer to your brand, such as an ad click, an email click or a search visit.
- Channel: The source a touchpoint came from, such as Email, Google Shopping or Paid Search (Brand). Many touchpoints can come from the same channel.
- Conversion: The action we want a customer to take, such as placing an order, signing up, requesting a demo or closing a deal.
- Journey: The ordered list of touchpoints one customer had before converting.
How does a tool know any of this?
Consider Google Analytics 4 (GA4) tool for this examples, the analytics tool most online stores run on their website. Each time Priya visits the website, GA4 records a session (a continuous stretch of activity that ends after 30 minutes of inactivity by default) and notes where she came from. That note is a source / medium pair: google / cpc for a paid Google ad click, newsletter / email for a tagged email link (marketers add UTM tags to links to name the source). When GA4 cannot see where a session came from, for example because she typed the address, it logs (direct) / (none).
GA4 recognises the same person across sessions through a browser cookie or a login ID. When she buys, it records a purchase event with the order value. Once we list her sessions before that purchase and we have her journey list.
Figure 1: How GA4 records Priya's journey to a ₹3,000 order. The top row is what she did; the grey boxes are the source / medium label GA4 stores for each visit.
One caveat: (direct) is a catch-all, it covers genuine typed visits as well as visits GA4 failed to trace.
Why do dashboards disagree?
Now imagine the weekly review meeting on Monday at the company Kesari Threads.
- The order system says last week's sales were ₹10 lakh.
- The Instagram lead opens Meta Ads Manager
- The search lead opens Google Ads Manager
- The email manager opens the email tool
- The analyst opens GA4
The figures below are made up for easy explanation purposes.
| Report | What it credits | Revenue credited |
|---|---|---|
| Meta Ads Manager | Orders after an Instagram ad click or view, within Meta's window | ₹4.2 lakh |
| Google Ads | Orders after a click on a Google ad | ₹5.5 lakh |
| Email tool | Orders after an email click | ₹2.8 lakh |
| GA4, one rule across channels (adds up) | Instagram ₹1.1 lakh, Email ₹2.3 lakh, Google Ads ₹4.1 lakh, the rest to other channels | ₹10 lakh in total |
The three platform reports add up to ₹12.5 lakh, more than the company sold. Nobody is wrong, its only the perspective which is different. Three things are going on:
- Each platform sees only its own touches. Google Ads knows nothing about Priya's Instagram ad, so her order appears in both reports.
- Each tool applies its own rule and its own window, the number of days back a touch can still earn credit. Meta, Google Ads and GA4 may not use the same defaults.
- Even inside one tool, changing the rule changes the answer. Let's say if we switch GA4 to a first-click view then Instagram's credit goes up while Google's goes down.
Which number is right? The true total is ₹10 lakh, the figure in the order system. For comparing channels, trust GA4: as it records each purchase once, splits the credit with a single rule and consider all marketing channels that brings the user to the website. This is the reason its channel numbers add up to ₹10 lakh.
The platform (Google Ads, Meta Ads Manager, Email tool etc) reports count every order they touched, so together they overshoot. The suggestion is to use them to tune campaigns inside each platform, not to decide which channel drove sales.
(GA4 can still miss orders when people block tracking or decline consent, so cross check it against the order system.)
The rule GA4 uses to decide which marketing channel will get the credit of order conversion is what attribution is about.
Attribution Model in detail? One order, four rules
Marketing attribution is the process of assigning credit for a conversion to the touchpoints that came before it. An attribution model is the rule that does the splitting.
Listing Priya's journey again: Instagram ad, festive email, Google Shopping ad, direct visit, ₹3,000 order. Who gets the money?
- First touch (first click): The first visit gets everything. Instagram Ads gets ₹3,000. It answers "Who introduced this customer to us?"
- Last click (LC), also called last touch: The final visit gets everything. Direct gets ₹3,000. It answers "What happened right before she bought?"
- Last non-direct click: Like LC, but it skips Direct visits and credits the last marketing channel before them. Google Shopping gets ₹3,000. The reasoning is that someone who types your address already knew your brand from earlier marketing, so the Direct visit shouldn't take the credit.
- Linear: Every visit gets an equal share. Each of the four gets ₹750.
Figure 2: The same order credited four ways. Each bar adds up to ₹3,000.
Each row is one rule and each colour is one touchpoint from Priya's journey. A single-colour bar means one touch takes everything. The journey and the order value never change; only the rule does.
📌 Key idea: There is no single correct way to split credit. Every attribution model is a business choice about which part of the journey the business value the most.
Attribution in case of Longer Customer Journeys
The more touches a journey has, the more there is a chance that conversion credit changes for different attribution models.
To explain how much journeys vary, we simulated 2 fictional companies.
- Kesari Threads has 2,000 orders worth ₹53.4 lakh in total.
- TaskHarbor is a B2B project-management software company with 600 closed deals worth ₹52.2 crore in first-year annual recurring revenue (ARR).
Figure 3: Touchpoints per converting journey for the two fictional companies.
The x-axis is the number of touches before conversion, the y-axis the share of journeys with that many, and the dashed line the average. Kesari Threads averages 3.0 touches, and 13.6% of its orders had just one. TaskHarbor averages 7.1, and only 0.2% of deals had one.
With one touch, every rule gives the same answer: the only touch gets everything. That covers 13.6% of Kesari's orders and almost none of TaskHarbor's deals. With seven touches, first touch and last click can name entirely different channels. The longer the journey, the more the choice of rule decides who looks good.
How does one long journey look like?
To read a long journey, we split it into two stages. Top of funnel (TOF) is everything up to the moment the shopper adds an item to the cart. Bottom of funnel (BOF) is everything after add to cart.
Take Meera, a Kesari Threads customer who buys an ₹8,500 lehenga over three weeks:
- Day -21: sees an Instagram ad.
- Day -17: watches an influencer's YouTube video.
- Day -9: clicks a festive-sale email.
- Day -6: clicks a Google Shopping ad, lands on the lehenga page and adds it to her cart, then leaves.
- Day -4: clicks a cart-reminder email.
- Day -1: searches for the brand name on Google and clicks the result.
- Day 0: types the site address and pays.
Figure 4: Seven touchpoints over 21 days for one ₹8,500 Kesari Threads order. Blue dots are TOF touches and red dots are BOF touches; the dashed line marks add to cart.
The x-axis counts days before the order. Meera's Shopping-ad click brought her to the product page, so it sits in TOF; the add to cart happens during that visit. The first BOF touch is the reminder email that brought her back.
Now apply the rules of the attribution model.
- First touch gives all ₹8,500 to Instagram.
- Last click gives it to Direct.
- Last non-direct click gives it to Brand Search.
- None of them credits the YouTube video that built interest or the reminder email that rescued the abandoned cart.
The same split works for B2B, where there is no cart. For software, the equivalent step is the demo request. Here is a similar customer journey for a company named TaskHarbor:
Figure 5: Seven touchpoints over 94 days for a single ₹11.2 lakh TaskHarbor deal. TOF ends at the demo request.
The buyer met TaskHarbor through a LinkedIn ad 94 days earlier, then visited review sites and attended a webinar. About five weeks before signing, a direct visit booked a demo, which is where BOF begins. The deal closed after a brand search. Under last click or last non-direct click, all ₹11.2 lakh goes to brand search and LinkedIn looks useless. Under first touch it all goes to LinkedIn.
What is attribution used for?
Attribution numbers end up in decisions that move real money:
- Budget allocation: Which channels get more spend next quarter, and which channels get their budget cut.
- Efficiency metrics: Return on ad spend (ROAS) and customer acquisition cost (CAC) are computed from attributed revenue and customers, so they inherit the model's assumptions.
- Campaign optimisation: Bidding platforms use attributed conversions to decide which ads to scale.
Marketing Channel Attribution vs Other Measurement Frameworks?
Attribution is often confused with two other ways of measuring marketing.
| Attribution | Marketing mix modelling (MMM) | Incrementality testing | |
|---|---|---|---|
| Question it answers | How should credit for each conversion be shared across touchpoints? | How much does each channel contribute to total sales over time? | How many extra conversions did this channel actually cause? |
| Data used | User-level journeys (clicks, visits, CRM touches) | Aggregated weekly spend and sales, plus factors like seasonality | A test group and a holdout group |
| Causal? | No, it assigns credit by rule | Partly, through statistical modelling | Yes, by design |
| Typical use | Day-to-day optimisation and reporting | Annual budget planning | Proving a channel's true lift |
⚠️ Pitfall: A channel that gets attribution credit did not necessarily cause the sale. Someone who searches your brand name was probably going to buy anyway, yet most rules still hand that search the credit.
Python Code: Sample code for explanation
Analytics tools exports raw visit data. This data needs to be structured with one row per touchpoint. The below mentioned python code snippet is a sample code to structure the data and apply attribution rules. You can run this code in Google Colab to see how different attribution models affect the credit distribution for a sample dataset.
Actual clickstream or website data is never complete. Cookie limits, device switching and ad blockers fragment journeys, and offline touches like word of mouth go unrecorded. Data Cleaning and data preparition is an essential step before applying attribution rules.
Key Takeaways
- A journey is the ordered list of touchpoints before a conversion; GA4 builds it from source / medium labels linked by a cookie or login ID.
- Attribution is the rule for sharing a conversion's credit. For one order, first touch, last click and last non-direct click can each name a different channel.
- Dashboards disagree because each tool sees only some touches and applies its own rule and window.
- Journeys get longer as purchases get more considered (about 3 touches for a fashion order, 7 for a B2B deal), and the longer they are, the more the choice of rule matters.
- Attribution shares credit; it does not measure causal lift. Incrementality tests and MMM answer that.
Part 2 explains the rules mentioned above and applies six of them (first touch, last click, last non-direct click, linear, position-based and time decay) to the same 2,000 Kesari Threads orders. Read it next: Attribution Models Explained: First Touch, Last Click & More.
Quick Quiz: Test Yourself
1. A customer's journey is Instagram ad → Email → Google Shopping ad → Direct visit → Purchase. Which channel gets the credit under last non-direct click?
- A) Instagram ad
- B) Email
- C) Google Shopping ad
- D) Direct
Show answer
C. Last non-direct click skips the Direct visit and credits the last marketing channel before it, which is the Google Shopping ad. Last click would have credited Direct.
2. Why can Meta Ads Manager, Google Ads and an Email tool together claim more revenue than the company actually sold?
- A) Customers buy more than once
- B) Each tool sees only its own touches and credits an order it touched, so one order can be counted in several reports
- C) The order system under-reports sales
- D) GA4 adds extra revenue to every order
Show answer
B. Each platform applies its own rule and window to the touches it can see, so an order that involved several channels shows up in each channel's report.
3. In the TaskHarbor example, where does bottom of funnel (BOF) begin?
- A) At the first LinkedIn ad
- B) At the demo request, the B2B equivalent of add to cart
- C) Only on the day the deal closes
- D) After the webinar
Show answer
B. TOF covers everything before the buyer shows clear intent. For an online store that is the add-to-cart step; TaskHarbor has no cart, so the demo request marks the switch.
4. Which method is designed to measure the extra conversions a channel actually caused?
- A) Last-click (LC) attribution
- B) Linear attribution
- C) Incrementality testing with a holdout group
- D) Counting UTM-tagged clicks
Show answer
C. Incrementality tests compare a group that saw the marketing with a group that didn't, so the difference is causal. Attribution models only share credit by rule.
Unsure about a term? See the Marketing Attribution Jargon Checklist.
In case of any queries or feedback, feel free to drop a comment or reach out using the Contact section.