How WebCareSG Fixes Broken Ad Tracking (Case Study)

How WebCareSG Fixes Broken Ad Tracking (Case Study)


In the world of digital advertising, accurate tracking isn't just important—it's everything. Without precise data on conversions, your ad spend is flying blind, making optimization impossible and leading to significant losses. We recently partnered with an e-commerce client who was struggling with severely broken ad tracking, resulting in an estimated $10,000 per month in lost sales due to misattributed or untracked conversions. This case study outlines how WebCareSG diagnosed the complex issues and implemented robust solutions, ultimately recovering our client's lost revenue and optimizing their ad performance.

The Client: An E-commerce Retailer with Untracked Potential

Our client, a growing e-commerce brand specializing in sustainable home goods, relied heavily on Google Ads and Facebook Ads for customer acquisition. Despite significant ad spend, their reported sales in Google Ads and Facebook Ads Manager were consistently far lower than their actual sales in Shopify. This discrepancy meant their ad platforms weren't accurately recording conversions, leading to:

  • Ineffective bidding strategies (as platforms couldn't optimize for real conversions).
  • Misleading ROAS (Return on Ad Spend) calculations.
  • Difficulty scaling profitable campaigns.
  • Wasted ad budget on underperforming keywords and audiences.

They suspected tracking issues but lacked the in-house expertise to pinpoint and resolve the underlying problems across their Google Tag Manager (GTM), Google Analytics 4 (GA4), and Facebook Pixel/Conversions API (CAPI) setups.

The Problem: A Web of Disconnected Tracking

Upon initial audit, WebCareSG uncovered a multi-faceted problem:

  1. Broken Google Ads Purchase Conversions: Google Ads was reporting a minimal number of purchases. The primary issue was that the Google Ads conversion tag (via GTM) was not reliably firing on the thank-you page, and when it did, it often lacked dynamic values like transaction ID and conversion value. (See our guide on WooCommerce Sales Not Tracking in Google Ads? Fix It Now, which details similar issues).
  2. Inconsistent Facebook Pixel Events: While the Facebook Pixel base code was present, critical events like "AddToCart," "InitiateCheckout," and "Purchase" were firing inconsistently or with missing parameters. This led to unreliable custom audiences and poor ad optimization. This is a common challenge, as detailed in Facebook Pixel Not Working? How to Troubleshoot.
  3. Untracked Server-Side Events (CAPI): The client had attempted a Facebook Conversions API (CAPI) setup, but it was sending "No Events Received" to Facebook's Events Manager. This meant critical server-side data was not being captured, making them highly vulnerable to browser tracking limitations (like iOS 14+ and ITP). Our insights from How to Fix ‘No Events Received’ in Facebook Events Manager were directly applicable.
  4. Duplicate GTM and Hardcoded Pixels: There was a mix of GTM-deployed tags and old, hardcoded pixel scripts directly in the website's theme files, leading to duplicate data and inflated counts for some events.
  5. Data Layer Inconsistencies: The website's dataLayer, which GTM relies on to pull dynamic information (like order values, product IDs), was not consistently populated or structured, especially after the purchase event.

WebCareSG's Solution: A Multi-Point Tracking Overhaul

Our approach involved a systematic overhaul of their entire tracking infrastructure:

  1. GTM Consolidation & Clean-up:

    • We audited their existing Google Tag Manager container, removing redundant tags and triggers.
    • All hardcoded pixel scripts were identified and removed from the theme files, ensuring GTM was the sole source of truth for client-side tracking.

  2. Robust Data Layer Implementation:

    • We implemented a comprehensive dataLayer script to ensure that all crucial e-commerce events (view_item, add_to_cart, begin_checkout, purchase) and their associated dynamic values (product IDs, prices, quantities, transaction IDs, revenue) were accurately pushed to the dataLayer. This involved collaborating with their development team to ensure server-side PHP was correctly feeding data into the client-side dataLayer.
    • We ensured that their e-commerce platform consistently provided the necessary purchase data to the dataLayer, which is a common challenge we tackle, similar to issues found when debugging server-side tracking.

  3. Accurate Google Ads Conversion Tracking via GTM:

    • We rebuilt the Google Ads Conversion Tracking tag in GTM, ensuring it fired reliably on the purchase confirmation page.
    • Crucially, we configured the tag to pull dynamic value, currency, and transaction_id parameters directly from the newly structured dataLayer. This allowed Google Ads to receive precise revenue and transaction data for optimization.

  4. Optimized Facebook Pixel & CAPI Setup:

    • We configured all standard Facebook Pixel events (PageView, ViewContent, AddToCart, InitiateCheckout, Purchase) within GTM, ensuring they fired correctly with all required e-commerce parameters.
    • We then implemented a robust Facebook Conversions API (CAPI) setup, sending purchase events directly from the client's server to Facebook. This was done either via a direct API integration or a server-side GTM setup.
    • Deduplication Logic: A key part of the CAPI implementation was ensuring proper deduplication. We made sure both the client-side pixel and the server-side CAPI events sent the same unique event_id for each transaction, preventing duplicate reporting in Facebook Ads Manager. This ensures accurate ROAS calculation and efficient ad delivery.

  5. GA4 E-commerce Event Implementation:

    • We leveraged the improved dataLayer to send comprehensive e-commerce events to Google Analytics 4 (GA4), providing the client with detailed insights into their sales funnel and product performance. We ensured the Shopify Google Analytics 4 (GA4) Setup Guide principles were applied.

  6. Thorough Testing & Debugging:

    • Every change was rigorously tested using GTM Preview mode, Facebook Pixel Helper, and Google Analytics DebugView to ensure data flowed correctly to all platforms.
    • We conducted multiple test purchases, verifying that values and events were precisely recorded at each stage of the funnel.

The Results: Recovered Sales and Optimized Ad Spend

Within weeks of WebCareSG's intervention, the client saw a dramatic improvement in their ad tracking accuracy:

  • $10,000+ Recovered Sales per Month: The most immediate and impactful result was the accurate reporting of purchases in both Google Ads and Facebook Ads. Our client's ad platforms started reflecting their true sales volume, revealing that over $10,000 in monthly sales had been previously untracked.
  • Improved Ad Performance: With accurate conversion data, Google Ads and Facebook Ads were able to optimize effectively. The client saw a significant improvement in campaign performance metrics, including lower Cost Per Acquisition (CPA) and higher Return on Ad Spend (ROAS).
  • Reliable Data for Decision Making: The client now has clean, reliable data in GA4, Google Ads, and Facebook Events Manager, empowering them to make informed decisions about their marketing strategy and confidently scale their ad campaigns.
  • Future-Proofed Tracking: The robust CAPI implementation ensures their tracking remains resilient against ongoing browser privacy changes and ad blocker limitations.

This case study demonstrates the critical importance of expert ad tracking implementation. Broken tracking can silently drain your ad budget and obscure your path to growth. At WebCareSG, we specialize in diagnosing and fixing these complex issues, ensuring your digital marketing efforts are built on a foundation of accurate data. If your ad tracking is underperforming or broken, contact WebCareSG today to unlock your true marketing potential.


Related WebCare Solutions

What Are Keywords and How Do I Find Them?

A beginner-friendly guide to understanding keywords and mastering basic keyword research. Learn about search intent and leverage free Google tools like search suggestions and "People also ask" to uncover what your customers are truly searching for.

How to Fix Infinite Redirect Loops and Too Many Redirects Errors

Learn how to diagnose and fix infinite redirect loops and "Too Many Redirects" errors in websites, including WordPress, .htaccess, Nginx, and Cloudflare.

How to Fix Website Downtime & Server Errors (500, 502, 503)

Learn how to diagnose and fix common server errors (500, 502, 503) to restore website functionality.

Ready to get started?

Focus on your business while we fix your website. Contact WebCareSG today for fast, reliable solutions!

Whatsapp us on

+65 9070 0715