Meta Pixel Guide: How to Set Up and Use the Facebook Tracking Pixel
- Sezer DEMİR

- 3 days ago
- 5 min read
The Meta Pixel is a piece of JavaScript code installed on your website that tracks visitor behavior and sends that data back to Meta Ads Manager. It is the foundational infrastructure for running effective Facebook and Instagram advertising — without it, you cannot create website-based retargeting audiences, optimize campaigns for conversions, or accurately measure which ads drove purchases.
Every Meta Pixel function serves one of three purposes: reporting (measuring what happened after an ad click), optimization (telling Meta's algorithm what events to optimize for), or audiences (building lists of visitors who performed specific actions for retargeting). All three purposes require correct installation and event configuration.
⠀
Installing the Meta Pixel
⠀
Pixel creation:
In Meta Business Manager → Events Manager → Connect Data Sources → Web → Meta Pixel. Each pixel has a unique 15–16 digit Pixel ID. One pixel per domain is the standard setup (Meta can now handle multiple events from a single pixel).
Installation methods:
Manual installation: Copy the pixel base code from Events Manager and paste it between <head> and </head> tags on every page of your website. The base code fires on every page load and enables PageView tracking automatically.
Partner integrations: Shopify, WooCommerce, Squarespace, Wix, and other major platforms have native Meta Pixel integrations. Enter your Pixel ID in the platform's settings without touching code. This handles base code installation and most standard e-commerce events automatically.
Google Tag Manager: Install the pixel through GTM for non-platform websites. Create a Custom HTML tag with the pixel base code, trigger on All Pages. Then configure individual events as separate GTM tags.
Verification: After installation, use Meta Pixel Helper (Chrome extension) to verify the pixel fires on each page. Events Manager also shows a live activity feed — visit your website and watch events appear in real time.
⠀
Standard Events
⠀
⠀
⠀
Meta Pixel standard events are predefined event names Meta recognizes for optimization and reporting:
E-commerce events:
ViewContent — product page views (include content_ids, content_type, value, currency)
AddToCart — add to cart actions (include content_ids, value, currency)
InitiateCheckout — checkout start
AddPaymentInfo — payment method entry
Purchase — completed order (include value, currency, content_ids — this is the most important event)
⠀
Lead generation events:
Lead — form submission, lead capture
CompleteRegistration — account creation, signup
Contact — contact form, live chat initiation
SubmitApplication — application form
⠀
Content engagement events:
ViewContent — article or page view
Search — site search (include search_string)
Schedule — appointment booking
⠀
Event parameters: Standard events support parameters that add context — value, currency, content_ids, content_name, content_category. Parameters enable value optimization (bidding for higher-value purchasers) and product-level retargeting (dynamic ads showing products users viewed).
⠀
Conversions API (CAPI) Setup
⠀
⠀
⠀
The Meta Pixel is browser-based. After iOS 14's App Tracking Transparency changes, browser-based tracking accuracy declined significantly — Safari blocks third-party cookies, and iOS users who opt out of tracking are not tracked by browser pixels.
Conversions API (CAPI) is server-side event tracking that sends conversion data directly from your server to Meta — bypassing browser restrictions. CAPI and browser pixel together are called "redundant event sharing":
CAPI implementation options:
Shopify integration: Meta's native Shopify CAPI integration is the easiest setup — available in Shopify's marketing settings. Handles deduplication automatically.
Partner platform APIs: Klaviyo, WooCommerce, and other major platforms offer CAPI integrations.
Manual server-side implementation: For custom websites, send events via Meta's Conversions API directly from your server when conversion events occur.
Gateway solutions: Third-party tools (Elevar, Stape) simplify CAPI implementation for websites without native integrations.
⠀
Deduplication: When both pixel and CAPI send the same event, Meta deduplicates using event_id — match the event_id sent by browser pixel with the event_id sent by CAPI for the same event. Without deduplication, the same purchase registers twice.
Event Match Quality (EMQ): Meta scores each CAPI event on how well the customer data matches Meta's user database (email, phone, IP, etc.). Higher EMQ = better attribution. Include hashed email and phone with every CAPI event to maximize match quality.
⠀
Using Pixel Data for Campaigns
⠀
Retargeting audiences: Pixel data enables audiences based on specific behavior — website visitors, product viewers, add-to-cart without purchase, checkout abandoners. These warm audiences convert at higher rates than cold audiences.
Conversion optimization: When creating a Sales campaign, select the Purchase event as the optimization event. Meta's algorithm optimizes ad delivery to users most likely to fire the Purchase event based on pixel history.
Value optimization: With sufficient purchase events (minimum 100–200 purchases/week), Meta can optimize for higher-value purchases — showing ads to users more likely to spend above average.
Attribution windows: Default attribution is 7-day click, 1-day view. This credits conversions to an ad if the user clicked within 7 days or viewed within 1 day of the conversion. Adjust in campaign settings based on your typical consideration cycle.
Blakfy configures Meta Pixel installations and Conversions API integrations for businesses — ensuring accurate conversion tracking, properly built retargeting audiences, and optimized campaign performance through correct event data.
⠀
⠀
Frequently Asked Questions
⠀
Is the Meta Pixel the same as the Facebook Pixel?
Yes — Meta renamed the Facebook Pixel to Meta Pixel in 2021 when Facebook rebranded to Meta. The functionality is identical; the code and setup process are the same. Both terms refer to the same tracking JavaScript. Any existing Facebook Pixel installations continue to function without changes.
How many Meta Pixels do I need?
One pixel per domain is the standard setup. All campaigns targeting visitors to that domain use the same pixel, regardless of whether the ads run on Facebook, Instagram, or other Meta placements. Multiple pixels on the same domain create duplication and complicate audience building. If you operate multiple separate websites (separate domains), each gets its own pixel.
Why is my Meta Pixel showing fewer conversions than my actual sales?
Common causes: iOS 14 opt-outs reducing browser pixel accuracy (implement CAPI to recover attributed conversions), attribution window mismatch (purchases happened outside the default 7-day click window), deduplication issues if both pixel and CAPI report without event_id matching, or delayed pixel firing where the pixel fires before purchase confirmation is final. Conversions API + browser pixel together typically recover 20–40% of conversions lost to iOS tracking restrictions.
What data does the Meta Pixel collect?
The pixel collects: page URLs visited, browser type and version, IP address, time of visit, referring URL, and any events you configure (page views, add to cart, purchase). If you send customer data via Conversions API, it also matches hashed email and phone numbers to Meta's user database. This data is used to build retargeting audiences, optimize ad delivery, and measure campaign performance. Website visitors should be informed of pixel tracking via your privacy policy.



