Record paid WooCommerce orders in SourceTrack, and see which ad, search or referral brought each buyer.
Orders are recorded by the SourceTrack WordPress plugin, from your server, when WooCommerce marks an order as paid. The plugin is not listed in the WordPress.org plugin directory and has no public download: it is available on request. Contact us to get it.
What SourceTrack records
- Paid orders: the order total, recorded before tax, in the order’s currency, with its line items.
- The visit behind the order: the visitor id and visit details saved on the order at checkout, so the order lands on that visitor’s journey even when payment finishes later or on another site.
- Refunds and cancellations: a refund or cancellation brings the order’s revenue in SourceTrack down to what the order is still worth. A deleted refund or a reopened order brings it back up.
- Subscription renewals (WooCommerce Subscriptions): a renewal is recorded as revenue and marked as a renewal. It carries no visitor id, because nobody was at a checkout.
- Trial starts and bookings: a WooCommerce Subscriptions trial start, and a confirmed or paid WooCommerce Bookings booking, as goals.
- Storefront shopping steps: with the tracker on your pages, product views, cart views and add-to-cart clicks.
What SourceTrack does not do
- It does not record purchases from the tracker snippet alone. Order revenue needs the plugin.
- It does not record unpaid orders. A cash-on-delivery order waits until it is marked Completed.
- It does not record orders placed by your own staff, unless you change that in the plugin’s settings.
- It does not run the tracker for a visitor whose browser sends Global Privacy Control or Do Not Track.
Step-by-step setup
Step 1: Install the plugin
Ask us for the SourceTrack WordPress plugin, then upload and activate it in WordPress under Plugins → Add New → Upload Plugin.
Step 2: Enter your site key
In WordPress, open SourceTrack → Settings and paste the site key from your SourceTrack settings. The plugin adds the tracker to your pages, so you need no header plugin or theme edit.
Step 3: Add a Server API Token for refunds
Refunds and cancellations are sent with a Server API Token, never the site key. Create a token with the write:conversion_edits scope in SourceTrack, paste it into the plugin’s settings, and click Check connection. Without a token, orders are still recorded, but refunds and cancellations wait until one is saved.
How it works under the hood
At checkout, the plugin saves the SourceTrack visitor id and the visit’s details on the WooCommerce order. When WooCommerce reports the order as paid (payment complete, Processing or Completed, or the thank-you page), the plugin sends the order once, from your server, to SourceTrack. A later hook for the same order sends nothing more.
Because the visitor id travels on the order, a buyer who pays on an off-site gateway such as PayPal, or whose payment is confirmed later by a gateway webhook, is still credited to the visit that brought them.
When an order is refunded or cancelled, the plugin sends the order’s current net value. A send that fails is retried, and the order screen in WordPress shows whether SourceTrack has the latest value.
Sending orders to ad platforms (beta)
On a paid plan with Meta, Google Ads or another ad platform connected, a recorded order can also be sent server-side to those platforms. This is in beta.
Test it end to end
- Visit your store through a link with UTM tags, for example
?utm_source=test&utm_medium=email&utm_campaign=woo-check. - Place a real, low-value order while logged out, or as a customer account. Orders placed by staff accounts are ignored by default.
- In SourceTrack, check that the order appears with the test source.
- Refund the order in WooCommerce and check that its revenue goes down.
Common problems and fixes
- No orders appear. Check that the plugin is active and the site key is saved. The tracker snippet on its own does not record orders.
- My test order did not appear. It was placed from a staff account (an administrator or shop manager), or it is not paid yet.
- A cash-on-delivery order is missing. It is recorded when you mark the order Completed.
- Refunds do not reduce revenue. Save a Server API Token with the
write:conversion_editsscope in the plugin’s settings. - Caching or minification plugins. Clear your cache after changes, and exclude
tracker.min.jsfrom minification if the browser console shows errors.
Related guides
Frequently Asked Questions
How does SourceTrack track orders when customers pay with PayPal or another off-site gateway?
The visitor id is saved on the order at checkout, before the buyer leaves your site. When the payment is confirmed, the plugin sends the order with that id, so it does not depend on the buyer coming back to the order confirmation page.
Are refunded orders taken out of my revenue?
Yes, once a Server API Token is saved in the plugin. A refund or cancellation brings the order’s revenue in SourceTrack down to what the order is still worth.
Are subscription renewals credited to the campaign that won the customer?
Renewals are recorded as revenue and marked as renewals, but they carry no visitor id, so they are not credited to a campaign.
Can I use SourceTrack on WooCommerce without the plugin?
You can add the tracker snippet to record visits and shopping steps, but order revenue is recorded only by the plugin.