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 | processing, completed | purchase | orders/paid |
order.updated | refunded | refund | orders/updated (with refunds) |
order.updated | cancelled, failed | refund | orders/cancelled |
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.zip from the GitHub releasesThere is nothing to configure. The plugin 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 | Generate a random string and copy it |
| 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 | Same secret as above |
| API version | WP REST API Integration v3 |
Replace YOUR_ATTRIBUTION_ID with your Attribution ID from the TrustData dashboard.
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 itsession_matched. A value of false means TrustData received the webhook but found no session