Skip to main content
E-commerce

E-commerce Tracking Setup (GA4, GTM, Shopify) 2026

The complete tracking stack for a Shopify store: Pixel + CAPI, GA4, GTM, Klaviyo, Google Ads. Step-by-step, with verification checklist.

Vince Servidad
Vince Servidad
Performance Marketing Consultant
10 min read
Share:

A broken tracking setup costs you 25–40% of attributable conversions. Your campaigns optimize blind. Your reports lie. Your decisions are wrong.

Here's the complete tracking stack for a Shopify store. Build it right once, never think about it again.

TL;DR

  • Pixel + CAPI via Shopify's Facebook channel.
  • Google Tag (GA4) via Shopify's Google channel.
  • Klaviyo via native Shopify integration.
  • Optional: GTM for advanced tracking.
  • Verify with Tag Assistant + Pixel Helper.
  • Step 1: Meta Pixel + CAPI

    Shopify → Settings → Sales Channels → Facebook & Instagram → Connect.

    In the channel:

  • Enable Pixel.
  • Enable Conversions API (CAPI).
  • Enable Customer Data Sharing (Advanced Matching).
  • Verify:

  • Browse your site.
  • Run Pixel Helper extension.
  • Should see PageView, ViewContent, AddToCart, InitiateCheckout, Purchase.
  • Step 2: Domain verification

    Meta → Business Settings → Brand Safety → Domains → Add → Verify via DNS or HTML tag.

    Without verification, AEM (Aggregated Event Measurement) won't work.

    Step 3: AEM configuration

    Events Manager → your Pixel → Aggregated Event Measurement → Configure 8 events:

    1. Purchase

    2. InitiateCheckout

    3. AddToCart

    4. ViewContent

    5. AddPaymentInfo

    6. CompleteRegistration

    7. Lead

    8. Subscribe

    Enable Value Optimization on Purchase.

    Step 4: Google Tag (GA4)

    Shopify → Settings → Sales Channels → Google & YouTube → Connect.

    In the channel:

  • Enable GA4.
  • Enable Customer Data Sharing.
  • Connect to Merchant Center for product feed.
  • Verify:

  • GA4 → Realtime → see events fire when you browse.
  • Step 5: Google Ads conversion tracking

    Same Google channel handles this:

  • Connect Google Ads account.
  • Enable conversion tracking.
  • Enable Enhanced Conversions.
  • Verify:

  • Tag Assistant should show Google Ads conversion firing on your purchase confirmation page.
  • Step 6: Klaviyo

    Shopify → Apps → Klaviyo → Install → Connect.

    Klaviyo auto-syncs:

  • Customer accounts.
  • Order data.
  • Product catalog.
  • Set up flows: Welcome, Abandoned Cart, Abandoned Checkout, Browse Abandonment, Post-Purchase, Winback.

    Step 7: Optional — Google Tag Manager

    If you need advanced custom tracking (TikTok Pixel, Pinterest Tag, custom events):

    Install GTM container in your Shopify theme:

  • Online Store → Themes → Edit code → `theme.liquid` → paste GTM snippets.
  • In GTM:

  • Configure dataLayer for ecom events (requires custom Liquid or third-party app like Analyzify).
  • Add tags as needed.
  • For most stores, GTM is overkill. Native Shopify channels handle 80–90% of needs.

    Step 8: Verification checklist

    Walk through your full purchase flow:

    1. Land on homepage → PageView fires (Pixel + GA4).

    2. Click product → ViewContent + view_item.

    3. Add to cart → AddToCart + add_to_cart.

    4. Begin checkout → InitiateCheckout + begin_checkout.

    5. Enter payment → AddPaymentInfo + add_payment_info.

    6. Complete purchase → Purchase + purchase + Google Ads conversion.

    Each step verified via Pixel Helper + Tag Assistant.

    Common tracking issues

    Pixel events not firing

  • Ad blocker. Test in incognito with no extensions.
  • Channel not connected properly.
  • Pixel ID incorrect.
  • Events firing twice

  • Pixel + CAPI both firing without deduplication.
  • Multiple analytics apps installed.
  • Fix: ensure event_id is consistent.

    Match quality below 7

  • Customer Data Sharing not enabled.
  • Insufficient parameters being passed.
  • Fix: enable advanced matching in Shopify Facebook channel.

    Conversion tracking firing on every page

  • Wrong trigger configured.
  • Code installed in theme.liquid instead of conditional thank-you page.
  • Fix: trigger conversion only on order/thank-you page.

    What to track beyond defaults

    For ecom, also track:

  • Search queries on your site (search event).
  • Wishlist adds.
  • Newsletter signups (already in Klaviyo).
  • Video plays (if you have product videos).
  • FAQ expansions (engagement signal).
  • These don't directly drive revenue but inform optimization.

    Triangulating data

    No single source is 100% accurate.

    For real numbers, compare:

  • Shopify Analytics (source of truth for actual orders).
  • Pixel reported conversions (Meta).
  • GA4 reported conversions (Google).
  • Klaviyo attributed revenue (email/SMS).
  • Variance under 15% across sources is normal.

    If Pixel reports 50% fewer conversions than Shopify: tracking issue, not campaign issue.

    Privacy and compliance

  • Use cookie consent banner (CookieYes, Cookiebot).
  • Honor user opt-outs.
  • Don't pass PII (email/phone) without proper hashing.
  • Shopify's native channels handle this. If you're using GTM for custom tracking, check compliance carefully.

    Maintenance

    Quarterly:

  • Verify tracking still working (technologies change).
  • Audit Pixel events vs Shopify orders (variance check).
  • Update CAPI events if you've added new conversion goals.
  • Want help with tracking setup?

    A clean tracking setup is 4–8 hours of focused work. My Shopify Expert service includes the full stack. Or learn the system in the Shopify Course Philippines.

    Related reading:

  • Meta Ads Conversion Tracking & CAPI Guide
  • Google Ads Conversion Tracking
  • GA4 + Google Ads Integration
  • Vince Servidad

    Written by Vince Servidad

    I've spent over $26M on ads and built my own 7-figure brand from scratch. I don't just 'manage ads'—I build the growth systems that actually scale businesses profitably.

    Want More Marketing Insights?

    Get weekly tips, strategies, and case studies delivered to your inbox.

    Need help with E-commerce?

    Get hands-on support from a performance marketing consultant based in the Philippines.

    Related Articles