Docs
← Back to site

WooCommerce

5 min readUpdated November 18, 2026

With WooCommerce on a client’s website, the WordPress connector plugin counts the shop’s whole path from product to paid order, and puts the revenue next to the visit that brought the buyer. Nothing needs setting up: it starts as soon as the connector is connected and WooCommerce is active.

What is counted#

EventWhenDetails
Added to cartA product is added to the cartAny Add to cart button: product pages, shop and category lists (AJAX), and the WooCommerce cart and product blocks. Two adds within half a second count once
Checkout startedThe checkout page is openedClassic checkout and the Checkout block
PurchaseThe order is paid, or placed with a pay-later methodRevenue = the order total, in the shop’s currency. Properties: items (number of items), payment (the payment method’s title) and coupon (the codes used, if any)

The first time a shop event arrives, the website gets the shop goals (Added to cart, Checkout started, Purchase) and a Shop checkout funnel (Added to cart → Checkout started → Purchase) by itself. You can rename or remove them in Site settings › Goals & funnels.

How a purchase is counted, exactly once#

1. From the website’s server, when the order is paid. The connector listens to WooCommerce’s own order events: payment complete, and the order moving to On hold (bank transfer, cheque, cash on delivery), Processing or Completed. It sends the Purchase with the buyer’s IP address and browser saved on the order, so the platform joins it to the buyer’s visit: the sale is credited to the source, campaign and landing page that brought them.

This way works:

  • with the classic checkout and the Checkout block;
  • when the payment is confirmed later, after the buyer has left (PayPal, Stripe webhooks, a bank transfer marked paid days later);
  • when the buyer’s browser blocks the tracking script, or closes before the thank-you page loads.

The order is marked as sent before the request goes out, so a retry or a second status change never counts it twice. If the platform does not accept it, the mark is removed so the browser can count it instead.

2. From the buyer’s browser, on the order-received page. Only when the first way could not run: the website’s connection code is an old one without forwarding details, or the order has no IP address (an order created by hand in wp-admin). The thank-you page then sends the Purchase from the buyer’s browser.

Orders that are not counted#

  • Orders that are failed, canceled, refunded or still a draft.
  • Orders by customers whose WordPress role is not counted (the connector’s What to count › roles). Use this to leave out your own test orders made while signed in as an administrator or shop manager.
  • Orders created by hand with no buyer address are counted only if someone opens their order-received page.

A refund after the purchase was counted does not take the revenue back off the chart.

Several currencies#

Revenue is counted in the shop’s own currency (WooCommerce › Settings › General › Currency). When a buyer pays in another currency through a multi-currency plugin, the total is converted back to the shop’s currency at the rate saved on the order at checkout, so later rate changes never change past sales. The amount the buyer actually paid is kept with it, in the properties paid_currency and paid_amount.

Supported multi-currency plugins: WooPayments multi-currency (WC Currency Switch), CURCY – Multi Currency for WooCommerce, FOX – Currency Switcher (WOOCS) and Aelia Currency Switcher. Another plugin can supply the converted amount with the nahnu_analytics_connector_store_currency filter.

All sites and the client portal add revenue from websites in different currencies with your display currency (see Nahnu Analytics › Goals, funnels & revenue › Revenue).

Where it shows#

  • The website’s key numbers: Revenue and conversion rate.
  • Goals & events: Added to cart, Checkout started and Purchase, with visitors, conversion rate and revenue.
  • Funnels: the Shop checkout funnel with its drop-off at each step.
  • Paths to conversion: the sources, campaigns and pages that lead to purchases, first touch and last touch.
  • Top sources and Campaigns with revenue per source.
  • Email reports and the client portal.
Goals & events with Added to cart, Checkout started and Purchase
The Shop checkout funnel
Paths to conversion for purchases

Turning it off#

On the client’s WordPress, open the connector’s settings page, What to count, switch off WooCommerce, and click Save changes. Shop events stop; the stats already counted stay.

What to count with the WooCommerce switch

For developers#

Change the Purchase event, or leave an order out, with a filter on the client’s WordPress:

// Add a property, or count revenue without tax and shipping.
add_filter( 'nahnu_analytics_connector_purchase', function ( $event, $order ) {
    $event['p']['shipping'] = $order->get_shipping_method();
    $event['m']['a']        = (float) $order->get_subtotal();
    return $event; // Return false to skip this order.
}, 10, 2 );

The event has c (its name), m (revenue: a amount, c currency) and p (properties, text values).

Troubleshooting#

What you seeWhy, and what to do
Purchases appear without a source (Direct)The order has no buyer address (made by hand), or the connection code is an old one: paste a new connection code (Site settings › Installation)
A purchase counted twiceShould not happen: each order is marked once sent. Check that the same order was not placed twice
No purchases at allCheck the WooCommerce switch in What to count, and that the shop’s orders reach Processing or Completed. Settings › Health › Debug shows whether visits get through
Revenue in the wrong currencyCheck the website’s Revenue currency (Site settings › General): Automatic uses the currency of its sales

Was this helpful?