Payment redirects
Buyers pay in a banking app or on a payment page and come back in another browser, where PostHog does not know them, or is still waiting for cookie consent.
Open-source WordPress plugin · PostHog for WooCommerce
Exactly once, on the visitor who placed it. 99Trace sends purchases, refunds and cancellations from your shop's server, so payment redirects, in-app browsers and ad blockers no longer lose orders.
The problem
Most PostHog setups for WooCommerce record a purchase on the thank-you page, in the buyer's browser. Four ordinary things make that page unreliable.
Buyers pay in a banking app or on a payment page and come back in another browser, where PostHog does not know them, or is still waiting for cookie consent.
A shopper browses inside Instagram or Facebook, pays, and lands in Safari or Chrome: one buyer, two visitors.
When PostHog is blocked in the browser, the purchase is never recorded.
A reloaded or reopened thank-you page records the same order again.
Because the loss depends on payment method and device, it can bias an A/B test, not only shrink it.
What 99Trace does
Order Completed is sent when WooCommerce marks the order paid, timestamped at the payment, with an event ID derived from the order. Retries and reloads never count it twice.
The buyer's PostHog identity is saved with the order at checkout, before any redirect. The purchase is sent under it, whichever browser the buyer finishes in.
Also from the server, so revenue in PostHog follows WooCommerce.
Product Added, Checkout Started and coupon events at the moment WooCommerce changes the cart, also when PostHog is blocked in the browser.
posthog-js and your shop share one first-party visitor ID, so browser and server events land on the same person without merging.
Feature flags and experiments keep working, and the flags a buyer had at checkout are copied onto the purchase for auditing.
Switch on the browser module and 99Trace runs posthog-js for you: page views, autocapture, heatmaps, web vitals, session replay, surveys and error tracking, each following your PostHog project's settings or overridden from WordPress. On order and account pages, replay, heatmaps and element text are always off.
WooCommerce → Status → 99Trace shows how many paid orders were sent, and how many are linked to a visitor, by payment method. Each order shows the identity saved at checkout and the delivery of every event.
How it works
posthog-js and 99Trace share one first-party visitor ID. Cart and checkout events go out from the server under that ID, also when an ad blocker stops PostHog in the browser.
Before the buyer leaves for the payment page, 99Trace saves their PostHog identity, session and feature flags with the order.
A banking app, a payment page, another browser: where the buyer finishes no longer decides whether the order is counted.
When WooCommerce marks the order paid, your server sends Order Completed once, at the payment time, under the saved identity. A later refund lands on the same person.
Events
Each event can be switched off or renamed, and is still sent exactly once. Amounts are numbers: revenue is the amount charged, net_revenue the merchandise after discounts.
| Event | Sent from | When |
|---|---|---|
Order Completed | Server | The order is paid (once, at the payment time) |
Order Refunded | Server | A full or partial refund of a sent purchase |
Order Cancelled | Server | A sent purchase is cancelled |
Payment Failed | Server | Payment fails or is cancelled before the order was paid |
Checkout Started | Server | The checkout opens with items in the cart |
Product Added, Product Removed | Server | WooCommerce changes the cart |
Coupon Applied, Coupon Removed | Server | A coupon is added or removed |
Product Viewed, View Category, Cart Viewed | Browser | A product, category or cart page is viewed |
Order Confirmation Viewed | Browser | The thank-you page is seen (once per order and browser) |
$pageview, $pageleave, $autocapture, $dead_click | posthog-js | PostHog's own events |
Every property and its source: docs/properties.md.
Privacy and control
No plugin makes a shop GDPR compliant on its own: what you need depends on your country, your shop and what you record. 99Trace gives you the controls, and PostHog's EU or US Cloud or a self-hosted PostHog.
Screenshots






Install
Requirements: WordPress 6.5+, WooCommerce 8.7+, PHP 8.0+, and a PostHog project on PostHog Cloud (EU or US) or self-hosted.
99trace).Switching from 99Hog for WooCommerce? 99Trace is its new name. Activate 99Trace, deactivate 99Hog, then clear your page cache: settings, queued events and visitor IDs carry over, and 99Trace waits with a notice while 99Hog is still active.
Questions
Yes: a project on PostHog Cloud (EU or US) or a self-hosted PostHog. PostHog's free tier covers many shops.
No. While another PostHog plugin is active, 99Trace never loads posthog-js, because two copies on one page split every visitor in two. It sends only its server events, under the visitor the other plugin's cookie names. Purchases paid before 99Trace started sending to your project are never sent again.
Yes. Block and classic checkouts, WooCommerce's custom order tables (HPOS) and checkout plugins such as FunnelKit are supported. A checkout that does not run the browser module still gets the visitor from the cookie.
Cart and checkout events are sent after the page has gone to the shopper. Order events are sent in the background by WooCommerce's Action Scheduler. posthog-js loads asynchronously, as PostHog's own snippet does.
Order events are retried for about two days, and an hourly check queues any paid order that was missed. Each retry sends the same event with the same ID, so nothing is counted twice.
Yes. In Test mode, 99Trace works out every event and writes it to WooCommerce → Status → Logs without sending anything, and PostHog runs in the browser without recording.
Open source
99Trace is GPL-2.0-or-later. Every change runs PHP 8.0 to 8.4, more than 200 checks on a real WordPress and WooCommerce, and Plugin Check, the WordPress.org review tool. Issues and pull requests are welcome.
Made by 99Ways
99Ways is a research-led experimentation and CRO studio. We built 99Trace for experiments, where a purchase counted twice, or on the wrong visitor, changes the result.