Marketing attribution
How to see which websites send you WooCommerce customers
To see which websites send you WooCommerce customers, look at orders with the source type Referral. The Origin column under WooCommerce › Orders shows each one as "Referral: site", and WooCommerce saves the full referring page URL on the order. Core Analytics doesn't total referrals, so to rank sites you export, query the order meta, or use a tool that groups orders by source.
This guide covers how WooCommerce records referrals, how to total them by site, why some referring sites seem to send nothing, and what to do with the list.
How WooCommerce records a referral
When a visitor clicks a link on another website and lands on your store, their browser usually tells your site which page they came from (the referrer). WooCommerce's order attribution uses that:
| Saved as | What it holds | Example |
|---|---|---|
_wc_order_attribution_source_type |
referral |
referral |
_wc_order_attribution_utm_source |
The referring site's host name | blog.example.com |
_wc_order_attribution_utm_medium |
referral |
referral |
_wc_order_attribution_referrer |
The full URL of the referring page | https://blog.example.com/gift-guide/ |
The Origin column builds its label from the source type and source, so the order above shows "Referral: Blog.example.com".
Search engines are handled separately. Visits from unpaid search results get the source type organic and show as "Organic: Google". Links with UTM parameters get the source type utm, even if they were clicked on another website. So "referral" really means: another website, untagged, that passed a referrer.
When a referral gets the credit
WooCommerce credits the last identified source, with rules spelled out in its documentation. A referral replaces the stored source only when no visitor session is active. Within the same 30-minute session it never does. A UTM-tagged or organic visit always replaces it, and a direct visit never does.
So if someone arrives from a Google search, then clicks through to a review site and back to you within a few minutes, the order stays with Google.
How to rank referring sites by orders
Core Analytics has no attribution report (WooCommerce's separate free WooCommerce Analytics extension adds an Orders by Source report). The options are the same as for any channel, covered in how to see which channels bring the most orders. For referrals specifically, you want two groupings:
- By source (host name) to rank sites: which domains send buyers.
- By referrer URL to see which page on that site did it: which article or forum thread.
For developers: referral orders by site in SQL
On an HPOS store, attribution meta is in wp_wc_orders_meta. This lists referral orders grouped by referring host, with the most common referring page for each:
SELECT src.meta_value AS referring_site,
COUNT(*) AS orders,
ROUND(SUM(s.net_total), 2) AS net_sales,
MAX(ref.meta_value) AS example_referrer
FROM wp_wc_order_stats s
JOIN wp_wc_orders_meta typ
ON typ.order_id = s.order_id
AND typ.meta_key = '_wc_order_attribution_source_type'
AND typ.meta_value = 'referral'
LEFT JOIN wp_wc_orders_meta src
ON src.order_id = s.order_id
AND src.meta_key = '_wc_order_attribution_utm_source'
LEFT JOIN wp_wc_orders_meta ref
ON ref.order_id = s.order_id
AND ref.meta_key = '_wc_order_attribution_referrer'
WHERE s.parent_id = 0
AND s.date_created >= '2026-07-01' AND s.date_created < '2026-11-01'
AND s.status NOT IN ('wc-pending', 'wc-failed', 'wc-cancelled', 'wc-refunded', 'wc-checkout-draft')
GROUP BY src.meta_value
ORDER BY orders DESC;
example_referrer shows one referring URL per site (the alphabetically last), not the most frequent. For a full breakdown by page, group by ref.meta_value instead. On posts storage, replace each wp_wc_orders_meta join with wp_postmeta and order_id with post_id. Change wp_ if your prefix differs, and match the statuses to your Analytics › Settings › Excluded statuses.
Use a longer date range than usual. Referral orders are often a small share, so a single month can be too few to rank reliably.
Why referral numbers look low
- Apps hide the referrer. Clicks from social apps, messaging apps and email clients often arrive with no referrer, so they count as Direct. That's why your Instagram sales may barely show as referrals. Instagram vs email: comparing revenue by source shows how UTM tags fix it.
- Often only the domain is passed. Browsers and many sites limit the referrer to the site's domain rather than the full page for privacy, so the referrer URL frequently shows just the home page of the referring site.
- Session-only memory. The cookies last for the browser session. Someone who reads a blog review today and buys next week by typing your address counts as Direct.
- Last click wins. A review that convinced someone who then searched your name counts as Organic.
- Untracked orders. Orders with no attribution data at all show as Unknown. See why attribution says Unknown.
Treat the referral list as a floor: these sites sent at least these buyers.
The quick way: ask Askshelf
Askshelf adds Analytics › Askshelf to WordPress admin. Its "orders by channel" lookup groups orders and net sales by source type or by UTM source, among other fields. Because WooCommerce saves the referring site's host name in the source field for referral visits, grouping by source shows referring sites alongside your search engines and tagged sources.
Which sources brought orders from July to October?
Askshelf groups by source type and by the source host name, not by the full referrer URL, so it can tell you which site sent buyers but not which page on that site. For that, use the SQL above or open the orders. See the order attribution use case for other questions it answers.
What to do with the list
- Thank and support the sites that send buyers. Offer the blogger a product to review next season, or keep your listing on a directory up to date.
- Find the page where you can. When the referrer URL includes a full path, it points to the gift guide, comparison or forum thread that sent the buyer. When it's only a domain, ask the site owner or search their site for your name.
- Ask referring partners to use tagged links (for example
utm_source=partner-name&utm_medium=referral), so clicks from their newsletters and apps are counted too. The UTM tracking guide has a naming scheme. - Check order value by site. A site that sends few orders with large baskets may be worth more than one that sends many small ones.
For how referrals fit with search, direct and campaign orders, see the hub on WooCommerce order attribution.
Common questions
Where do I see the referring website for a WooCommerce order?
Open the order under WooCommerce › Orders. The Origin column shows Referral: followed by the site, and the Order attribution box on the order shows the source type and source. The full referring URL is saved in the order meta _wc_order_attribution_referrer.
Why does a site that links to me show no referral orders?
Either nobody bought in the same session after clicking, or the click arrived without a referrer (common from apps) and was counted as Direct. A referral also doesn't replace a source already set earlier in the same session.
Is Google a referral in WooCommerce?
Visits from search engines' unpaid results are counted as Organic, not Referral. Referral covers other websites, such as blogs, forums, directories and social networks that pass a referrer.
See how Askshelf handles this: Order attribution reports for WooCommerce