How to Install the Meta Pixel on a WordPress Site (2026)
Three ways to add the Meta Pixel to WordPress, how to verify it works, the four reasons it shows no activity, and what POPIA requires before it fires.
A practical guide to installing and verifying the Meta Pixel on WordPress, including the POPIA consent question.

TL;DR: Quick Answer
Three ways to add the Meta Pixel to WordPress, how to verify it works, the four reasons it shows no activity, and what POPIA requires before it fires.
Key takeaways
- Very cheap quotes (under R5,000) almost always exclude copywriting, SEO, custom design and post-launch support
- Professional copywriting can represent 20-35% of a total website project cost, and is worth it for search visibility
- On-page SEO built into the website at launch costs a fraction of what it costs to retrofit after the site is live
- Hosting, SSL, domain and maintenance add R3,000-R10,000 per year on top of build cost
- E-commerce adds significant cost due to payment gateway integrations, product data, security requirements and checkout UX
- Timeline and client responsiveness directly affect cost: slow feedback rounds extend agency hours
Without the Meta Pixel, Meta cannot see what happens after someone clicks your ad, cannot optimise towards enquiries, and cannot build retargeting audiences. It is the first thing to install and it takes about fifteen minutes.
1. Create the dataset
In Meta Events Manager, connect a new data source of type Web. Name it after your site. Meta now calls this a dataset rather than a pixel, but the code and the concept are the same. Copy the base code it gives you.
2. Add it to WordPress
Three routes, in order of preference for most sites.
A header-scripts plugin. Install one of the well-maintained header and footer script plugins, paste the base code into the header field, save. This survives theme updates, which is why it is the safest default.
Your theme's header field. Many premium themes have a Custom Code or Header Scripts option in their settings. Fine to use, but confirm it is in the theme options rather than a file you are editing directly, because direct file edits are lost on update.
The official Meta plugin. Best choice for WooCommerce, because it installs the pixel and also sends AddToCart, InitiateCheckout and Purchase events without you configuring each one.
Whichever you choose, the code belongs in the <head>, not the body or the footer. Placement in the body causes intermittent event loss.
3. Verify it before trusting it
Install the Meta Pixel Helper browser extension, open your site in a private window, and check it reports a PageView firing. Then use Test Events in Events Manager to watch events arrive live while you click through the site.
Do not skip this. A pixel that is installed but not firing looks identical to one that is working, until you have spent a month of budget on it.
4. When it shows nothing
Four causes, in the order they usually apply.
Wrong placement. In the body rather than the head.
Caching. Your caching plugin is serving a stored page from before the change. Clear the cache, including any CDN layer.
Consent blocking. Your cookie tool is correctly holding the pixel until consent is given. This is working as intended; test by accepting.
Your own ad blocker. Common, and it makes a working pixel look broken. Test in a clean browser.
5. Add the events that matter
PageView alone is not enough to optimise. Add a Lead event on your contact form's thank-you page, or on the confirmation state if the form submits without a redirect. For WooCommerce, the official plugin covers purchases automatically.
These are what let a campaign optimise for enquiries instead of clicks.
6. Consider the Conversions API
Browser-based tracking is degraded by ad blockers, privacy settings and browser restrictions, and the gap is widening. The Conversions API sends events server-side, so fewer conversions go unmeasured. For anything commercial it is now worth setting up alongside the pixel rather than instead of it.
POPIA, briefly
Tracking that profiles an identifiable person needs a lawful basis, and consent is the usual one. Configure your cookie consent tool so the pixel loads after consent rather than on arrival. Most consent plugins support this directly.
Juicy Designs handles pixel, events and Conversions API setup as part of Facebook advertising and analytics and reporting.
Frequently asked questions
How do I install the Meta Pixel on a WordPress site?
Create the dataset in Meta Events Manager, copy the base code, and add it to your site's head. The cleanest routes are a header-scripts plugin, your theme's built-in header field, or the official Meta plugin for WooCommerce stores. Then verify with the Meta Pixel Helper browser extension before relying on it.
Which method should I use?
For most WordPress sites, a header-scripts plugin is safest because it survives theme updates. If you run WooCommerce, the official Meta plugin is better because it also sends purchase and cart events automatically.
Why does my pixel show no activity?
Usually one of four things: the code sits in the body rather than the head, a caching plugin is serving a version without it, a cookie consent tool is blocking it until consent, or an ad blocker is suppressing it in your own browser. Test in a private window with the Pixel Helper.
Do I need the Conversions API as well?
Increasingly yes for anything commercial. Browser tracking is degraded by ad blockers and privacy settings, and the Conversions API sends events server-side so fewer conversions go unrecorded.
Does the pixel need consent under POPIA?
Tracking that identifies or profiles a person requires a lawful basis, and consent is the usual route. Load the pixel after consent through your cookie tool rather than firing it on arrival.
