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.

Share:

Tracking errors can distort the evidence used for campaign decisions. Start by documenting the events and values the business needs, then test the collection path.

This guide covers the main integration checks for a Shopify store. Revisit them after relevant theme, checkout, app or consent changes.

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.

    Confirm domain ownership and follow the verification requirements currently shown for the relevant integration. Domain ownership and event accuracy are separate checks.

    Step 3: AEM configuration

    Check the current event and attribution settings available in the account. Do not add a manual eight-event ranking step because an older tutorial includes it. Record the business outcome, selected event, collection method, value definition and attribution window separately. Validate the actual customer path and investigate differences against order or lead records.

    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 free Shopify videos on YouTube.

    Related reading:

  • Meta Ads Conversion Tracking & CAPI Guide
  • Google Ads Conversion Tracking
  • GA4 + Google Ads Integration
  • Apply it to your account

    Need help applying it?

    Share your website, goal and current setup. We can discuss whether the project is a fit and agree on the scope before work starts.

    Get a project review

    Landing page & funnel CRO

    Back to all articles ↗

    Vince Servidad

    PPC & Creative Strategist | Google Ads & Meta Ads

    Remote work for ecommerce and lead-generation businesses in the US, UK, Australia, New Zealand, Canada, the Philippines, and other international markets.

    © 2026 Vince ServidadPrivacy & termsHistorical results are not guarantees. Outcomes vary by business, market, and execution.