Server-side tracking for WooCommerce
Install the ROASaurus WordPress plugin, or point a WooCommerce webhook at ROASaurus. Either way, paid orders reach your ad platforms from the server and are matched to the ad click.
| WooCommerce at a glance | |
|---|---|
| Option 1 | ROASaurus plugin: sends paid orders to the orders API and saves tracking cookies on each order |
| Option 2 | WooCommerce webhook (Order updated), verified with its HMAC signature |
| Backup | Optional REST API key: missed orders fetched every 5 minutes |
| Paid orders | Status processing or completed |
| Plugin needs | PHP 7.4 and WooCommerce 6.0 or newer |
Option 1: the ROASaurus plugin
- Go to Add a store › WooCommerce and enter your shop address.
- In the store's Settings › Orders API, create an API key.
- Download the plugin and upload the zip in WordPress under Plugins › Add New Plugin › Upload Plugin, then activate it.
- Under WooCommerce › ROASaurus, enter the endpoint, store key and API key.
The plugin loads the tracking script, saves the visitor's tracking cookies on the order at checkout (the visitor id plus the Meta, TikTok, Snap and Pinterest cookies) and sends each paid order to ROASaurus. Cash on delivery and bank transfer orders are sent when they reach processing. On the thank-you page it fires the browser purchase. Because the visitor id travels with the order, matching is exact.
Option 2: WooCommerce webhooks
Pick WooCommerce when you add the store. In WooCommerce › Settings › Advanced › Webhooks, add a webhook with status Active, topic Order updated, your ROASaurus delivery URL, a secret, and API version WP REST API Integration v3. Paste the same secret in ROASaurus; each delivery is checked against its signature. Orders with status processing or completed count as paid.
Add a read-only REST API key as well and ROASaurus fetches orders every 5 minutes, so an order a webhook missed still arrives. The plugin also works next to the webhooks: it saves the visitor id on each order, and the webhook carries it along.
Matching without the plugin
Without the plugin, nothing on the thank-you page links the order to its visitor. ROASaurus then matches by a hashed email the visitor gave earlier on your site (in a popup or through an Identify call), then by the same IP address and browser seen from 3 hours before to 15 minutes after the order, only when exactly one visitor fits.
Limits
- The script tracks page views on its own. Product views and adds to cart are detected automatically on Shopify only; on WooCommerce your developer can send them with
tlq('track', 'AddToCart', {...}). - The plugin and connector are built from WooCommerce's official documentation. Place a test order after setup and check the Event log.
Related
Questions, answered
Plugin or webhook: which should I use?
The plugin gives exact matching, because it stores the visitor id on each order. Webhooks need no plugin install, but ROASaurus can then only match orders by an email the visitor gave earlier on your site or by IP address and browser, which links fewer orders. You can use both.
Are cash on delivery orders tracked?
Yes. The plugin sends cash on delivery and bank transfer orders when they move to processing. With webhooks, orders count once their status is processing or completed.
Do I need the REST API key?
No, it is an optional backup. With a read-only REST API key, ROASaurus also fetches orders every 5 minutes, so a missed webhook doesn't mean a missed order.
Every sale, traced to the ad that earned it
Server-side tracking, profit and lifetime value in one app. 14-day free trial, no credit card.
Start your free trial →