Facebook pixel tracking for woocommerce

Facebook Conversion API plugin for WooCommerce

A free plugin that sends your WooCommerce purchases to Facebook from your website’s server, so your Facebook ad reporting stays accurate even when customers are using ad blockers.

✅ Works with WooCommerce ✅ HPOS-ready ✅ Free!

What is this plugin?

If you run Facebook or Instagram ads for your store, you’ve probably added a Facebook Pixel to your site. The Pixel is a small piece of code that tells Facebook when someone views a product, adds it to their cart, or completes a checkout. Facebook uses that to measure how your ads are doing and to find more people like your buyers.

THE PROBLEM

The Pixel runs inside your customer’s web browser. But browsers are getting better and better at blocking tracking code. When a browser blocks the Pixel, Facebook never finds out that the sale happened, even though the order lands in your WooCommerce dashboard as normal. And if Facebook never knows if a sale happened, it is unable to optimise your Facebook ad campaigns.

THE SOLUTION

This plugin adds a second way to send tracking data to Facebook. Alongside the browser Pixel, it sends the same information to Facebook directly from your website’s server, using a Facebook feature called the Conversions API (often shortened to CAPI). A browser can block code on a shopper’s device. It can’t block a message sent from your own server.

What does it do?

Once it’s set up, it works quietly in the background. Here’s what it handles for you.

Sends your sales two ways

Every purchase goes to Facebook from both the browser and your server, so fewer sales go missing.

Tracks the key shopping steps

Product views, add to cart, checkout started, and completed purchases. The events Facebook cares about most.

Won’t double-count

When both paths report the same sale, the plugin tags them with a shared ID so Facebook keeps one and ignores the copy.

Keeps customer data private

Email, phone, name and address are scrambled (hashed) on your site before anything is sent. Facebook receives a matching code, not the raw details.

Remembers which ad they came from

It holds on to the Facebook click details at checkout, so a sale can still be matched to the ad that earned it.

Fits a modern store

Compatible with WooCommerce High-Performance Order Storage (HPOS), and it opens its own settings page the moment you activate it.

Why do I need it?

If you open your WooCommerce orders for last week and count the sales, and then compare it against Facebook Events Manager, the two may not match.

For example, let’s say you received 50 WooCommerce orders. But in Facebook, it only shows 38 purchase events. Those missing sales aren’t a bug. Close to a third of internet users browse with an ad blocker at least some of the time, according to GWI data, and privacy settings in browsers like Safari block tracking too. Those shoppers still buy. Facebook just never hears about it.

When Facebook can’t see some of your sales, three things go wrong:

  • Your ads look less profitable than they really are, because some of the sales they drove are invisible.
  • Facebook has less information to find new customers for you, so your targeting gets weaker.
  • You might switch off an ad that was actually working, because the numbers told you it wasn’t.

Sending your sales from the server as well, through the Conversions API, closes most of that gap. Facebook sees more of what really happened, and makes better decisions with your budget.

How do I set it up?

Before you start, you’ll need your store running on WooCommerce and a Facebook Business account with a Pixel already created. If you already have that, you just need to copy two values from Facebook and paste them into the plugin.

  1. Install and activate the plugin. Install it from the Plugins screen, or upload it and click Activate. It opens its settings page for you automatically.
  2. Find your Pixel ID. In Facebook, open Events Manager, go to Data Sources, and select your Pixel. The Pixel ID is a 16-digit number shown there.
  3. Create an access token. In the same place, go to Settings, find the Conversions API section, and click Create Access Token. Facebook’s guide walks through exactly where the button is.
  4. Paste them into the plugin. In WordPress, go to WooCommerce › Pixel Tracking, paste in your access token and Pixel ID, and save.
  5. Turn off any other Facebook Pixel. If another plugin is already loading a Facebook Pixel, switch it off. Running two at once sends Facebook duplicate browser events that this plugin can’t tidy up.
  6. Check that it’s working. Place a test order, or wait a day, then look in Events Manager to confirm your purchases are coming through.
Above: Facebook Events Manager page. After adding the Halfborg Pixel Tracking plugin to WooCommerce, the event match quality between browser and server events started to improve.

Common questions

Do I need to know how to code to set it up?

No. You copy two values from Facebook (your Pixel ID and an access token) and paste them into the plugin’s settings page. That’s all you need.

Is it really free?

Yes! There are no limits, caps or locked features. It does one job and does it for free.

Will it work with my store theme?

Yes. It hooks into WooCommerce’s standard checkout and order process, so it works no matter which theme your store uses.

I already use another pixel plugin. What happens?

Turn off the Facebook Pixel in that plugin before you activate this one. If two plugins load a Facebook Pixel at the same time, Facebook gets duplicate events that can’t be cleaned up automatically.

Download now

Install it, paste in your two Facebook values, then place a test order and check Events Manager. If more sales start showing up, it’s doing its job.

Halfborg Pixel Tracking for WooCommerce · Built by halfborg.com


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *