What are the Meta Pixel and Conversions API?
The Meta Pixel and Conversions API do the same job in two different ways: they tell Meta what people do in your shop after they click an ad. Meta calls each of these actions an event: somebody opened a product page, added a product to the cart, paid.
- Meta Pixel. A piece of code on your website. It runs in the visitor’s browser, so an ad blocker, a slow connection or a half-loaded page can stop it.
- Conversions API (often shortened to CAPI). The same events, sent from the server of your shop or shop platform straight to Meta. Meta’s help page says this data is less affected by browser loading errors, connectivity issues and ad blockers.
Think of a shop with two doors. The Pixel is the doorman who counts customers but sometimes steps away. The Conversions API is the till: every paid order passes through it. Meta recommends using both and sending the same events through each, because the Conversions API catches what the Pixel misses.
What is a Dataset in Events Manager?
If you look for your Pixel in Meta Events Manager and find the word Dataset instead, nothing is broken. Meta is merging website, app, offline and messaging events into one view and calls it a dataset. For an online shop it is the box where both the Pixel and the Conversions API drop their events.
Meta’s help page says a Dataset ID works the same way as a Pixel ID, and a converted Pixel keeps its number. So "Pixel ID" in a plugin and "Dataset ID" in Events Manager usually mean the same number. One shop needs one Dataset: two would split your data in half.
Which events does an online shop need?
Meta has a list of ready-made standard events. A shop needs five of them, from the first visit to the paid order.
| Event | When it fires | What Meta uses it for |
|---|---|---|
| PageView | Any page loads. It is part of the Pixel base code. | Shows that the Pixel is alive; website visitor audiences |
| ViewContent | A product page is opened | Knows which products interest people |
| AddToCart | A product is added to the cart | Add-to-cart audiences for retargeting |
| InitiateCheckout | The checkout is started | Shows where people drop off |
| Purchase | The order is completed, usually on the thank-you page | Sales campaigns, Purchases and ROAS in reports |
Purchase needs a value and a currency. The Meta for Developers reference lists both as required: they let you measure return on ad spend and optimize for value. The example code defaults to 0.00 USD, so a Purchase event pasted in by hand and never edited reports every order as zero dollars.
An example: a shop in Tallinn sells a wool blanket for 59.90 euros. A correct Purchase event carries value 59.90 (a plain number with a decimal point, no currency sign) and currency EUR (a 3-letter code). The Shopify and WooCommerce integrations below fill these in from the real order, so you do not type anything.
How to set up Meta Pixel and Conversions API on Shopify
On Shopify you do not paste code. Meta’s own app for Shopify, Facebook and Instagram, sets up the Pixel and the Conversions API together. You need a store that is not password protected, the Basic Shopify plan or higher, a Facebook Page for the business and a Meta business portfolio that owns the Page and where you are an admin.
- In Shopify admin click Sales channels, select Facebook and Instagram and click Add app, then Add sales channel.
- Click Start setup, then Login with Facebook and sign in with the account that manages your business.
- Follow the prompts and connect your business portfolio, Facebook Page, ad account and Meta Pixel. If you already have a Dataset, pick it here instead of creating a new one.
- Accept the terms and click Submit.
- In the data sharing settings of the app, choose Enhanced or Maximum. Meta’s help page names this step for turning on the Pixel together with the Conversions API.
- In the data access settings, choose Always on or Optimized. Meta recommends Always on.
How to set up Meta Pixel and Conversions API on WooCommerce
WooCommerce uses Meta’s official plugin, Meta for WooCommerce (formerly Facebook for WooCommerce). It sets up the Meta Pixel and the Conversions API and syncs your products to a catalog. You need the WordPress administrator role, WooCommerce installed, control of your Meta business portfolio and two-factor authentication turned on for it.
- In the WordPress dashboard go to Plugins and click Add New Plugin.
- Search for "Meta for WooCommerce", click Install Now, then Activate.
- Click Marketing in the left menu, choose Facebook and click Get started.
- Log in to Facebook and follow the prompts: create or choose the business portfolio, Facebook Page, Instagram profile, catalog, ad account and Meta Pixel.
- Enter the shop details the plugin asks for and authorize the connection. Meta says the rest can take 10 to 30 minutes to finish.
Keep the plugin updated. If you used another Pixel plugin before, or Pixel code was once pasted into the theme by hand, switch it off so that only one sender is left: two senders for the same Pixel is the classic reason for double counted events. The same goes for hand-pasted code in a Shopify theme.
How to test your events in Events Manager
Do not trust a green tick in a plugin. Buy something from your own shop and watch the events arrive.
- Open Meta Events Manager, click Datasets in the left menu (some accounts show Data sources) and select your Dataset.
- Click Test events. Keep this page open: Meta records website activity only while the Test events page is open.
- Enter your shop’s address and click Open website. Turn off your ad blocker first.
- Walk the whole path: open a product, add it to the cart, start the checkout and place a test order.
- Back in Test events you should see PageView, ViewContent, AddToCart, InitiateCheckout and Purchase, each within about a minute.
- Click on Purchase and check that value and currency match the order, for example 59.90 and EUR.
If nothing shows up, Meta’s troubleshooting page suggests disabling ad blockers, refreshing the shop and trying again, or switching to another browser. Test activity stays in the tab for 24 hours or until you click Clear activity.
Deduplication: why one order must not count twice
When the Pixel and the Conversions API both report the same order, Meta receives two Purchase events for one sale. Deduplication is Meta noticing that the two describe the same thing and keeping only one. Without it, Meta’s help page warns, conversion numbers are artificially high and ROAS looks better than it is.
Meta deduplicates two events when the event name is the same and both carry the same event ID, a code your shop gives to that one action. Meta’s help page says partner integrations such as Shopify and WooCommerce handle this automatically. To check, open an event in Events Manager, click View details and look at the Event deduplication tab. One trap: Events received in the overview is the sum of browser and server events before deduplication, so it normally looks roughly double.
Event match quality in plain words
An event is only useful to Meta if it can connect it to a person with a Meta account. Event match quality is a score from 0 to 10 that shows how well the customer information sent with your server events does that. Meta calculates it from the last 48 hours of data.
More customer information on each event raises it. Meta ranks email and click ID as high priority; phone number, country and browser ID as medium; name, city and postcode as low. The information is hashed before it is sent, and Meta’s terms require that you have the lawful right to share it. Early events such as PageView always score lower than Purchase, because a visitor who has not typed an email yet is harder to recognise.
A checklist before you spend money on ads
- One Dataset for the shop, and it is the one selected in the Shopify app or the WooCommerce plugin.
- All five events arrive in Test events during one test order.
- Purchase shows the real order value and EUR, not 0.00 or USD.
- Events arrive from both browser and server, and the Event deduplication tab shows them being matched.
- No old hand-pasted Pixel code or second Pixel plugin is still running.
- The cookie banner still works: test once with Deny and once with Accept. The Conversions API is not a way around consent; Meta says it is not designed to bypass privacy rules.
- The Diagnostics tab in Events Manager shows no open problems.
Two ways to put the Dataset to work in your ads
A working Dataset is what lets a Sales campaign learn who buys. One honest note first: Longneckhorse does not install the Pixel or the Conversions API in your shop. Shopify’s app or the WooCommerce plugin does that. Longneckhorse uses the Dataset once it exists.
Way 1: Longneckhorse
- Open Connections and connect Meta Ads. After the Meta login you choose the Ad account, the Facebook Page, an optional Instagram account and the Dataset / Pixel. The field says "Optional for Traffic, required for Sales".
- Make the ad in the Image Creator or Video Creator, from your product photo or a template in Templates.
- Open Meta Ads. Start simple takes visuals from My Library, a text, a headline, a link, a country and a daily budget. With a Dataset connected it creates the campaign with the Sales objective; without one it uses Traffic.
- For more control click Start advanced. The objective Sales becomes available after a Dataset / Pixel is connected. Under Performance goal, Maximize number of conversions uses your Dataset, and you pick the Conversion event: Purchase, Initiate checkout, Add to cart or View content.
- Click Publish. The ad runs after Meta’s review; you can also create it paused.
Afterwards the Meta Ads page shows Ad spend, Attributed purchases, CPA and ROAS for the last 7, 28 or 90 days. If you also connect Shopify or WooCommerce in Connections, you see the shop’s real orders in the same dashboard. That is a free sanity check: if Meta claims more purchases than the shop has orders, events are counted twice.
Way 2: Meta Ads Manager
- Click + Create, choose Sales and name the campaign.
- In the ad set choose Website as the conversion location, select your Dataset and the event Purchase.
- Set the budget, the audience and the placements. Our budget guide for small shops helps with the numbers.
- Add the image or video, the texts and the link, then click Publish.
The same Dataset also feeds retargeting: website visitor and add-to-cart audiences are built from PageView and AddToCart. See retargeting ads for small shops, and for the whole first campaign, how to make a Facebook ad.
How Longneckhorse helps once the Pixel works
The Pixel tells Meta who buys, but what people see is still the ad. Longneckhorse makes image and video ads from your product photo or a template, publishes them on Meta Ads with the Sales objective and your Dataset, and shows Attributed purchases and ROAS in the same dashboard as your shop’s orders (see integrations). The free plan has 300 credits a month and needs no card; paid plans start at €13 a month billed yearly, see pricing.