How to track WooCommerce sales by source, without a heavy plugin
Count WooCommerce orders with their source three ways: the order received page, your Stripe account, or a server webhook, and what each one misses.
On this page
WooCommerce runs on WordPress, so adding an analytics tag is a WordPress job; see how to track a WordPress site. The harder question is sales: which ad, email or post brought each order, with its value, counted once. WooCommerce has its own reports for orders and revenue, but they do not know where buyers came from.
This page covers three ways to count orders with their source, and what each misses.
Install Datacenter on WooCommerce
- In Datacenter, add your store's domain and copy the tag from Set up your site.
- In WordPress, add the tag to the header of every page with a header plugin such as WPCode, the same as any WordPress site.
- Clear your cache plugin's cache, if you use one.
- Open your store in a new tab and click Check my site in Datacenter.
- Add a Purchase goal, then pick one of the order methods below.
Method 1: the order received page
After a successful purchase, WooCommerce shows the Order received page, a checkout endpoint (WooCommerce). By default its address is your checkout page followed by /order-received/ and the order number (WooCommerce).
- No code: count a visit to
/checkout/order-received/*as a goal. It counts orders, without their value. - A few lines of code: on that page, send a purchase event with the order total and the order number as its event id. A WooCommerce developer can add it in a theme or snippet. The Datacenter WordPress plugin does this for you.
What it misses: buyers who pay with a method that sends them elsewhere and never come back, buyers who close the tab, and anyone whose browser blocks the tag. It also counts a reload of the page twice, unless the event id is the order number.
Method 2: your Stripe account
If your store takes cards with WooCommerce's Stripe extension, the payments are in your own Stripe account. A tool that reads Stripe sees each payment and refund with its amount, whether or not the buyer reached the order received page.
With Datacenter, the Stripe connector does this on paid plans, with a read-only restricted key. It matches each payment to a customer by email and phone, so a sale ties to earlier visits when that customer was identified on your site. For a direct tie to the visit, the visitor's _dc_id cookie must reach the payment's metadata.dc_id; the Stripe extension has documented filters for adding metadata, which a developer can use (WooCommerce).
What it misses: orders paid by PayPal, bank transfer or any other gateway.
Method 3: a webhook from WooCommerce
WooCommerce can send a webhook when an order is created or updated: WooCommerce, Settings, Advanced, Webhooks, then a topic, a delivery URL and a secret that signs each delivery (WooCommerce).
The webhook's body is WooCommerce's own order format, the same as its REST API returns, signed with the secret (WooCommerce REST API). Your analytics tool has to check that signature and read the order.
With Datacenter, this is built in (Orders from your checkout). On your site's Integrations tab, click Connect next to WooCommerce. The sheet gives you an address and a secret. In WooCommerce, add a webhook with the topic Order updated, paste both, and save. The sheet turns green with the order number when the first paid order arrives. Each order counts once, refunds come off, and the UTMs and landing page WooCommerce's order attribution kept go on the buyer's profile. Counting orders is on paid plans.
What it misses: nothing on the order side; every gateway is covered. The tie to the visit comes from the buyer's email, when they gave it on your site, and from the UTMs WooCommerce kept.
Which one to use
| Store | Use |
|---|---|
| Small store, no developer | The order received page, as a goal |
| Cards through Stripe | The Stripe connector, plus the order received page |
| Several gateways, or you want every order | WooCommerce's order webhook |
Use the same order id everywhere. With one id, a sale reported by the page and by the webhook is still one sale. BigCommerce works the same way, with an order confirmation page and an order webhook.
Common questions
Does Datacenter have a WooCommerce plugin or connector?
Both. The WordPress plugin adds the tag and counts orders on the order received page. WooCommerce's own order webhook sends every paid order and refund to Datacenter from your store's server, with no plugin (how to connect it).
How do I track WooCommerce conversions without a plugin?
Count a visit to the order received page as a goal. It needs no code but has no order value. For values, send a purchase event from that page or from a webhook.
Why do my analytics show fewer orders than WooCommerce?
Some buyers never load the order received page, some block the tag, and some pay by a gateway that does not return them to your site. Server-side methods, such as Stripe or a webhook, close the gap.
What is the WooCommerce order received page URL?
By default, your checkout page followed by /order-received/ and the order number. The endpoint name can be changed in WooCommerce's advanced settings.
Sources
- WooCommerce REST API Documentation: Webhooks. Checked October 2026.
- WooCommerce Documentation: Advanced settings, Webhooks, Customizing the Stripe extension. Checked October 2026.
- WooCommerce Developer Docs: WooCommerce endpoints. Checked October 2026.
Spotted something wrong or out of date? Email hello@datacenter.so and we will fix it.