Conversion Tracking Fix & Debugging

Fixing Ghost Transactions and Duplicate Purchases in GA4

Fixing Ghost Transactions in GA4

GA4 ghost transaction fix case study

๐Ÿ“ŒIntroduction

An ecommerce site noticed GA4 was reporting transactions with $0 revenue value and multiple duplicate purchase events for single orders โ€” corrupting their revenue data and making accurate financial reporting impossible.

โ—The Problem

GA4 showed 340 purchase events in a month where Shopify recorded 189 orders. Revenue in GA4 was $127K while actual revenue was $94K. Ghost transactions ($0 value) and true duplicates were inflating both transaction count and revenue figures significantly.

๐Ÿ”Identifying the Causes

Two separate issues were found: (1) The purchase event was configured to fire on the order confirmation page URL without a deduplication check โ€” browser back-button presses and page refreshes re-fired the event. (2) A Shopify app had a GA4 integration that fired a second purchase event using a different data format, creating duplicate hits with inconsistent revenue values (sometimes $0).

โš ๏ธConsequences for the Business

GA4 revenue data was unreliable for financial reporting. The finance team had stopped trusting analytics and was reconciling manually against Shopify. Google Ads was optimizing against inflated conversion values, causing smart bidding to over-bid on campaigns.

โœ…Solution

Implemented transaction ID deduplication: stored the transaction ID in sessionStorage immediately after the first purchase event fired, and added a GTM condition to prevent the tag from firing if the ID already existed in storage. Identified and removed the conflicting Shopify app's GA4 integration. Added the transaction_id parameter to GA4's deduplication configuration in the Admin settings.

๐Ÿ“ˆResults

Purchase events aligned to within 2% of Shopify order count (the gap explained by legitimate order cancellations). Revenue reporting became accurate. Google Ads smart bidding was reset and re-trained on clean data, resulting in 24% ROAS improvement over 8 weeks.

๐ŸConclusion

Ghost and duplicate transactions are among the most damaging data quality issues in ecommerce analytics. sessionStorage-based deduplication combined with GA4's built-in transaction ID deduplication provides robust protection.

๐Ÿ’กKey Takeaways

Always use sessionStorage to prevent duplicate fires on page refresh. Configure transaction_id as a deduplication key in GA4 Admin. Audit all third-party apps for hidden GA4 integrations โ€” Shopify apps frequently add tracking without disclosure.

Talk to with Us, It's Free

We are always willing to help a client in need and answer any questions or provide guidance. Let us know what you are looking for, and we will develop a unique and bespoke solution for you.

โš ๏ธ reCAPTCHA site key is not configured

BUSINESS HOURS

Not Available

ADDRESS

No Address

TOLL FREE

No Phone