WooCommerce Order Attribution Explained: The Origin Column, UTMs and Its Limits
A plain-English guide to WooCommerce's built-in order attribution for store owners and agencies: what each Origin value means, the precedence rules, the fields stored on the order, why orders show Unknown and what the feature cannot do.
In short
WooCommerce order attribution is a core feature that reads first-party cookies at checkout and saves the order's source on the order: an Origin label such as Source: Google, Organic, Referral, Direct, Web admin or Unknown, plus UTM values, device type and page views. It is last-click and only sees the shopper's current session.
WooCommerce order attribution is a feature built into WooCommerce itself that records where each order came from. It arrived in WooCommerce 8.5, switched on by default for new and existing stores, and it is the reason an Origin column appeared on the Orders screen. At the moment a shopper places an order, WooCommerce reads a handful of first-party cookies and saves the result on the order: a label such as Source: Google or Direct, any UTM campaign values, the device type and how many pages the shopper viewed. This guide decodes every value it can show, the rules that decide between them, and where the feature stops being useful.
Where to find it and how to switch it on
The setting is at WooCommerce > Settings > Advanced > Features, in the Order Attribution option. If it is ticked, the feature is running. Once it is on, the data appears in three places:
- The Orders list (WooCommerce > Orders) gains an Origin column with one label per order. If you cannot see it, open Screen Options at the top right of the Orders screen and tick Origin.
- The order edit screen gains an Order attribution box showing Origin, Device type and Session page views, with a Show details link that reveals the source type and the campaign fields recorded for that order. A Customer history box next to it shows the customer's completed orders, refunded orders and total spend.
- The separate WooCommerce Analytics plugin, if you install it, adds order attribution reports that group orders by channel, source and device. The core feature works without it.
What each Origin value means
The Origin label is built from the source type WooCommerce detected plus, for most types, the source name with its first letter capitalised. These are the values you will see on a typical web store:
| Origin label | What it means | Typical cause |
|---|---|---|
| Source: followed by a name, such as Source: Facebook | The landing URL carried UTM parameters, and the name is the utm_source value | Tagged ads, emails, influencer links and social posts |
| Source: Google with no UTMs on the link | The landing URL carried a Google Ads gclid, which is treated as source google, medium cpc, campaign google_cpc | Google Ads auto-tagging without a final URL suffix |
| Organic: followed by a search engine | The visitor arrived from a search engine's unpaid results | Organic search |
| Referral: followed by a domain | The visitor clicked a link on another site that had no UTM parameters | Untagged social posts, blogs, directories, partner sites |
| Direct | There was no referrer and no campaign parameter when the session began | Typed addresses, bookmarks, links in apps that hide the referrer |
| Web admin | A member of staff created the order in the WordPress admin | Phone orders, manual or replacement orders |
| Unknown | No attribution data was saved with the order | Orders placed before the feature was on, while it was off, or with the data blocked or missing |
The WooCommerce source code also defines Mobile app and Point of Sale labels, which most web-only stores never see. Unknown is not a channel: the order has no attribution data at all, and nothing can add it afterwards.
The precedence rules: which visit wins
WooCommerce uses a last-click model: the last qualifying interaction before the purchase gets all the credit. Qualifying is the important word, because not every visit is allowed to replace the source already stored in the cookies. The documentation and the open-source tracking library (a fork of Sourcebuster) apply these rules:
- 1A visit with UTM parameters, or with a Google Ads gclid, always replaces the stored source, even in the middle of a session.
- 2A visit from a search engine's organic results also replaces the stored source, even mid-session.
- 3A referral from another website replaces the stored source only when no session is active. The session lasts 30 minutes by default, and inside it a referral never overrides.
- 4A direct visit never overrides an identified source. Direct is only recorded when nothing else is stored.
A worked example. At 10:00 a shopper clicks a Meta ad whose link ends in utm_source=facebook&utm_medium=paid_social&utm_campaign=winter_sale. At 10:10 she leaves to read a review blog and clicks back to the store from it. That referral is ignored because her session is still active, and the order she places at 10:20 shows Source: Facebook. If at 10:10 she had searched for the brand on Google and clicked the unpaid result instead, the order would show Organic: Google, because organic search overrides mid-session. If she had closed the browser and come back two days later by typing the address, the cookies from the first visit would have expired with the session and the order would show Direct, even though the ad did the work.
What is saved on each order
The data is stored as order meta with keys that start with _wc_order_attribution_, in the wp_wc_orders_meta table on stores using high-performance order storage, or wp_postmeta on older setups. It is written once and never recalculated. Fields captured at checkout, where present:
- Source type: utm, organic, referral, typein (shown as Direct) or admin.
- Referrer: the URL of the page that sent the visitor.
- utm_source, utm_medium, utm_campaign, utm_content, utm_term and utm_id.
- utm_source_platform, utm_creative_format and utm_marketing_tactic, the newer parameters GA4 also reads, captured since WooCommerce 9.0.
- Session details: entry page, session start time, pages viewed in the session and session count.
- Device type (Desktop, Tablet or Mobile), worked out from the browser's user agent.
The Show details panel only lists fields that have a value, and which UTM fields it displays depends on your WooCommerce version. Our explainer on GA4's newer UTM parameters covers what utm_source_platform and the other two are for. Because the Source label is simply your utm_source value, consistent tagging matters: facebook, Facebook and fb become three different labels. The free UTM builder flags capitals, spaces and stray characters before a link goes live.
The limits worth knowing
- It only remembers the current session. The documentation says sessions last 30 minutes by default, the cookies expire with the session, and the feature does not track visitors across sessions. Earlier visits are invisible, which is why repeat-visit buyers often show Direct.
- It has no history. Only orders placed while the feature was enabled carry data. Older orders show Unknown and cannot be backfilled.
- It is separate from Google Analytics. It sends nothing to GA4 or to any ad platform, and GA4 uses its own cookies and attribution settings, so the two will disagree. Setting up GA4 itself is covered in our WooCommerce GA4 guide.
- Some firewalls block it. Certain web application firewall rulesets flag the sbjs_ cookies and return 403 Forbidden errors to shoppers. WooCommerce says the Comodo ruleset was updated to allow them, the OWASP core ruleset needs an exclusion rule, and WooCommerce 9.0 added the wc_order_attribution_use_base64_cookies filter, which, set to true, Base64-encodes the cookie data to avoid false positives.
- It depends on the normal checkout. Attribution is captured by the classic checkout and the block checkout. Orders created through the REST API by another system, imported orders and checkouts that replace WooCommerce's templates can arrive with no data.
Consent and privacy
The feature is compatible with the WP Consent API, the WordPress standard that lets consent plugins tell other plugins what a visitor agreed to. When a consent plugin that supports the API is active, WooCommerce only allows attribution tracking if the visitor has given consent in the marketing category. A shopper who rejects marketing cookies therefore produces an order with Origin Unknown, which is the correct outcome rather than a fault. Without the WP Consent API in place, WooCommerce's built-in consent check is not active, so if your banner needs to hold marketing cookies until a visitor agrees, check that your consent plugin supports the API. Our guide to GDPR cookie banner requirements explains when consent is needed. Also note that if the store has opted into WooCommerce usage tracking, statistical attribution data is shared with Automattic per order, without customer details such as email or addresses. List the sbjs_ cookies in your cookie notice.
How to test it and fix Unknown or wrong origins
- 1Confirm Order Attribution is ticked under WooCommerce > Settings > Advanced > Features, and compare the dates of the Unknown orders with the date the feature was switched on or WooCommerce was updated.
- 2Open a private browser window and visit a product page with ?utm_source=test&utm_medium=test&utm_campaign=attribution_check added to the URL.
- 3Accept marketing cookies if a consent banner appears, then check in the browser's developer tools (Application, Cookies) that cookies starting with sbjs_ were set.
- 4Place a test order and open it. The Origin should read Source: Test with the campaign attribution_check in the details.
- 5If it reads Unknown, repeat with your theme switched to a default one and only WooCommerce active, then turn plugins back on in groups. Checkout replacements and plugins that delay JavaScript are common causes.
- 6If shoppers report errors at checkout, look for 403 responses in your hosting or firewall logs and apply the firewall fixes listed above.
What it is good for, and what it cannot replace
The feature gives a quick per-order answer when a large order lands, shows whether your UTM tagging reaches the checkout, separates staff-created orders from storefront orders and gives a rough device split, all without an extra plugin. Just do not treat a column of last-click, single-session labels as your channel report: a shopper who found you through an ad and bought on a later visit appears as Direct, so paid channels tend to look weaker here than they were. Our comparison of first-touch and last-touch attribution explains what each view hides.
The other gap is feedback to ad platforms. Meta, Google Ads and TikTok learn nothing from the Origin column; their bidding depends on pixels and server-side conversion events. Our guide to WooCommerce server-side conversion tracking compares the options. EndFrame is one of them: its own snippet records each visit's campaign and forwards conversions to the Meta Conversions API, the GA4 Measurement Protocol and the TikTok Events API. It has no WooCommerce app, so the purchase is set up as a goal on the order confirmation page.
Frequently asked questions
Does WooCommerce order attribution recognise Google Ads auto-tagging?
Partly. The tracking library treats a gclid on the landing URL like a campaign link, so an untagged Google Ads click shows as Source: Google with medium cpc and campaign google_cpc. The code does not check for the gbraid or wbraid identifiers Google uses on some iOS clicks, so adding UTM parameters through a final URL suffix is the more reliable way to label Google Ads orders.
Can I see the first visit that brought a customer, not only the last one?
Not from the Origin column. It reports the last qualifying source within the cookie session, and the documentation says the feature is not designed to follow visitors across sessions. For first-visit reporting you need a tool that keeps its own longer-lived record of each visitor, such as an analytics platform, and you should expect its numbers to differ from the order screen.
How do I turn WooCommerce order attribution off?
Untick Order Attribution under WooCommerce, Settings, Advanced, Features and save. Developers can do the same by setting the option woocommerce_feature_order_attribution_enabled to no. The tracking cookies stop being set, and every order placed while the feature is off will show Unknown permanently, because the data is only captured at the moment of checkout.
Sources
- 1.Order Attribution Tracking - WooCommerce
- 2.WooCommerce 8.5.0 Released - WooCommerce Developer Blog
- 3.Add order attribution GA4 UTM parameters (#47639) - woocommerce/woocommerce - GitHub
- 4.sourcebuster-js init.js - woocommerce/sourcebuster-js - GitHub
- 5.WPConsentAPI.php - woocommerce/woocommerce - GitHub
- 6.OrderAttributionMeta.php - woocommerce/woocommerce - GitHub
Try EndFrame
Add a server-side path for your conversions.
EndFrame collects events first-party and forwards conversions server-side to Meta, GA4, TikTok, and webhooks with event-ID deduplication — then credits each conversion to its campaign, with the visit-to-conversion path you can audit.
No credit card required