· Germán Muñoz Moreno, Co-founder
WooCommerce attribution: a practical guide

My store runs on WooCommerce. How do I know which channel brings each sale, and how do I set up Meta, Google and GA4 correctly?
WooCommerce gives you more attribution out of the box than most platforms, and it is still not enough to decide budgets. This guide covers what WooCommerce records about each order's origin, the two WooCommerce-specific ways attribution breaks, and how to set up Meta, Google and GA4 so that their numbers can be checked against your orders.
What WooCommerce records
WooCommerce's Order Attribution Tracking, enabled under WooCommerce > Settings > Advanced > Features, stores for each new order the referring source, the UTM parameters (source, medium, campaign, content and term), the device type and the number of page views in the session. The order edit page shows it in an Order attribution box, next to a Customer history box with completed orders, refunded orders and total spend, and the orders table gets an origin column.
Its rules are simple and worth knowing: UTM and organic sources always override an earlier source, a direct visit never overrides one, and a referral overrides only when there is no active session. It is a last-click model, and data exists only for orders placed while the feature was enabled.
Where it falls short
Its cookies expire with the visitor's session, so, as WooCommerce's documentation says, it cannot track visitors across sessions. A buyer who clicked a Meta ad on Monday and came back on Thursday by typing your address is recorded as direct. For a store with longer consideration, most paid influence arrives in an earlier session, which is exactly what this feature cannot see.
It also has no view of what the ad platforms claim, so it cannot tell you how much of Meta's or Google's number your orders support.
Two WooCommerce-specific traps
Payment gateways that redirect off-site. Many Mexican stores use gateways that send the buyer to the provider's page and back. The return visit can arrive with the provider's domain as its referrer, and any tool that reads it naively credits the payment gateway with your sales. Exclude payment domains as referrers in GA4 and in any attribution tool.
Page caches. A full-page cache serves the same HTML to many visitors. If tracking values are printed into the page, one visitor's values can be served to another, and scripts that should run per visit may not. Exclude cart, checkout and order-received pages from caching, and test tracking after every cache change.
Setting up Meta, Google and GA4
The official plugins cover the basics, per their WordPress.org listings:
- Meta for WooCommerce installs the Meta pixel and syncs your product catalog for dynamic ads, and connects WhatsApp order updates.
- Google for WooCommerce adds Google tag conversion tracking, including enhanced conversions, and syncs products to Google.
- Google Analytics for WooCommerce sends GA4 ecommerce events, including purchases with transaction details.
Then check four things regardless of plugin: the purchase fires once per order and carries the order number; the order number is also the event ID for any server-side event, so browser and server events deduplicate; customer data sent for matching is normalized and hashed as each platform expects, which we cover in Google Enhanced Conversions; and refunds are reported to GA4 with a refund event.
Add the server side
Browser pixels on WooCommerce lose purchases to ad blockers, tracking protection and closed tabs like on any platform. WooCommerce emits order webhooks, which makes the server side straightforward: report purchases from the order, not from the thank-you page. We explain the options and costs in server-side tracking.
The weekly check
Compare, for the same week and time zone, the orders WooCommerce settled (after refunds and cancellations), the purchases each platform claims, and the orders your attribution tool credits to each channel. The credited total can never exceed settled orders; if it does, something counts twice. If your store also runs on another platform, the equivalents for VTEX are in attribution on VTEX.
How Adray works on WooCommerce
Adray installs as a WordPress plugin. It exposes a first-party endpoint on your own domain, so the pixel's events travel through your site rather than to a third-party domain that blockers list, and it captures attribution on the server when the visitor arrives, in HTTP-only cookies, so an order is still attributed when the browser pixel was blocked. Orders come from WooCommerce itself, each is stitched to the session and click that produced it, and payment-gateway domains are excluded as referrers. WooCommerce appears with the other supported platforms on the integrations page.
Common questions
Does WooCommerce have built-in attribution?
Yes, Order Attribution Tracking. When enabled under WooCommerce > Settings > Advanced > Features, it stores the referring source, UTM parameters, device type and session page views for each new order, and shows the origin in the orders table. It uses a last-click rule within the session.
Why does WooCommerce show so many orders as Direct?
Because its attribution only sees the current session. A buyer who clicked an ad days ago and returns by typing your address is recorded as direct, and a type-in visit never overrides an earlier source within the same session.
Why do some orders show the payment gateway as the source?
When the checkout redirects to a payment provider and back, the return visit can arrive with the provider as its referrer. Tools have to exclude payment domains as referrers, or the gateway gets credit for your sales.
Which official plugins should I install for Meta, Google and GA4?
Meta for WooCommerce installs the Meta pixel and syncs your catalog; Google for WooCommerce adds Google tag conversion tracking with enhanced conversions and product sync; Google Analytics for WooCommerce sends GA4 ecommerce events. Check each one's settings rather than assuming defaults.
Can a caching plugin break my tracking?
Yes. A full-page cache can serve one visitor's HTML, including values meant for another session, or skip scripts that should run per visit. Exclude cart, checkout and order-received pages from the cache and test after every cache change.
