Cherry Seed

Does caching break WooCommerce purchase tracking?

caching woocommerce purchase-tracking wp-rocket ga4

Quick Answer

Yes — full-page caching plugins can serve stale thank-you pages with wrong transaction IDs, causing GA4 to either deduplicate real purchases or record phantom revenue from cached order data (MDNiamul, 2026). When WP Rocket, LiteSpeed Cache, or W3 Total Cache caches the WooCommerce order-received page, the next customer sees a stale version containing the previous buyer's transaction ID and revenue value. GA4 fires the purchase event with the wrong data. The fix is excluding the order-received endpoint from every caching layer and verifying with test orders after any cache configuration change.

Full Answer

The problem is that WooCommerce's thank-you page URL follows a predictable pattern — /checkout/order-received/ — and caching plugins treat it like any other page unless explicitly told otherwise. When a caching plugin serves Customer B the cached thank-you page from Customer A's order, the GA4 purchase event fires with Customer A's transaction ID and order total. GA4's deduplication then discards Customer B's real purchase as a duplicate, because it already recorded that transaction ID. The store made the sale, but GA4 shows nothing.

The reverse scenario is equally damaging. If the cached page carries a different transaction ID from the one GA4 already has, GA4 records it as a new purchase — phantom revenue that inflates your reports. Either way, the gap between GA4 revenue and WooCommerce order totals widens with every cached thank-you page served.

The immediate fix is adding the order-received endpoint to your caching plugin's exclusion list. In WP Rocket, this goes under Settings → Cache → Never Cache URLs. In LiteSpeed Cache, add it to the Do Not Cache URIs list. After configuring, place two test orders and confirm in GA4 DebugView that each carries its own unique transaction ID. For a broader look at the signs that WooCommerce tracking is silently broken, caching is one of five common failure points that go undetected until you reconcile against actual order data.

Sources

Programmatic Access

GET https://seresa.io/wp-json/cherry-tree-by-seresa/v1/seeds/1123

Cite This Answer

Cherry Tree by Seresa - https://seresa.io/seed/wordpress-tracking/what-is-woocommerce-caching-effect-on-tracking