Case study · Meta Pixel & CAPI

Meta Pixel, Conversions API & GA4 eCommerce Tracking for Modalclo (Shopify)

Every click, correctly attributed.

Client
Modalclo
Industry
Fashion & Apparel eCommerce
Channel
Meta Ads (Facebook / Instagram)
Location
Bangladesh
  • Meta Pixel
  • Conversions API
  • GA4 Enhanced eCommerce
Modalclo Meta Pixel & CAPI
Web GTM container with Fb Browser Pixel, Fb Server and GA4 ecommerce tags
01/ 10

Web GTM container with Fb Browser Pixel, Fb Server and GA4 ecommerce tags

Setup architecture

Modalclo tracking architecture

How the setup in this project is connected, from the website to each platform.

About Modalclo

Modalclo is a Bangladeshi D2C fashion brand specializing in modal-fabric loungewear, lingerie and everyday outfits, designed for comfort in Dhaka's heat and humidity. The store runs on Shopify and needed reliable ad tracking and eCommerce analytics to scale on Meta Ads.

Project overview

Ad spend was going up, but attribution was not keeping up. Modalclo was investing in Facebook and Instagram ads with no server-side tracking, so the browser-only Pixel lost events to ad blockers, iOS privacy restrictions and cookie limitations. GA4 was not capturing the Shopify purchase funnel accurately, so it was impossible to tell which campaigns were driving sales.

I implemented Meta Pixel with a deduplicated server-side Conversions API alongside a fully structured GA4 Enhanced eCommerce setup, giving the brand accurate, privacy-resilient tracking on both platforms.

Goals

  • Implement Meta Pixel + Conversions API for reliable, deduplicated event tracking
  • Track the full Shopify funnel: view_item → add_to_cart → initiate_checkout → purchase
  • Recover conversions lost to iOS 14.5+ and ad-blocker attribution gaps
  • Set up GA4 Enhanced eCommerce that matches Shopify product and order data
  • Build a single source of truth for ROAS and campaign performance

Challenges

  • The browser-only Pixel was missing a significant share of purchase events
  • No server-side (Conversions API) tracking existed
  • GA4 was not receiving Shopify's eCommerce data structure correctly
  • Facebook Ads Manager conversion numbers were inconsistent with actual Shopify orders
  • No event deduplication between Pixel and server-side events
  • Product- and variant-level data (size, color) was not passed to either platform

Strategy

I built a dual-layer browser + server tracking architecture in which the Meta Pixel and Conversions API work together with proper event deduplication, paired with a GA4 enhanced ecommerce setup mapped directly to Shopify product and checkout data. The goal was attribution accuracy, server-side tracking, full funnel visibility and consistent numbers across ad platforms and analytics.

What I implemented

Meta Pixel (browser-side)

  • PageView
  • ViewContent
  • AddToCart
  • InitiateCheckout
  • Purchase
  • whatsapp_click

Conversions API (server-side)

  • event_id deduplication
  • Hashed customer data
  • Event time
  • IPv6
  • All standard events
  • whatsapp_click

Google Analytics 4

  • page_view
  • view_item
  • add_to_cart
  • begin_checkout
  • purchase
  • whatsapp_click

Conversion mapping & Meta Ads integration

  • Marked purchase and generate_lead as key events in GA4, aligned with the brand's actual revenue actions
  • Connected Meta Pixel + Conversions API data to Ads Manager for conversion tracking and custom/lookalike audiences

Validation

  • Meta Events Manager test events
  • GA4 DebugView
  • Pixel Helper
  • Deduplication check (Pixel vs CAPI)

Tools used

  • Google Tag Manager
  • Google Analytics 4
  • Pixel Helper
  • Stape.io
  • Tag Assistant
  • Shopify

Results

  • Purchase event capture: from partial, browser-only Pixel to recovered via Pixel + Conversions API
  • iOS / ad-blocker data loss: from significant event loss to recovered server-side via CAPI
  • Event deduplication: from none (risk of double-counting) to full Pixel + CAPI deduplication
  • GA4 eCommerce data: from incomplete or missing item data to a full funnel with product-level detail
  • ROAS reporting: from inconsistent across platforms to consistent, trustworthy ROAS

Want results like Modalclo?

Get a free audit of your tracking and ad account. Usually replies within 1–2 hours.