Thread Transfer
CAPI Setup for Shopify: Step-by-Step Guide
Shopify makes CAPI easy but setup mistakes tank your event match quality. Here's the step-by-step guide to get 95%+ match rates.
Jorgo Bardho
Founder, Meta Ads Audit
Shopify makes CAPI setup easy—in theory. Connect your Business Manager, click a few buttons, and server-side tracking is enabled. But easy setup doesn't mean correct setup. Misconfigured data sharing levels, missing customer information, or deduplication failures can tank your Event Match Quality and leave you worse off than pixel-only tracking.
This guide walks through Shopify's Meta integration step-by-step, with verification checkpoints at each stage. Follow this process and you'll achieve 90%+ Event Match Quality—the level where CAPI actually improves your optimization.
Prerequisites
Before starting, ensure you have:
- Shopify plan with checkout access: Basic Shopify or higher (not Starter)
- Meta Business Manager admin access: You need full permissions to connect
- Verified domain in Business Manager: Required for iOS 14.5 tracking
- Meta Pixel already created: You'll connect an existing pixel, not create new
- Facebook Commerce Account: For catalog sync if you use product ads
Step 1: Install the Meta Sales Channel
Shopify's native Meta integration is called the "Facebook & Instagram" sales channel. This is the recommended approach—avoid third-party pixel apps when possible.
- In Shopify Admin, go to Sales Channels in the left sidebar
- Click the + button to add a sales channel
- Search for "Facebook & Instagram"
- Click Add channel
- Review permissions and click Add sales channel
The channel appears in your left sidebar. Click it to begin setup.
Step 2: Connect Your Meta Account
Click Start setup in the Facebook & Instagram channel. You'll be redirected to Meta to authorize the connection.
- Log into your Meta account if not already logged in
- Select the Business Manager that owns your ad account
- Grant all requested permissions (data access, catalog management, etc.)
- Click Continue through the authorization flow
Important: Use the same Meta account that manages your ad account. Connecting personal accounts or wrong Business Managers causes permission issues later.
Step 3: Configure Data Sharing
This is the critical step most people rush through. Shopify offers three data sharing levels:
Standard
Pixel only. No server-side tracking. Events fire from browser JavaScript. This is effectively no CAPI—avoid this setting.
Enhanced
Pixel + limited CAPI. Server sends events but with minimal customer data. Better than Standard but won't achieve high Event Match Quality.
Maximum
Pixel + full CAPI. Server sends events with all available customer data (hashed email, phone, name, address). This is what you want for optimal tracking.
How to Set Maximum Data Sharing
- In the Facebook & Instagram channel, click Settings
- Find Data sharing section
- Click Maximum
- Review and accept the data sharing terms
- Click Save
Maximum data sharing is compliant with Meta's terms. Customer data is hashed before transmission— Meta receives SHA-256 hashes, not raw data.
Step 4: Select Your Pixel
After setting data sharing level, you'll select which pixel to connect:
- In Data sharing settings, find Pixel section
- Click Connect or Change
- Select your pixel from the dropdown (shows pixels you have access to)
- Confirm selection
If you don't see your pixel, check that your Meta account has access to it in Business Manager settings.
Step 5: Connect Product Catalog (Optional but Recommended)
For product ads (Dynamic Product Ads, Advantage+ catalog), connect your product catalog:
- In channel settings, find Commerce account
- Connect your Facebook Commerce Account (or create one)
- Enable Product sync
- Select which products to sync (all products or specific collections)
Product sync enables content_ids matching between your pixel/CAPI events and your catalog, improving dynamic ad performance.
Step 6: Verify Domain Connection
Ensure your domain is verified and connected:
- In Facebook & Instagram channel, go to Settings
- Check Domain verification status
- If not verified, click to verify via meta-tag or DNS
- Confirm green checkmark showing verified status
Domain verification is required for Aggregated Event Measurement (AEM) configuration, which determines which events are tracked for iOS users.
Step 7: Configure Aggregated Event Measurement
After domain verification, configure your event priorities:
- Go to Events Manager in Meta Business Suite
- Select your pixel → Aggregated Event Measurement
- Click Configure Web Events
- Select your Shopify domain
- Prioritize events (typically: Purchase → InitiateCheckout → AddToCart → ViewContent)
- Click Apply
Changes take up to 72 hours to take effect. Don't make changes during active campaigns if possible.
Testing Your Setup
Test 1: Pixel Helper Verification
- Install Meta Pixel Helper Chrome extension
- Browse your Shopify store
- Check Pixel Helper shows PageView on all pages
- View a product—verify ViewContent fires
- Add to cart—verify AddToCart fires
- Start checkout—verify InitiateCheckout fires
This confirms browser-side tracking is working.
Test 2: Events Manager Verification
- Go to Events Manager → Your Pixel → Test Events
- Enter your store URL and click Open Website
- Complete a test purchase (use Shopify Bogus Gateway for testing)
- Return to Test Events and verify both Browser and Server events appear
- Check that event_ids match for deduplication
Test 3: Event Match Quality Check
- In Events Manager, go to your pixel's Overview
- Find Event Match Quality score for Purchase events
- Target: 8+ out of 10 for Purchase events
- If below 6, review data sharing settings and customer info flow
Troubleshooting Common Issues
Issue: CAPI Events Not Appearing
Symptoms: Pixel Helper shows events, but Events Manager shows no server events.
Causes:
- Data sharing set to Standard instead of Maximum
- Connection error between Shopify and Meta
- Pixel not properly selected in channel settings
Fix:
- Go to Facebook & Instagram channel → Settings
- Verify Data sharing is set to Maximum
- Disconnect and reconnect the channel if needed
- Wait 1-2 hours and test again
Issue: Low Event Match Quality (Below 6)
Symptoms: EMQ score is poor despite Maximum data sharing enabled.
Causes:
- Customers not providing email at checkout
- Guest checkout without account creation
- Missing fbc/fbp cookie capture
Fix:
- Require email for checkout (Shopify default)
- Enable customer accounts or encourage account creation
- Ensure no cookie consent tool is blocking Meta cookies
- Check that checkout isn't on a different domain
Issue: Duplicate Conversions in Ads Manager
Symptoms: Conversion count is approximately 2x actual purchases.
Causes:
- Multiple pixel installations (Shopify native + manual code)
- Third-party app also firing pixel events
- Deduplication failing due to mismatched event_ids
Fix:
- Check theme code for manual pixel installation—remove if present
- Audit all apps for pixel functionality—disable overlapping tracking
- Verify event_ids match in Test Events between browser and server
- Use only Shopify's native Meta integration
Issue: Checkout Events Not Firing
Symptoms: ViewContent and AddToCart work, but checkout events don't appear.
Causes:
- Checkout on different domain (Shopify checkout vs custom domain)
- Checkout customizations breaking event flow
- Payment gateway redirect interrupting tracking
Fix:
- Ensure checkout domain matches storefront domain where possible
- Review any checkout customizations or apps
- Test with Shopify's default checkout flow
Advanced Configuration
Custom Events
Shopify's native integration handles standard ecommerce events. For custom events (newsletter signup, account creation, specific page views), you may need additional configuration:
- Use Shopify's Customer Events API (for Plus merchants)
- Add custom pixel code for specific actions via theme editor
- Consider a third-party tool like Elevar for advanced event configuration
Multi-Store Setup
If you have multiple Shopify stores:
- Each store needs its own pixel (or shared pixel with domain distinction)
- Connect each store to the same Business Manager for unified reporting
- Configure AEM separately for each domain
Headless Shopify
If using Shopify as a backend with a custom frontend:
- Native integration won't work for frontend events
- Implement pixel manually on custom frontend
- Use Shopify webhooks + custom CAPI implementation for server events
- Consider server-side GTM for event orchestration
Monitoring Ongoing Performance
Weekly Checks
- Review Event Match Quality scores—should stay above 7
- Compare browser events vs server events—server should match or exceed browser
- Check for any error notifications in Events Manager
After Store Changes
Any significant store change requires re-verification:
- Theme changes—test all events with Pixel Helper
- New apps—check for duplicate tracking
- Checkout modifications—verify InitiateCheckout and Purchase events
- Domain changes—update verification and AEM configuration
Key Takeaways
- Use Shopify's native Facebook & Instagram channel—avoid third-party pixel apps
- Set data sharing to Maximum for full CAPI functionality
- Verify domain before connecting pixel
- Configure AEM with Purchase as highest priority
- Test both browser and server events before relying on data
- Target Event Match Quality of 8+ for optimal optimization
- Remove any duplicate pixel installations from theme code or apps
FAQ
Do I need Shopify Plus for CAPI?
No. CAPI works on all Shopify plans (Basic, Shopify, Advanced, Plus). The native Meta integration handles server-side tracking on all plans. Plus offers additional customization options but isn't required for CAPI.
Should I remove manual pixel code after enabling native integration?
Yes. If you previously installed pixel code manually in your theme, remove it after enabling the native integration. Running both causes duplicate events and inflated conversion counts.
How long until I see improved data after enabling CAPI?
Server events appear in Events Manager within hours of setup. Event Match Quality improvements show within 24-48 hours. Full impact on campaign optimization takes 1-2 weeks as the algorithm incorporates new data.
Will CAPI track customers who use ad blockers?
Yes. Since CAPI sends data server-to-server, ad blockers can't prevent it. This is the primary benefit—capturing conversions that browser-side tracking misses.
Learn more: How it works · Why bundles beat raw thread history