WooCommerce sends webhooks natively, so you write no server-side code to forward events. Install a small plugin for session matching, then register the webhooks in your WooCommerce admin.
| WooCommerce topic | WC order status | TrustData event | Shopify equivalent |
|---|---|---|---|
order.created | Any status except those listed below | purchase | orders/paid |
order.updated | Any other status | order_update | orders/updated |
order.created or order.updated | refunded | refund (negative value) | orders/updated (with refunds) |
order.created or order.updated | cancelled or failed, on an order that was paid | cancellation (negative value) | orders/cancelled |
order.created or order.updated | pending, on-hold or checkout-draft | Ignored | n/a |
order.created or order.updated | cancelled or failed, on an order that was never paid | Ignored | n/a |
TrustData treats an order as paid when WooCommerce has set its payment date. It records nothing for an ignored order and still returns 200.
You need:
During checkout, the TrustData plugin saves the visitor ID from the browser to order meta. WooCommerce then includes it in webhook payloads, which lets TrustData match the order to the original ad click.
trustdata-woocommerce-<version>.zip from the latest WooCommerce plugin release on the GitHub releases pageThe plugin itself has nothing to configure. It works as soon as you activate it.
Go to WooCommerce → Settings → Advanced → Webhooks → Add webhook.
Create two webhooks:
| Field | Value |
|---|---|
| Name | TrustData Order created |
| Status | Active |
| Topic | Order created |
| Delivery URL | https://t.trustdata.tech/webhooks/woocommerce/YOUR_ATTRIBUTION_ID/orders |
| Secret | Your TrustData webhook signing secret |
| API version | WP REST API Integration v3 |
| Field | Value |
|---|---|
| Name | TrustData Order updated |
| Status | Active |
| Topic | Order updated |
| Delivery URL | https://t.trustdata.tech/webhooks/woocommerce/YOUR_ATTRIBUTION_ID/orders |
| Secret | Your TrustData webhook signing secret (same as above) |
| API version | WP REST API Integration v3 |
Replace YOUR_ATTRIBUTION_ID with your Attribution ID from the TrustData dashboard.
X-WC-Webhook-Signature header against your property's webhook signing secret and rejects any other value with 401 invalid signature. The dashboard does not display this secret yet: contact support to get it before you create the webhooks.X-WC-Webhook-Topic header.The JS SDK sets a _trdt_vid cookie when a visitor lands on your store. At checkout, the TrustData plugin reads this cookie and saves it to the WooCommerce order as _td_visitor_id meta. WooCommerce includes all order meta in the webhook payload, so TrustData receives the visitor ID alongside the order data.
_trdt_vid appears in browser DevTools → Application → Cookies on your storefront200 response means TrustData received it200 means TrustData received the order. If it is still not attributed, TrustData found no matching session401 with invalid signature means the webhook Secret is not your TrustData signing secret. A 401 with no signing secret configured means webhook receiving is off for that attribution ID