Tracking

How to set up Meta Pixel and Conversions API on WooCommerce

By Wasika Rahman, founder of Wasika Studio · Updated 3 December 2026 · 3 min read

Short answer

To set up Meta Pixel and Conversions API on WooCommerce, create a dataset in Events Manager, add the Pixel ID and an access token to one tracking plugin, connect your cookie banner, and send purchases from both browser and server with the same event ID. Then test with Meta’s Test Events before spending on ads.

What each one does

Meta PixelConversions API
Where it runsThe visitor's browserYour server
Good atPage views, product views, add to cartPurchases the browser misses
Weak whenAd blockers, browser limits, closed tabsThe server setup or token is wrong
Needs consent where the law requires itYesYes

Use both, with the same event ID, so Meta counts each purchase once.

What you need

  • A WooCommerce shop on a recent WordPress version
  • A Meta Business account with a dataset (Pixel) in Events Manager
  • Permission to create a Conversions API access token
  • A cookie banner, if you have visitors in places that require consent
  • One tracking tool. Two plugins usually mean double counting

Step 1: clean up first

  1. Check which pixels are already on the site.
  2. List every plugin, theme setting, code snippet and Tag Manager container that adds Meta code.
  3. Decide which one stays, and remove the others.

Step 2: get the Pixel ID and token

  1. In Meta Events Manager, choose your dataset and copy the Pixel ID.
  2. In the dataset's Settings, find Conversions API and generate an access token.
  3. Treat the token like a password. Do not email it or paste it in a page builder.

Meta changes menu names from time to time. Search Meta's help if a name differs.

Step 3: add both to your plugin

  1. Paste the Pixel ID and turn on the Pixel.
  2. Paste the access token and turn on server purchases.
  3. Choose which order statuses count as a purchase. Processing and Completed suit most shops; count bank transfers only when they are paid.
  4. Check that the value comes from the order, with the right currency.

Several plugins can do this, and some charge for server events. Our own plugin, TagBuni, is free on WordPress.org, sends nothing before consent and has no paid version.

  • Connect the cookie banner to the tracking plugin, for example through the WP Consent API.
  • Open a private window and decline. No Meta request should appear.
  • Open another and accept. Page views should appear.

Server events are not a way around consent. If a visitor declined, the server should not send the purchase either.

Step 5: test before you spend

  1. In Events Manager, open Test events and copy the test code.
  2. Put it in your plugin and place a test order.
  3. Check that Purchase arrives from browser and server, with the same event ID, value and currency.
  4. Remove the test code.
  5. A few days later, compare orders in WooCommerce with purchases in Events Manager.

Why the numbers never match exactly

  • People decline consent or use blockers
  • Meta counts a sale on the day of the ad, and your shop on the day of the order
  • Meta cannot match every buyer to an account
  • Refunds and cancelled orders are handled differently

A small gap is normal. Look for the cause when the gap is large or changes suddenly.

Common problems

SymptomLikely cause
Purchases about doubleTwo tools, or different event IDs
No server eventsWrong token, blocked connection, or no consent recorded
Server events arrive lateWordPress cron is not running; set up a real cron job
Purchase without valueEvent sent from a button or a cached page
Nothing at all while testingYou are logged in as an administrator, or on a staging site

Get help

Our tracking and analytics service audits, sets up and tests this for WooCommerce shops, with a written handover.

Still stuck? Go through 9 things to check when the Meta Pixel is not working on WooCommerce.

Common questions

Do I need both the Pixel and the Conversions API?

Meta recommends using them together. The Pixel sees what happens in the browser; the Conversions API sends events from your server.

What is event deduplication?

When the browser and the server report the same purchase with the same event name and event ID, Meta keeps one.

Is the Conversions API free?

Meta does not charge for it. Some plugins and hosting services do.

Does the Conversions API avoid consent rules?

No. Where consent is required, it is required for server events too.

Tools that help

  • TagBuni

    WordPress plugin

    FreeAvailable

    Meta Pixel and Conversions API, GA4, Google Ads, TikTok, Pinterest and more, with purchase values taken from the WooCommerce order.

    View details
  • Wasika Studio extension

    Chrome extension

    FreeAvailable

    Content planning, tracking checks, page audits, quotes and invoices, kept together for each brand.

    View details

Want it done for you?

More guides

Have a project in mind?

Tell us your goal and we will reply with a written plan and quote.