How to run linear attribution in Shopify and GA4
In Shopify, add Linear to a marketing report's Attribution menu. GA4 dropped linear in November 2023. There you export the Attribution paths report, split each path's revenue evenly across its touchpoints and add the shares up by channel.
By Joris van Huët, Founder & CEOUpdated 7 min read
Linear attribution gives every recorded click on a path an equal share of the sale. If you sell on Shopify, you can switch a marketing report to Linear in a few clicks. GA4 dropped the model in November 2023, so there you rebuild it from the Attribution paths export in a spreadsheet.
Step by step
You need access to Shopify's reports and a GA4 property with purchase marked as a key event. Pick one full month and use the same dates in every tool, so the numbers can meet.
- Confirm GA4 will not do it for you. Google lists three models for GA4's Attribution reports: data-driven, paid and organic last click, and Google paid channels last click. First click, linear, time decay and position-based are no longer available as of November 2023. Note which model your property reports with, so you know what your sheet will sit next to. Menu path: Admin > Data display > Events > Attribution settings > Reporting attribution model.
- Check what Google Ads did with old linear settings. In Google Ads, go to Summary within the Goals menu, select your purchase conversion, then Edit settings. Google's help says conversion actions on the deprecated models were upgraded to data-driven attribution, and last click is still supported. If a conversion once ran on Linear, its figures since the switch are data-driven figures. Menu path: Google Ads > Goals > Summary > conversion name > Edit settings > Attribution model.
- Add Linear to a Shopify report. In your Shopify admin, go to Analytics > Reports, click the Category filter and choose Marketing, then open Performance by referring channel. If the configuration panel is hidden, click Controls. In its Attribution menu, include Linear as well as Last click; the menu appears when a report has a sales metric and a marketing dimension. Menu path: Shopify admin > Analytics > Reports > Category: Marketing > Performance by referring channel > Controls > Attribution.
- Export GA4's paths. In GA4, click Advertising, then Attribution paths under Attribution. The report's own help page calls it Key event attribution paths, under a Key events drop-down, so use whichever name your menu shows. Select the purchase key event and your month, then click Share this report in the top right and download the data. Menu path: Advertising > Attribution > Attribution paths > Share this report.
- Split each row's revenue evenly. Each row of the file is one path, with its Purchase revenue and Touchpoints to key event. Divide the revenue by the touchpoints and give that amount to every touch on the path. A channel that appears twice on a path gets two shares. Menu path: the downloaded file, no GA4 menu needed.
- Add it up and check it. Total each channel's shares with a pivot table or a sum column. The channel totals must add up to the file's purchase revenue, or a formula slipped. The report displays paths up to 20 touchpoints long, so the longest journeys may be missing. Menu path: the downloaded file, no GA4 menu needed.
- Set your sheet beside GA4's models. Open the Attribution models report and use the drop-downs in the Attribution model (non-direct) columns to show data-driven and paid and organic last click. Put your linear totals in a third column. Read Direct on its own, because GA4's models skip direct visits unless the whole path was direct. Menu path: Advertising > Attribution > Attribution models.
A worked example
For illustration, say your file holds three rows for last month. Say the first row is Paid Social > Email > Direct, with €3,000 of purchase revenue over 3 touchpoints. Say the second is Organic Search alone, with €5,000 on 1 touchpoint, and the third is Email > Email, with €2,000 over 2 touchpoints.
If the rows are split evenly, the first gives Paid Social, Email and Direct €1,000 each. For example, the second row keeps all €5,000 on Organic Search, because one touch has nothing to share. And if the third row is split the same way, Email gets €1,000 twice.
Add it up and the illustrative totals are Organic Search €5,000, Email €3,000, Paid Social €1,000 and Direct €1,000, which comes back to €10,000. The sheet balances.
Now set it against a last click that counts direct visits, as Shopify's Last click does. If you use that model, Direct takes the first row's €3,000, Organic Search keeps €5,000 and Email keeps €2,000. In this worked example, linear moves €2,000 out of Direct: €1,000 to Paid Social and €1,000 to Email.
Only the first row changed hands, because it is the only row that mixes channels. The single touch and the repeated Email path read the same under any model.
One store's real export shows how lopsided a real file can be. On its Journeys sheet, the 14 distinct paths with 1 touch hold 79.5% of revenue. The paths with 2 or more touches make up 3,656 of the 3,670 distinct path sequences, yet hold 20.6% of revenue, the Journeys sheet shows.
These are distinct paths, not purchases, so they say nothing about how many people bought. They say your sheet may run to thousands of rows that move about a fifth of the money. In that one store, the 14 single-touch rows would read the same under any model.
So check the biggest rows by hand before you trust the totals. A typo in a top row costs more than a thousand tidy rows in the tail.
What should you check when the linear numbers look wrong?
- The channel totals miss the file's revenue. You probably divided by Key events instead of Touchpoints to key event. Or a channel name in a path did not match the list you summed by.
- Direct towers over GA4's models. Your sheet counts direct visits, like Shopify's Linear. GA4's attribution models give Direct credit only when a path is direct from start to finish.
- Your total does not match Shopify's sales. Shopify's marketing reports summarise Online Store channel orders, while the GA4 file holds the purchases GA4 recorded. Compare each channel's share of the total, not the money.
- Email jumped after a new flow went live. Linear pays per click, so more reminders per path mean more slices. That is frequency, not new demand.
- Rows show Unassigned or (not set). GA4 uses Unassigned when no channel rule matches, and (not set) when a tagged link lacked a value such as source or medium. Split those rows like any channel, then fix the tags behind them.
What to do this week
- Build the sheet for last month. Run steps 4 to 6 for the last full month. Pass: the channel totals add up to the file's purchase revenue. Fail: they do not, so check that you divided by Touchpoints to key event and not by Key events.
- Hold your sheet against Shopify. Open Performance by referring channel with Linear included, for the same month. Pass: Shopify and your sheet agree on which channels gain under linear. Fail: they disagree, so check that both cover the same dates and count Direct the same way.
- Re-run the sheet without Direct. Copy the sheet, delete Direct from every mixed path and split each row again across the touches left. Paths that are Direct from start to finish keep their credit. Pass: your channels keep their order. Fail: the order flips, so Direct is driving your linear story, and GA4's models will tell another one.
Check the homework. Your GA4 Attribution paths export already holds the evidence. Causality Engine reads that one file and shows what each channel caused next to what last-click gave it, in 1 to 2 minutes, for €99 once (excluding VAT), refundable within 30 days. Check the homework
Sources, 1 October 2026: Get started with attribution (Google); About attribution models (Google); Marketing reports (Shopify); Bot filtering in Shopify analytics and reports (Shopify); Key events attribution paths report (Google); Key event attribution models report (Google)
Related answers
Frequently asked questions
Can I calculate linear attribution in a spreadsheet?
Yes. Export GA4's Attribution paths report and divide each row's purchase revenue by its touchpoints to key event. Give that amount to every touch on the path, then add the amounts up by channel. The channel totals should match the file's total purchase revenue.Does Shopify's linear model include direct visits?
Yes. Shopify's help says Linear gives equal credit to each click in the journey that contributed to a sale, including direct visits. GA4's attribution models work the other way and skip direct visits, unless the whole path to the key event was direct.What happened to Google Ads conversions that used linear?
Google upgraded them. Its help says conversion actions on the deprecated models, linear included, now use data-driven attribution. If you prefer, switch a conversion action to last click under Goals, Summary, Edit settings, Attribution model.
Go deeper: Incrementality testing, explained.
Sixty-second versions of these ideas: Causality Engine on YouTube Shorts.
Keep reading
Terms in this article
- AnalyticsAnalytics is the systematic computational analysis of data. It reveals customer behavior and measures campaign performance.
- AttributionAttribution identifies user actions that contribute to a desired outcome and assigns value to each. It reveals which marketing touchpoints drive conversions.
- Attribution ModelAn Attribution Model defines how credit for conversions is assigned to marketing touchpoints. It dictates how marketing channels receive credit for sales.
- Attribution ReportAttribution Report shows which touchpoints or channels receive credit for a conversion. It identifies which campaigns drive desired actions.
- ConversionConversion is a specific, desired action a user takes in response to a marketing message, such as a purchase or a sign-up.
- Google AdsGoogle Ads is an online advertising platform where advertisers bid to display ads, service offerings, and product listings.
- Linear AttributionLinear Attribution assigns equal credit to every marketing touchpoint in a customer's conversion path. This model distributes value uniformly across all interactions.
- TouchpointTouchpoint is any interaction a customer has with a brand throughout their journey. In marketing attribution, each touchpoint is a data signal to understand marketing impact.