Skip to main content
Black Friday: TrackSure Pro, $99 once for 3 sites, lifetime. Ends 30 November. See the offer →
Meta Ads

How to set up the Meta Conversions API (Facebook CAPI) in WordPress for free

Step-by-step: get your Meta Pixel ID and Conversions API token, connect them in the free TrackSure plugin, and check in Events Manager that purchases arrive from browser and server, deduplicated.

Short answer: install the free TrackSure plugin, paste your Meta Pixel ID and a Conversions API access token, then make a test purchase and check Meta Events Manager. Purchases, leads and other events then go to Meta from the browser and from your server, with one event id so each is counted once.

What you need

  • A WordPress site (WooCommerce or FluentCart for shop events; any site for leads and sign-ups).
  • Admin access to your Meta Business account and the pixel (dataset) you use for ads.
  • About 15 minutes, most of it in Meta.

Step 1: find your Pixel ID

In Meta Events Manager, choose your pixel under Data sources. The Pixel ID is the number shown under its name (Meta also calls it a dataset ID).

Step 2: create a Conversions API access token

Still in Events Manager, open the pixel’s Settings tab, scroll to Conversions API and choose Generate access token. Copy it and keep it private: anyone with it can send events to your pixel.

Step 3: connect them in TrackSure

  1. Install and activate TrackSure from WordPress.org.
  2. In the TrackSure menu, open Destinations and choose Meta.
  3. Paste the Pixel ID and the access token, then save. TrackSure checks the token with Meta.
  4. If you already add the Meta Pixel with another plugin or a theme setting, remove it, or the browser events would be sent twice under different ids.

Step 4: test it

  1. In Events Manager, open Test events and copy the test code into TrackSure’s Meta settings while you test.
  2. Open your shop in a private window (your own admin visits are not sent from the server, so they do not train your ads), and place a test order or send a test lead.
  3. In Test events you should see the event twice, once from Browser and once from Server, marked as deduplicated.
  4. Remove the test code when you are done.

What TrackSure sends

  • Page views, product views, add to cart, checkout, purchase, lead, sign-up and contact clicks.
  • A purchase when the shop marks the order paid, with any payment gateway, including payments confirmed after the visitor left.
  • Customer details the visitor gave (email, phone, name, address), normalised and hashed as Meta requires, plus the click id and browser id. This raises Event Match Quality. If a visitor refuses consent, Meta receives only what consent allows.

Common problems

  • Only browser events arrive: server events are sent by a background job. If WP-Cron is disabled on your host, set up a real cron job. TrackSure’s health checks show when deliveries fall behind.
  • Purchases counted twice: another plugin is also sending the pixel or the Conversions API. Use one.
  • “Invalid token”: the token was created for a different pixel, or copied with a space.

Next: how server-side tracking works and how to improve Event Match Quality.

See your next sale arrive in Meta, counted once

Free on WordPress.org. Setup takes minutes, and Health shows you that it works.