Skip to content
GPLWP Guides

How to track Facebook conversions on a WordPress site

Analytics Time About 30 minutes 6 steps Updated 12 Sep 2026

ANALYTICS
The short answer

Add your Meta Pixel to WordPress, configure events such as Lead, AddToCart or Purchase, and verify them in Events Manager. Manual tracking is fine for simple lead forms, but WooCommerce purchases usually need a plugin to pass order values and avoid duplicate events.

The route
  1. 01Choose the conversions to track
  2. 02Create or find your Pixel
  3. 03Add the base code to WordPress
  4. 04Add event tracking to key actions
  5. 05Test events before launching ads
  6. 06Use a plugin for the fast route

What you need

  • A Meta Business account with a data source or Pixel
  • WordPress administrator access
  • A consent tool if your visitors require opt-in tracking
  • A test page, form or checkout flow

Choose the conversions to track

List the actions that matter to your campaigns before adding code. Common Meta events include PageView, ViewContent, Lead, CompleteRegistration, AddToCart, InitiateCheckout and Purchase.

For a brochure site, a lead or registration event may be enough. For WooCommerce, plan to send product, currency, value and order information with the relevant events. WooCommerce tracking documentation lists product views, add-to-cart, checkout and purchase events as typical ecommerce conversions.

Create or find your Pixel

Open Meta Events Manager, select your website data source and copy its Pixel ID. You need access to the correct business, ad account and data source; copying an ID from the wrong business is a common reason events appear in the wrong account.

Do not create a second Pixel just because no events have arrived yet. First install the existing ID, then use Events Manager's test tools to check it.

Add the base code to WordPress

For a manual setup, add Meta's base Pixel code to the site-wide head section using a child theme, a code-injection facility, or a small custom implementation. Replace the placeholder with your Pixel ID and make sure the base code loads only after the visitor has granted any consent required by your privacy setup.

The base code normally records page views. It does not automatically know that a form submission, checkout or purchase has happened, so those actions need separate event instructions.

Add event tracking to key actions

Add a standard event where the action actually completes. For a lead form, fire Lead on a reliable thank-you page or successful submission callback, not merely when the form is displayed. For a registration, use CompleteRegistration. For WooCommerce, purchase tracking must use the completed order's value, currency and a stable order reference.

Manual ecommerce tracking is the part most likely to break: AJAX add-to-cart buttons, failed payments, cached thank-you pages and repeat visits can cause missing or repeated events. A WooCommerce integration can place events on the relevant shop and checkout actions instead of relying on a single static script.

Test events before launching ads

In Events Manager, open the data source's test or diagnostic view, enter your website URL and complete each test action in a fresh browser session. Confirm the expected event name, URL and parameters, then check that a purchase is counted only once.

Browser extensions, ad blockers, caching and script optimisation can hide or delay events. Test logged out as well as logged in, and test the real mobile checkout if that is where customers convert.

Use a plugin for the fast route

For a simple site with one lead form, the manual route is reasonable once you understand the event code and consent requirements. For WooCommerce, multiple Pixels, dynamic purchase values or Conversions API support, use a dedicated tracking plugin instead of maintaining event scripts yourself.

PixelYourSite PRO is a suitable fast route when you want automated Meta event setup, WooCommerce conversion tracking, custom events or more than one Pixel. Install it from Plugins, enter the correct Pixel ID, enable only the events you need, and disable duplicate Pixel features in other plugins or in your theme.

The fast route

Let PixelYourSite PRO do it

Automates Facebook Pixel events, WooCommerce tracking, and multi-pixel setup for marketers optimizing Facebook ad campaigns.

Get PixelYourSite PRO

Sources

  1. woocommerce.com /document/conversion-tracking-pro/?utm_source=openai
  2. wordpress.org /support/topic/duplicate-events-meta-pixel/?utm_source=opena…
  3. woocommerce.com /document/facebook-for-woocommerce/?utm_source=openai

Questions

Can I track Facebook conversions without a WordPress plugin?
Yes, you can track simple conversions manually by adding Meta's base Pixel code and firing a standard event when a form submission, registration or thank-you page is reached. The limitation is ecommerce: dynamic order values, AJAX actions, failed payments and deduplication require more careful development. A plugin is usually safer for WooCommerce or any site with several conversion paths.
Which Facebook events should a WooCommerce site track?
A WooCommerce site commonly tracks product views, add-to-cart actions, checkout starts and completed purchases. The purchase event should include accurate value and currency data, and product events should identify the relevant item where possible. WooCommerce's conversion-tracking documentation lists these events alongside registration and category or search activity.
Why are my Meta conversions duplicated?
Duplicated conversions usually mean the same event is being sent by more than one plugin, the theme, Google Tag Manager, Meta's automatic event feature, or both browser and server implementations without matching deduplication data. Check every place the Pixel is installed, disable duplicate automatic tracking, and ensure browser and server events use the same event name and event ID.
Do I need both the Meta Pixel and Conversions API?
They serve different routes and can be used together: the Pixel sends browser events, while Conversions API sends events from the server. They must be configured to deduplicate matching events, or purchases may be counted twice. If your plugin already supplies both, do not add another copy of the Pixel in the theme or a header-script tool.