WooCommerce integration

WooCommerce revenue attribution

DataFair connects your WooCommerce payments to the visits that led to them, so you can see which traffic sources earn money for your WordPress stores, not just which ones send visitors.

Add your website

What you see once WooCommerce is connected

How payments are matched to visitors

The DataFair script gives every visitor an anonymous id. When that visitor pays, the id travels with the payment and DataFair credits the sale to the visit that brought them.

Save df_visitor_id as order meta to get a direct match. Otherwise payments match by email.

A payment that arrives without an id still counts in your revenue totals. It just has no traffic source.

Connect WooCommerce in a few minutes

  1. In DataFair, open Integrations, choose WooCommerce and copy your webhook URL.
  2. In WordPress, go to WooCommerce, then Settings, then Advanced, then Webhooks.
  3. Click Add webhook. Set Status to Active and Topic to Order created.
  4. Paste your DataFair webhook URL into Delivery URL and your signing secret into Secret.
  5. Set API version to WP REST API Integration v3 and click Save webhook.
  6. Add a second webhook the same way with the Topic Order updated.
  7. Use the same secret in DataFair and save.

WooCommerce events DataFair listens to

Every webhook is checked against its signature before anything is stored, and the secret is encrypted at rest.

Good to know

Never leave Secret blank: WooCommerce would then sign with your API key instead.

Questions

Do I need to write code to track WooCommerce revenue?
A small change to your checkout. Save df_visitor_id as order meta to get a direct match. Otherwise payments match by email.
What happens to refunds?
When WooCommerce reports a refund or a dispute, DataFair takes it off the source that earned the original sale, so your revenue by channel stays honest.
Which plan do I need?
Every plan includes revenue attribution. Starter includes one revenue provider connection; Growth and Scale include several. Starter is $5.99 a month at launch and falls to $3.99 as the community grows. Growth goes from $14.99 to $9.99, and Scale from $49.99 to $29.99. Every customer moves to the lower price at their next renewal.
Can I use WooCommerce with another payment provider?
Yes, on Growth and Scale you can connect several providers to one website, and each payment is attributed the same way.

Guides

Related