Meta pixel setup for Shopify, start to finish

Updated

Meta pixel setup has two halves that people tend to confuse. In Meta Events Manager you create the pixel, own it inside a Business Manager and configure aggregated event measurement. On Shopify you install the ID and choose which events it receives. Skip the Meta half and your ads still cannot optimise for iOS traffic, however clean the Shopify install is.

Quick steps

  1. Create a Business Manager. Set up business.facebook.com under an account you control, so the pixel is never tied to a personal profile or an agency.
  2. Create the pixel. In Events Manager, choose Connect Data Sources, select Web, name it after the store, and copy the ID.
  3. Verify your domain. Add the DNS TXT record or meta tag Meta supplies, then confirm the domain in Business settings under Brand safety.
  4. Install on Shopify. Paste the pixel ID into a pixel app so it installs through the Web Pixels API and reaches checkout.
  5. Configure aggregated event measurement. Rank your eight priority web events with Purchase first, so iOS conversions still report.
  6. Enable the Conversions API. Turn on server-side tracking with event deduplication to recover blocked events.

Own the pixel from the start

Create the pixel inside a Business Manager that belongs to the store, not to a freelancer, an employee, or a personal Facebook profile. Pixels cannot be transferred between Business Managers. When the relationship ends you either lose the pixel or lose access, and a replacement pixel starts with no history for lookalike audiences.

Grant an agency partner access instead. They get to run ads against your data and you keep the asset.

Verify your domain before anything else

Domain verification is the step most stores skip and then regret. Without it you cannot configure aggregated event measurement, which is the mechanism that decides which conversion events still report from iOS devices.

Meta offers a DNS TXT record, an HTML file upload, or a meta tag. On Shopify the DNS record is the cleanest, because a theme-based meta tag disappears the next time you change themes.

Rank your eight priority events

Aggregated event measurement limits you to eight web events per verified domain, ranked by priority. When an iOS user who opted out of tracking converts, Meta reports only the highest-priority event that fired.

Put Purchase first. Then InitiateCheckout, AddToCart and ViewContent. Custom events and lead forms go below those unless your store genuinely optimises against them. Reordering the list resets the ad sets using it, so decide once rather than tuning it weekly.

Install on Shopify and assign events

On the Shopify side you need an install that survives theme changes and reaches checkout, which means the Web Pixels API rather than a theme snippet.

Pixelfy takes the pixel ID and installs it that way, then lets you tick which of ViewContent, AddToCart, InitiateCheckout and Purchase that pixel receives. If you later add a second Meta pixel for an agency, it slots into the same list.

Turn the Conversions API on at the same time. Setting it up later means comparing two periods with different data completeness, which makes it impossible to tell whether a campaign improved or your tracking did.

Check your event match quality

Events Manager scores each event on match quality out of ten. That score reflects how many customer parameters you send: email, phone, name, city, IP. Higher scores mean Meta attributes more conversions to the right ad.

Browser events carry very few of these. Server-side events sent from Shopify can include hashed email and phone from the order, which is why stores usually see match quality climb by several points after enabling the Conversions API.

Anything below about five is worth investigating. Below three, your attribution is mostly guesswork.

Questions

Is the Meta pixel the same as the Facebook pixel?
Yes. Meta renamed it in 2022 and the underlying tracking code, the fbq function, is unchanged. Documentation and apps use the two names interchangeably.
How many Meta pixels should one Shopify store have?
One is enough for a store running its own ads. Add more only when a separate Business Manager needs its own data, such as an agency or a second regional ad account.

Related guides