Most broken retargeting campaigns are not broken because of bad creative or a low budget. They are broken because the pixel was installed once, never verified, and quietly stopped sending usable data. The audience keeps showing “1,000 people”, the ad keeps spending, and nobody notices that PageView is the only event still firing.
This guide walks through a complete facebook retargeting pixel setup in 2026, using the three methods that cover almost every website: Google Tag Manager, WordPress, and Shopify. Every step ends with the most common mistake we see on real accounts at adhurl.com, and exactly how to fix it before it costs you money.
What a Facebook retargeting pixel actually does (and what it does not)
The Meta Pixel is a small piece of JavaScript that runs on your website and sends event data back to Meta. In Events Manager, pixels now live inside datasets, which group your browser pixel and your server-side events under one data source.
For retargeting specifically, the pixel does three jobs:
- Identifies visitors so they can be added to a Website Custom Audience.
- Describes their behaviour through events such as ViewContent, AddToCart, InitiateCheckout, Purchase.
- Passes product identifiers (content_ids) so Advantage+ catalog ads can show the exact item someone viewed.
What it does not do: it does not retroactively collect data. An audience only starts filling from the moment the correct event fires correctly. That is why a silent setup error is expensive: you cannot recover the lost 30, 60 or 180 days.

Pre-flight checklist (5 minutes)
- Admin access to a Meta Business Portfolio (Business Manager) and its Ad Account.
- Access to your website code, CMS admin, or Google Tag Manager container (Publish rights).
- Meta Pixel Helper Chrome extension installed.
- A consent solution if you serve EU, UK, Swiss or Brazilian traffic.
- A list of the pages and actions you want to retarget, written down before you touch anything.
Step 1: Create your pixel in Meta Events Manager
- Go to Meta Events Manager.
- Click Connect data sources (or Connect Data), then choose Web.
- Select Meta Pixel and click Connect.
- Name it clearly, for example
adhurl.com - Main Web Dataset. Never name it “Pixel 1”. - Enter your website URL and click Check. Meta will suggest a partner integration if it detects one.
- Copy the Pixel ID (a 15 or 16 digit number). You will need it for every method below.
Error #1: creating a second pixel when one already exists
This is the single most common setup mistake. Someone cannot find the old pixel, creates a new one, and installs it. The result: two pixels on the page, duplicated events, split learning data, and old audiences that stop growing while new ones start from zero.
Fix: before creating anything, open Events Manager and check Data sources for existing pixels, including pixels shared from an agency or a previous partner. Check Business Settings > Data Sources > Pixels too. If a pixel already has history, reuse it and simply assign it to your ad account instead of creating a new one.
Step 2: Choose your installation method
| Method | Best for | Difficulty | Main risk |
|---|---|---|---|
| Google Tag Manager | Custom sites, lead gen, multi-tag stacks | Medium | Wrong trigger, consent blocking, unpublished container |
| WordPress (plugin or theme hook) | Blogs, WooCommerce, service sites | Easy | Duplicate pixels, cache plugins stripping the code |
| Shopify (Meta channel + custom pixel) | Ecommerce, catalog and dynamic retargeting | Easy | Checkout events missing, content_ids not matching the catalog |
| Manual base code in <head> | Static sites, full developer control | Medium | Code lost on redeploy or theme update |
You only need one of these. Running two methods at once is the fastest way to double every event.

Step 3A: Install the Meta Pixel with Google Tag Manager
GTM is the most flexible option because it lets you fire events on conditions (URL, click, form submit) without touching your codebase.
Base pixel tag
- In GTM, go to Tags > New > Tag Configuration.
- Search the Community Template Gallery for the Meta Pixel template, or choose Custom HTML if you prefer the official base code.
- If you use Custom HTML, paste the base code from Events Manager and replace the ID:
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script>
- Set the trigger to Initialization – All Pages (or All Pages) so the pixel loads before your event tags.
- Under Advanced Settings > Tag firing options, keep Once per page.
- Use Preview mode, confirm the tag fires, then click Submit and Publish.
Event tags in GTM
For each additional event, create a separate Custom HTML tag such as:
<script>
fbq('track', 'ViewContent', {
content_ids: ['{{DLV - product_id}}'],
content_type: 'product',
value: {{DLV - product_price}},
currency: 'EUR'
});
</script>
Set Tag Sequencing so the base pixel fires first, and use dataLayer variables rather than hardcoded values.
Errors #2 to #4: the GTM traps
- Error #2: the container was never published. Everything works in Preview mode, nothing works live. Always reload the live site with Pixel Helper open after publishing.
- Error #3: consent settings blocking the tag forever. If your CMP is misconfigured, the pixel tag waits for a consent signal it never receives. In GTM, check Consent Settings on the tag and confirm your banner actually updates
ad_storageandad_user_data. Test by accepting cookies and reloading. - Error #4: single page applications firing PageView once. On React, Vue, Next.js or headless sites, the classic All Pages trigger fires only on the first load. Add a History Change trigger for a dedicated PageView tag, and exclude the initialization tag from it so you do not re-init the pixel.
Step 3B: Install the Meta Pixel on WordPress
You have three clean options. Pick one and document it.
Option 1: the official partner integration
- In Events Manager, open your dataset and click Set up pixel, then Partner integration.
- Select WordPress and follow the guided flow.
Option 2: a dedicated plugin
Plugins built for Meta tracking (for example PixelYourSite or the official Facebook for WooCommerce plugin) add the base code and standard ecommerce events automatically. Enter only the Pixel ID and enable the events you need.
Option 3: theme hook (developer friendly)
Add the base code through a child theme or a code snippets plugin using wp_head:
add_action('wp_head', function () {
?>
<!-- Meta Pixel base code here -->
<?php
});
Errors #5 and #6: the WordPress traps
- Error #5: two pixels, one page. The theme options panel has a “Facebook Pixel ID” field, the WooCommerce plugin has one too, and someone also added a Custom HTML tag in GTM. Pixel Helper will show the same event twice. Fix: keep the pixel in exactly one place and clear the other fields.
- Error #6: caching and optimisation plugins breaking the script. Aggressive JS minification, deferral or “delay JavaScript until interaction” settings can prevent
fbevents.jsfrom loading on the first pageview, so bounced visitors never enter your audience. Fix: excludeconnect.facebook.netandfbevents.jsfrom minify, combine and delay rules, then purge the cache and retest in a private window.
Step 3C: Install the Meta Pixel on Shopify
Shopify is a special case in 2026 because the checkout runs in a sandboxed environment. Theme code alone cannot track checkout steps.
- Install the Facebook & Instagram app from the Shopify App Store.
- Connect your Meta Business Portfolio, Page and Ad Account.
- In Data sharing settings, select your existing dataset (do not let it create a duplicate) and choose the Maximum data sharing level to enable server-side events.
- Confirm the pixel appears under Settings > Customer events in Shopify admin.
- If you need extra custom events, add them as a Custom pixel in Settings > Customer events using the Web Pixels API, not in
theme.liquid.
Errors #7 and #8: the Shopify traps
- Error #7: pixel pasted in theme.liquid. It will fire on product and collection pages, but Purchase and InitiateCheckout will be missing or unreliable because checkout is no longer editable through theme files. Remove the hardcoded pixel and use the app or a custom pixel instead. Leaving both in place also duplicates ViewContent.
- Error #8: content_ids that do not match your catalog. Dynamic retargeting only works if the ID sent by the pixel matches the ID in your product feed. Shopify may send the variant ID while your feed uses
shopify_XX_productid_variantid. Check Commerce Manager > Catalog > Events for a content ID match rate above 90 percent. If it is low, align your feed IDs or use the Shopify sales channel feed rather than a third party feed.

Step 4: Add the events retargeting really needs
PageView alone gives you one blunt audience. Standard events give you intent tiers, which is where retargeting profit comes from.
| Event | Fires when | Required parameters | Retargeting use |
|---|---|---|---|
| PageView | Every page | none | Broad all visitors audience |
| ViewContent | Product or key service page | content_ids, content_type, value, currency | Catalog ads, product level retargeting |
| AddToCart | Add to cart click | content_ids, value, currency | High intent, best ROAS tier |
| InitiateCheckout | Checkout started | value, currency, num_items | Cart abandonment sequences |
| Lead | Form submitted | value, currency (estimated) | Exclusions and lookalike seeds |
| Purchase | Order confirmation | value, currency (mandatory) | Exclusion lists, upsell audiences, ROAS |
Error #9: Purchase without value and currency
A Purchase event with no value or with the currency omitted still counts as a conversion, but Meta cannot optimise for value and your reported ROAS will read 0. Also avoid sending value as a formatted string. Send value: 149.90, never value: "149,90 EUR". Check Events Manager for the “missing parameter” warning on any event.
Step 5: Verify the setup properly (this is the step everyone skips)
5.1 Meta Pixel Helper
Install the Chrome extension, open your live site in a private window, accept cookies, and click the extension icon. You want to see:
- One pixel ID, not two.
- PageView with a green status.
- No warning about “Pixel did not load” or “Invalid parameter”.
Then walk your funnel manually: homepage, product page, add to cart, start checkout, test order. Watch each event appear. There is more on it in Meta Pixel: Setup Guide for Facebook Ads.
5.2 Events Manager Test Events
- Open your dataset, go to the Test events tab.
- Paste your website URL and click Open website.
- Browse your site and watch events stream in live, with their parameters.
- Click any event to inspect the payload and confirm content_ids, value and currency are present.
5.3 Diagnostics and Event Match Quality
Give it 24 to 48 hours, then check:
- Diagnostics tab: resolve every issue flagged as high priority, especially “invalid content_ids” and “unverified domain”.
- Event Match Quality: aim for “Good” or better on Purchase and Lead. Improve it by sending hashed email, phone, first and last name, city and country through Conversions API or Advanced Matching.
- Overview graph: flat lines and sudden drops are your early warning system. A 40 percent drop overnight almost always means a deployment removed the tag.
Quick reality check on volume
Compare pixel PageViews with your analytics sessions. If the pixel reports far less than half of your analytics traffic, you likely have a consent, caching or single page application problem, not a Meta problem.
Step 6: Verify your domain and configure Aggregated Event Measurement
Without domain verification you cannot control event priority, and some conversion events will not be usable for optimisation on iOS traffic.
- Go to Business Settings > Brand Safety and Suitability > Domains.
- Add your domain and verify by DNS TXT record, HTML file upload or meta tag.
- In Events Manager, open Aggregated Event Measurement and rank up to 8 events, most valuable first (Purchase, then InitiateCheckout, then AddToCart, then ViewContent).
Common mistake: verifying www.adhurl.com as a separate domain from adhurl.com, or forgetting subdomains used by a checkout provider. Verify the root domain and make sure your redirects are consistent.

Step 7: Add the Conversions API for redundancy
Browser pixels lose events to ad blockers, tracking prevention and consent refusals. The Conversions API (CAPI) sends the same events server side. lineardesign.com goes into the numbers.
- Shopify: enabled automatically with Maximum data sharing.
- WooCommerce: supported by the official Facebook plugin and most premium pixel plugins.
- Custom stack: use a server side GTM container or a direct API integration.
Deduplication is mandatory. Send the same event_name and the same unique event_id from both browser and server so Meta merges them. Skip this and your Purchase count doubles, your reported ROAS lies to you, and your exclusion audiences get messy. Verify in Events Manager under Event deduplication.
Step 8: Build the retargeting audiences
Once events are verified, go to Audiences > Create audience > Custom audience > Website.
| Audience | Rule | Window | Message angle |
|---|---|---|---|
| Hot cart | AddToCart, exclude Purchase | 7 days | Urgency, shipping, guarantee |
| Checkout drop-off | InitiateCheckout, exclude Purchase | 14 days | Payment reassurance, small incentive |
| Product viewers | ViewContent | 30 days | Catalog ads with the exact product |
| Engaged readers | Time on site, top 25 percent | 60 days | Offer or lead magnet |
| Customer exclusion | Purchase | 180 days | Exclude, or cross-sell separately |
Setup tip: create these audiences on day one even if they are small. They start accumulating members immediately, so by the time you launch, they are usable.
Troubleshooting cheat sheet
| Symptom | Likely cause | Fix |
|---|---|---|
| Pixel Helper shows nothing | Tag not published, cache, consent not granted | Publish container, purge cache, accept cookies, retest incognito |
| Every event counted twice | Two installation methods, or CAPI without event_id | Remove one install, add deduplication IDs |
| PageView fires, other events do not | Events never implemented, or selectors changed after a redesign | Rebuild event tags, use dataLayer instead of CSS selectors |
| Audience stuck at a low number | Rule based on a URL that changed, or event stopped firing | Edit the audience rule, verify the event in Test events |
| ROAS shows 0 with conversions | Purchase sent without value or currency | Send numeric value plus ISO currency code |
| Catalog ads show wrong or no products | content_ids mismatch with the feed | Align IDs, check match rate in Commerce Manager |
| Traffic in analytics far above pixel events | Consent refusal, ad blockers, JS delay settings | Whitelist pixel scripts, add Conversions API |
| Events stopped after a site update | Hardcoded pixel overwritten by theme or deployment | Move the pixel to GTM or a plugin, add a monitoring alert |
Keep it healthy: the quarterly 10 minute audit
- Open Pixel Helper on your homepage, a product page and a thank you page.
- Check Events Manager Diagnostics for new issues.
- Confirm Event Match Quality has not dropped.
- Verify audience sizes are still growing week over week.
- Re-test after any theme update, replatform, consent banner change or checkout change.
A pixel is not a one time task. Treat it like infrastructure and your retargeting stays profitable while competitors quietly lose their audiences.
FAQ
Is the Meta Pixel free?
Yes. Creating and installing the pixel costs nothing. You only pay for the ads you run with the audiences it builds.
How long does it take before I can run retargeting ads?
Technically you can create an audience immediately, but Meta needs a minimum audience size to deliver, usually around 1,000 people for stable performance. On a site with 5,000 monthly visitors, expect a few days to two weeks depending on the retention window you choose.
Can I set up retargeting without a pixel?
Partly. You can retarget people who engaged with your Facebook or Instagram content, watched your videos, or opened your lead forms without any website code. To retarget website visitors, product viewers or cart abandoners, the pixel or the Conversions API is required.
Should I use Google Tag Manager or a plugin?
Use GTM if you already manage several tags, need custom event logic, or want a single publishing workflow. Use a plugin or the native app if you are on WordPress or Shopify and want ecommerce events out of the box with less maintenance. Never use both for the same pixel.
Do I still need the pixel if I have the Conversions API?
Yes. Browser and server events complement each other. The browser pixel captures signals the server does not see, the server captures events the browser loses. Run both with proper deduplication.
Why does Events Manager say my domain is not verified?
Verification lives in Business Settings, not Events Manager, and it must be done on the exact root domain. Add the DNS TXT record or HTML file, then allow up to 72 hours for propagation before rechecking.
How many events should I track?
Track what you would act on. For ecommerce, the six standard events listed above are enough. For lead generation, PageView, ViewContent on key pages, Lead and a qualified custom event usually cover everything. Prioritise a maximum of 8 in Aggregated Event Measurement.
Does the pixel still work with cookie consent banners?
Yes, for users who consent. For users who refuse, the pixel should not fire at all. That is why measured traffic will always be lower than total traffic in Europe, and why server side events with proper legal basis and modelling matter more than ever.
Need a second pair of eyes on your tracking? A 30 minute pixel audit usually finds at least one broken event. Get in touch with the team at adhurl.com and we will review your setup before you scale spend.