How to set up marketing attribution, step by step
Start in GA4: check that purchase is a key event, choose the attribution model and lookback window, and link Google Ads with auto-tagging on. Then tag your links, write down Meta's attribution setting and Shopify's model, and read GA4's attribution reports with those rules in mind.
By Joris van Huët, Founder & CEOUpdated 7 min read
Run the numbers for your store: the free attribution window calculator.
To set up marketing attribution, you usually start in GA4. Check that purchase is a key event, pick the attribution model and lookback window, and link Google Ads. Then tag every link you control, write down Meta's attribution setting and Shopify's model, and read GA4's attribution reports with those rules in mind.
Step by step
Do the steps in order. Steps 1 to 5 decide what GA4 can see and how it counts; steps 6 to 8 decide how you read the numbers.
- Check that purchase is a key event. GA4 marks purchase as a key event by default, but a broken install can still miss it. Look for purchase, with a filled star, in the Recent events tab. In GA4, click Admin, then Events under Data display.
- Choose the reporting attribution model. Data-driven is the default; Paid and organic last click gives all the credit to the last click that was not direct. The choice applies to past and future data in GA4's reports, and you need the Marketer role or above. Go to Admin > Data display > Events > Attribution settings.
- Set the key event lookback window. For purchases, GA4 looks back 90 days by default, with 30 or 60 days as options. A change applies going forward only, and the same window governs session attribution. It sits on the same Attribution settings page.
- Link Google Ads and keep auto-tagging on. Together they let GA4 report each ad click with its Google Ads campaign and cost data. In GA4, click Admin, then Google Ads links under Product links, and click Link. In Google Ads, click Admin, then Account settings, open Auto-tagging and tick Tag the URL that people click through from my ad.
- Tag every link you control. Give each email, SMS, bio and partner link utm_source, utm_medium and utm_campaign, as Google's URL builder help advises for every tagged URL. Keep every value lowercase, because GA4 treats Meta and meta as two different values. In Meta Ads Manager, add your tags in the URL parameters field under Tracking while you build each ad.
- Write down Meta's attribution setting. Meta's standard setting can count purchases within 1 or 7 days after a link click, and within 1 day after a view. Read it per ad set, then put settings side by side in Ads Manager under the Columns: Performance menu, with Compare attribution settings. Which one is on by default gets its own answer.
- Pick the model for Shopify's reports. Shopify offers last non-direct click, last click, first click, any click and linear. An Attribution menu appears when a report holds a sales metric and a marketing dimension, and last click is the default there. In Shopify admin, go to Analytics > Reports, filter the Category to Marketing and open Performance by referring channel.
- Read GA4's attribution reports. Attribution models puts two models side by side. Attribution paths shows the routes to purchase, with Days to key events and Touchpoints to key event. Download both each month through Share this report, so you compare like with like. In GA4, click Advertising, then Attribution models or Attribution paths under Attribution.
A worked example
For illustration, take one €100 order and run it through the setup above. Say the buyer clicks your Meta ad on Monday and browses. On Wednesday they open your Klaviyo email without clicking. On Thursday they type your address and buy.
In this worked example, Meta counts the full €100, because the purchase falls inside its click window from step 6. Klaviyo counts the €100 too, if the open falls inside its own default window. GA4's path reads Paid Social, then Direct. Paid and organic last click ignores the direct visit, so in this worked example Paid Social gets the full €100.
In this worked example, Shopify's default Last click view gives the same €100 to Direct, because the final visit was typed. For illustration, that is €300 of claims across Meta, Klaviyo and GA4 for €100 of sales. Nothing in the setup is broken. Each tool answers its own question with its own rule. The setup does not make the tools agree. It makes their rules visible, so you know which question each number answers before you move budget on it.
Real exports show where the arguments happen. One store's export holds 79.5% of revenue in journeys with 1 touch, on the Journeys sheet. On the Channels sheet, Direct holds 57.7% in every view. When most revenue sits on single-touch paths, as in this one store, GA4's models have little to split. Any gap between tools then comes from what each tool counts, such as ad views and email opens.
What should you check when the setup looks wrong?
The attribution reports are empty. Purchase is probably not a key event, or it was marked today: Google allows up to 24 hours before key events show in standard reports. Check step 1 again tomorrow.
Google Ads and GA4 disagree on the same campaign. They can use different models and windows, and Google notes that different time zones in the two accounts also cause gaps. Write each tool's rule next to its number before you compare.
Tagged links land in Unassigned. Google uses Unassigned when no channel rule matches. A medium such as newsletter or ig fits no rule. Use the mediums GA4 expects, such as email, social or cpc.
A new lookback window changes nothing. That is by design: window changes apply going forward. Compare periods that both started after the change.
Shopify gives Direct more than GA4 does. Shopify's default Last click counts direct visits, while GA4's models skip them unless the whole path was direct. Switch the Shopify report to Last non-direct click before you compare the two.
When should you redo these steps?
Whenever something upstream changes. A new channel, a new email or reviews app, a theme change or a new checkout can each drop tags or events without telling you. Run steps 1, 5 and 8 again after any of those, and once a quarter even when nothing seems to have changed. Attribution goes wrong quietly, so a calendar reminder beats a hunch.
What to do this week
- Run steps 1 to 3 today. Pass: purchase has its star, and you have written down the model and the window. Fail: purchase is missing from the events list, so GA4 is not receiving purchases; fix that before you read any model.
- Audit one week of tags. A week after step 5, open Reports > Acquisition > Traffic acquisition and look for the Unassigned row. Pass: Unassigned stays empty or tiny. Fail: it grows, so a medium is misspelled or off GA4's list; correct the links and check again.
- Annotate the day you finished. In any GA4 report with a line graph, right click that date and click Add annotation, naming the settings you changed. Pass: next month, anyone who sees a jump can check whether a setting caused it. Fail: nobody can tell setup changes from real ones, so add the note today.
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: Mark events as key events (Google); Select attribution settings (Google); Connect Google Ads to Google Analytics (Google); About auto-tagging (Google); URL builders: Collect campaign data with custom URLs (Google); Add URL parameters to your Meta ads in Meta Ads Manager (Meta); About attribution models and attribution settings (Meta); Compare attribution settings in Meta Ads Manager (Meta); Marketing reports (Shopify); Get started with attribution (Google); Key events attribution paths report (Google); Default channel group (Google); About annotations (Google)
Related answers
Frequently asked questions
Do I need UTM tags on my Google Ads links?
Usually not, if auto-tagging is on and Google Ads is linked to GA4. Google says GA4 prioritises auto-tagging over manual tags, as there is no override option. Keep UTM tags for every other link you control, such as email, SMS and partner links.Which Shopify attribution model counts each order more than once?
Any click. It gives full credit to every channel the customer clicked, so Shopify says it allocates more credit than the orders you received. Use it to study one channel at a time, or to line Shopify up against what each ad platform claims for itself.Should every tool use the same attribution window?
You cannot make them match, and you do not need to. Each tool sets its own windows, and some count ad views or email opens that GA4 never sees. Write each tool's rule next to its numbers, and compare tools only once you know which rules they follow.
Go deeper: Incrementality testing, explained.
Sixty-second versions of these ideas: Causality Engine on YouTube Shorts.
Keep reading
Terms in this article
- 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.
- Google AdsGoogle Ads is an online advertising platform where advertisers bid to display ads, service offerings, and product listings.
- Google AnalyticsGoogle Analytics is a web analytics service that tracks and reports website traffic.
- Marketing AttributionMarketing attribution assigns credit to marketing touchpoints that contribute to a conversion or sale. Causal inference enhances attribution models by identifying true cause-effect relationships.
- NewsletterNewsletter is a regularly distributed email publication containing news, updates, and promotional content for subscribers.
- 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.