Connect WooCommerce to Nevian
Send every WooCommerce order to Nevian with an order webhook and two small pieces of code, so each sale, refund and cancellation shows up next to the ad that brought the buyer.
What you need
- A WordPress administrator login for your store, so you can open WooCommerce › Settings and add code to the site.
- A way to add code: a plugin that adds code to the site header and one that runs PHP snippets, or a child theme you can edit.
- A Nevian workspace with an active plan (Beginner, Pro or Enterprise), where you are the owner, an admin or a member. Viewers can't connect integrations.
- The two tabs side by side: Nevian on Integrations and your WordPress admin.
Steps
-
In Nevian, open Integrations, click Add integration (Connect provider when nothing is connected yet) and pick WooCommerce. In the Connect WooCommerce window, have the platform open in another tab, then click Next to get your private URL and code.
-
Nevian creates your private Webhook URL. Click the copy button next to it and leave this window open: it shows WooCommerce's first call the moment it arrives.
-
In WordPress, open WooCommerce › Settings, choose the Advanced tab and then Webhooks, and click Add webhook (Create a new webhook when the store has none yet).
-
In Webhook data, set Name to
Nevian, Status to Active, Topic to Order updated and API Version to WP REST API Integration v3. Paste the URL in Delivery URL, leave Secret blank and click Save webhook.
-
WooCommerce sends a ping to turn the webhook on, and the line in Nevian turns Connected. Click Done.
-
Back in WordPress, the saved webhook now shows the Secret WooCommerce created. Copy all of it.
-
In Nevian, click the WooCommerce card in Integrations, open the Connection tab, paste the secret in Webhook secret and click Save. From now on Nevian only accepts calls signed with it.
-
On the same tab, copy Nevian script for your theme into the
<head>of every page (with a header-code plugin or in your theme), and add Click ID snippet (PHP) with a code snippets plugin or to your child theme'sfunctions.php. The snippet saves the click ID on each new order, so the webhook brings it back.
Check that it works
- The WooCommerce card in Integrations says Connected and shows the time of the last event.
- Place a test order and mark it Processing in WooCommerce › Orders (a cash on delivery order counts once it is Completed). It shows up in Logs › Webhooks and as a sale in Logs › Conversions. WooCommerce has no test mode, so open that sale and click Mark as test (owners and admins).
- Open the test sale's details: it should carry the click ID when you reached the store through a Nevian tracking link. Without the snippet, the click ID only reaches an order when WooCommerce's order attribution kept that tracking link's landing page; any other order is tied to its visit by the buyer's email and the order's UTMs.
- Don't also send a purchase from your thank-you page: the order webhook is the sale.
Problems
"WooCommerce reached Nevian, but the call was rejected"
Usually the secret saved in Nevian isn't the one on the webhook, so the signature doesn't match. Copy the Secret again from the webhook in WooCommerce (all of it) and, on the Connection tab, click Replace, paste it and click Save. WooCommerce doesn't resend a refused order, so update that order again once it's fixed.
The webhook's status changed to Disabled
WooCommerce turns a webhook off after more than five failed deliveries in a row. Fix the cause (the whole URL in Delivery URL, the same secret on both sides), set Status back to Active and click Save webhook. WooCommerce keeps its own record under WooCommerce › Status › Logs, source webhooks-delivery.
"no matching click" on a real sale
The order reached Nevian without the click ID. Check that the script is on every page of the store and that the PHP snippet is active, then place an order through a Nevian tracking link to see the click ID on it.
Orders counted twice
Another integration also sends the same orders, for example a checkout such as Adoorei that creates your WooCommerce orders. Connect only one of the two.
WooCommerce explains webhooks in its own webhooks documentation.
Still stuck? Write to [email protected].
Images are drawings of WooCommerce's and Nevian's screens, not screenshots; the real screen may look a little different.