Skip to content
← All posts

Published · 5 min read · By the

WooCommerce order attribution: why orders show Unknown origin and how to fix it

Open the Orders screen in WooCommerce and there is an Origin column: Direct, Organic, Referral, a UTM source, Web Admin. For some stores most of it reads Unknown. This article explains where that column comes from, the reasons it goes blank, a five-minute test to find which reason applies to you, and what you can and cannot get back for orders already placed.

Where the Origin column comes from

Order attribution was added in WooCommerce 8.5.0 on 9 January 2024 and, in the words of the release post, “is enabled by default for new and existing stores”. When a shopper places an order, WooCommerce reads a set of first-party cookies with the prefix sbjs_ and stores on the order: the referring site, the UTM source, medium, campaign, content and term parsed from the landing URL, the device type (desktop, tablet or mobile), and the number of pages viewed in the session. The official documentation describes the model as last click: “100% of the conversion credit to the last interaction before a customer lands on your site”. A UTM or organic visit overrides an earlier source; a direct visit never overrides an identified one; a referral overrides the previous source only when no session is active. The sbjs_session cookie expires after 30 minutes and the rest expire with the browser session.

The feature is switched on or off under WooCommerce, Settings, Advanced, Features, Order Attribution. The documentation is explicit about history: “Order Attribution Tracking data is available only to orders generated when this feature is enabled. If you deactivate this feature at any point, orders placed during the disabled period will not incorporate this data.”

Why an order shows Unknown

Unknown means the order has no attribution metadata at all, as opposed to Direct, which means the metadata was written and said the shopper typed the address or arrived without a referrer. The causes we see most often, from the documented ones to the ones you have to test for:

  1. The order predates the feature. Anything placed before your store ran 8.5, or during a period when the feature was disabled, has no data and cannot get any. On a store with years of history this is the single biggest group, and it is normal.
  2. The cookies were never written. The tracking script runs in the shopper’s browser. If it did not run, the order is saved without metadata. The documentation says the feature is “compatible with WP Consent API”, so a consent plugin that withholds the relevant category until the shopper accepts will, by design, leave orders from shoppers who declined without attribution. The same applies to browsers and extensions that block the script.
  3. The cookies were written but not read. The data is “read only when an order is placed” on the checkout form. A checkout that is not the WooCommerce checkout (a custom page builder flow, a headless front end, an order created by an API call or an external system) may never post the fields.
  4. A firewall stripped them. The documentation notes that WooCommerce 9.0 added a Base64 cookie option “to avoid web application firewall false positives”: some firewalls rejected requests carrying the raw cookie values. If your Unknowns started with a security plugin or a hosting change, this is the first thing to check.
  5. The order was created in the admin. These are recorded as Web Admin rather than Unknown. The documentation’s own test procedure for Unknown is to create such an order and delete its attribution metadata from the database, which tells you exactly what Unknown is: missing rows, nothing more.

A five-step test

  1. Check the switch. WooCommerce, Settings, Advanced, Features: is Order Attribution enabled? If it was ever turned off, note the dates; orders from that window are permanently Unknown.
  2. Look at the dates. Sort orders by date and find where Unknown stops being the majority. If it lines up with your upgrade to 8.5 or with the switch above, you have a history gap, not a live problem.
  3. Place a test order the normal way. In a private browser window, open a product from a link with ?utm_source=test&utm_medium=check, accept the cookie banner, check out with a real gateway in test mode or with cash on delivery. The order should show the UTM source. If it does, the live setup works and the Unknowns are historical or consent-related.
  4. Repeat with consent declined. Same steps, decline the banner. If this order is Unknown, your consent setup is doing what it should; the share of Unknown you see is roughly your decline rate, and no plugin will change that.
  5. Repeat without the suspects. If the first test order was Unknown, temporarily switch to the default WooCommerce checkout and a default theme on a staging copy, then disable the firewall or security plugin, one at a time, placing a test order after each change. The change that makes the source appear is your cause.

What can and cannot be recovered

Nothing. That is the honest answer for orders already saved without metadata: the cookies that held the source are gone with the shopper’s session, and WooCommerce does not reconstruct them. You can still learn something about old orders from other fields, for example the customer’s first order date or the coupon used, but you cannot give them a source.

What you can do is make the gap stop growing. Keep the feature on, keep your UTM links consistent, make sure the consent banner grants the category the attribution script needs when the shopper accepts, and re-run the test order after every checkout or security change. From that day forward every order will carry a source, and three months later the Unknown share in any report will be whatever your consent decline rate is, which is the floor.

How FCAnalytics handles these orders

FCAnalytics imports the attribution metadata on every order through the WooCommerce REST API and maps it to a channel: Google Ads, Organic search, Facebook Ads, Instagram, TikTok, Pinterest, Bing Ads, Email, Social, Referral, Manual for admin orders, or the capitalized UTM source. An order with no metadata at all is placed in Direct, because without a source type there is nothing to distinguish it from a typed-in visit. On a store with years of history that Direct line will include the pre-8.5 orders, which is one reason the attribution dashboard defaults to the last 30 days rather than all time. The full mapping is on the methodology page.

If you want attribution with the ad spend next to it, so that each channel shows profit after what you paid for it, the attribution dashboard does that from the same WooCommerce data. For the concepts, including why last click under-credits the channels that start a relationship, read marketing attribution for small ecommerce teams.

Related guides

Written by the FCAnalytics team, the people who build the product. Definitions and formulas in this article are the ones FCAnalytics uses in its dashboards; see how net profit is calculated and the FAQ.

See this in your own store.

Connect your WooCommerce store and the numbers in this article show up with your real orders. 14-day trial, no card required.