Facebook Pixel Setup Guide 2026
Step-by-step Facebook Pixel setup guide. Install the pixel, configure events, verify tracking, and combine with CAPI for complete conversion data in 2026.
Facebook Pixel Setup Guide: Track Conversions Like a Pro
The Meta Pixel is a piece of JavaScript code you install on your website that reports user actions — page views, add-to-carts, purchases — back to Meta. Without it, Meta has no idea whether your ads are driving actual business results. You're flying blind, paying for clicks that may or may not be turning into customers.
This guide covers complete Pixel setup: creating the pixel in Business Manager, installing the base code, configuring standard events, verifying everything works, and setting up the Conversions API (CAPI) for post-iOS 14 data accuracy.
---
Step 1: Create Your Meta Pixel
Go to Meta Business Suite → Events Manager → Connect Data Sources → Web → Meta Pixel. Give your pixel a name (your business name works fine) and enter your website URL. Meta may offer setup instructions — select "Install code manually" for full control.
Each ad account gets one pixel. If you have multiple websites under one business, use the same pixel across all of them — Meta pools the data for better optimization. Don't create a separate pixel per website unless they serve completely different audiences.
---
Step 2: Install the Base Code
The base pixel code goes in the section of every page on your website, before the closing tag. Meta will provide the exact code snippet after you create the pixel — it looks like this:
Replace YOUR_PIXEL_ID with the pixel ID from Events Manager (it's a 15-16 digit number).
Platform-Specific Installation
If you use a website platform, there are easier options:
• Shopify: Apps → Facebook & Instagram → Connect → enter pixel ID
• WordPress: Install the Meta Pixel plugin or PixelYourSite → enter ID
• Squarespace: Marketing → Facebook Pixel → enter ID
• Wix: Marketing & SEO → Meta Pixel → Connect → enter ID
• Webflow: Project Settings → Integrations → Facebook Pixel → enter ID
For custom-built sites, paste the code manually into your site's template.
---
Step 3: Configure Standard Events
The base code fires a PageView event on every page. That's the minimum. To optimize ads for purchases, leads, or other outcomes, you need to add event code to specific pages or actions.
The 9 Core Standard Events
| Event | Where to Fire | Code |
|---|---|---|
| ViewContent | Product pages | fbq('track', 'ViewContent') |
| AddToCart | Cart button click | fbq('track', 'AddToCart') |
| InitiateCheckout | Checkout start | fbq('track', 'InitiateCheckout') |
| AddPaymentInfo | Payment page | fbq('track', 'AddPaymentInfo') |
| Purchase | Order confirmation | fbq('track', 'Purchase', {value: 99.00, currency: 'USD'}) |
| Lead | Form submit | fbq('track', 'Lead') |
| CompleteRegistration | Account creation | fbq('track', 'CompleteRegistration') |
| Search | Search results | fbq('track', 'Search') |
| Contact | Contact page | fbq('track', 'Contact') |
Implementing Purchase Events Correctly
For e-commerce, the Purchase event is the most critical. Always pass value and currency:
Put this on your order confirmation page, where it fires only after a completed transaction. Do not fire it on the checkout page — that creates inflated conversion counts.
---
Step 4: Add the No-Script Fallback
For users with JavaScript disabled, add the