> ## Documentation Index
> Fetch the complete documentation index at: https://adadvisor.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# What is the Meta Pixel? Setup, Events & Tracking Guide

> The Meta Pixel is a JavaScript snippet that tracks visitor actions on your website. Learn how it works, what events to set up, and why it matters.

**Meta Pixel** (formerly Facebook Pixel) is a small piece of JavaScript code you place on your website. It tracks what visitors do after they click your ad (or land on your site from any source), then sends that data back to Meta so your campaigns can optimize for real business outcomes like purchases and leads.

Without the Meta Pixel, Meta has no idea what happens after someone clicks your ad. You're flying blind. With it, Meta knows who bought, who browsed, who abandoned their cart, and uses that data to find more people like your best customers.

## How does the Meta Pixel work?

The Pixel loads as a JavaScript snippet in your website's `<head>` tag. When a visitor takes an action on your site, the Pixel fires an "event" back to Meta's servers. Here's the flow:

1. A visitor lands on your website (from an ad, organic search, or a direct visit).
2. The Pixel JavaScript loads in the background.
3. The visitor takes an action (views a product, adds to cart, purchases).
4. The Pixel fires an event with details (event name, value, currency, content ID).
5. Meta receives the event and matches it to the user's Meta profile.
6. Meta uses this data to attribute [conversions](/learn/conversions), build audiences, and optimize ad delivery.

The entire process takes milliseconds and is invisible to the visitor.

## Standard events

Meta defines a set of standard events that cover most tracking needs. You configure these based on what matters to your business.

| Event                  | When to fire                    | Typical use                                                  |
| ---------------------- | ------------------------------- | ------------------------------------------------------------ |
| `PageView`             | Every page load                 | Base tracking. Fires automatically with the Pixel base code. |
| `ViewContent`          | Product or service page viewed  | Track which products get the most interest.                  |
| `AddToCart`            | Item added to cart              | Measure shopping intent. Build cart abandoner audiences.     |
| `InitiateCheckout`     | Checkout process started        | Identify drop-off between cart and purchase.                 |
| `Purchase`             | Order completed                 | The most important event. Include value and currency.        |
| `Lead`                 | Form submitted, quote requested | Primary conversion event for lead-gen businesses.            |
| `CompleteRegistration` | Account or signup finished      | Track signups, free trial starts, webinar registrations.     |
| `AddPaymentInfo`       | Payment details entered         | Measure checkout friction between payment and purchase.      |
| `Search`               | Site search used                | Understand what visitors are looking for.                    |

<Note>
  You don't need every event. E-commerce stores should prioritize `Purchase`, `AddToCart`, `ViewContent`, and `InitiateCheckout`. Lead-gen businesses should focus on `Lead` and `CompleteRegistration`. Start with the events that represent real business value and add more later.
</Note>

## Meta Pixel in plain English

Think of the Meta Pixel like a store security camera that also remembers shopping behavior. A normal security camera sees someone walk in and walk out. The Pixel goes further: it remembers that this person looked at running shoes, added a pair to their cart, then left without buying. Next time that person opens Instagram, Meta can show them an ad for those exact shoes. And when Meta is deciding who to show your ads to, it looks at everyone who already bought from you (tracked by the Pixel) and finds more people like them.

## Common Meta Pixel mistakes

<Accordion title="Not installing the Pixel before running ads">
  Every ad dollar you spend without the Pixel is wasted data. Even if you're not running conversion campaigns yet, the Pixel collects visitor data that builds your audiences. Install it the day your website goes live, not the day you start advertising.
</Accordion>

<Accordion title="Only using the base Pixel without standard events">
  The base Pixel code only fires `PageView`. That tells Meta someone visited your site, but not what they did there. Without `Purchase`, `AddToCart`, or `Lead` events, Meta can't optimize for conversions. It's like telling a salesperson to find you customers but not telling them what a customer looks like.
</Accordion>

<Accordion title="Not setting up all relevant events">
  Many advertisers install `Purchase` but skip `AddToCart` and `ViewContent`. Those mid-funnel events give Meta more data points to learn from. If you only get 10 purchases a week, Meta doesn't have enough conversion data to optimize well. But if you also track 200 add-to-carts and 2,000 product views, Meta can build a much better picture of your ideal customer.
</Accordion>

<Accordion title="Not pairing the Pixel with Conversions API">
  Browser-side tracking (the Pixel) is getting less reliable. Ad blockers, iOS privacy changes, and cookie restrictions all reduce the data the Pixel can capture. The [Conversions API](/learn/conversions-api) sends event data server-side, bypassing these limitations. Meta recommends using both together for the most accurate tracking. Advertisers who pair Pixel + CAPI typically see 15-25% more attributed conversions.
</Accordion>

<Accordion title="Not passing event parameters">
  Firing a `Purchase` event without a value is like telling your accountant "we made a sale" but not how much it was for. Always include `value`, `currency`, and `content_ids` with your events. This data powers [ROAS](/learn/roas) reporting and value-based optimization.
</Accordion>

## How the Pixel powers your campaigns

| Capability                                  | How the Pixel enables it                                                                                                               |
| ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| [Conversion tracking](/learn/conversions)   | Attributes purchases, leads, and other actions back to specific ads and campaigns.                                                     |
| Conversion optimization                     | Meta's algorithm learns who converts and shows your ads to similar people. Needs 50+ conversions per week per ad set for best results. |
| [Custom Audiences](/learn/custom-audiences) | Build audiences from website visitors: all visitors, product viewers, cart abandoners, past purchasers.                                |
| [Retargeting](/learn/retargeting)           | Show ads to people who visited your site but didn't convert. Retargeting audiences typically convert 3-5x better than cold audiences.  |
| [Attribution](/learn/attribution-models)    | Determines which ad, ad set, and campaign drove each conversion within your [attribution window](/learn/attribution-window).           |
| Value optimization                          | With purchase values passed, Meta can optimize for highest-value customers, not just any conversion.                                   |

## How to set up Meta Pixel

<Steps>
  <Step title="Create your Pixel in Events Manager">
    Go to Meta Events Manager, click "Connect Data Sources", select "Web", and choose "Meta Pixel". Name it after your website. You get one Pixel per ad account.
  </Step>

  <Step title="Install the base code">
    Copy the Pixel base code snippet and paste it in the `<head>` section of every page on your website. If you use Shopify, WordPress, or another platform, use their native Meta Pixel integration instead of manual code.
  </Step>

  <Step title="Add standard events">
    Add event code to the relevant pages. For example, fire `Purchase` on your order confirmation page with the order value: `fbq('track', 'Purchase', {value: 49.99, currency: 'USD'})`. Fire `AddToCart` when the add-to-cart button is clicked.
  </Step>

  <Step title="Verify with Pixel Helper">
    Install the Meta Pixel Helper Chrome extension. Visit your website and check that events fire correctly. Green checkmarks mean the event is working. Yellow or red warnings indicate issues.
  </Step>

  <Step title="Set up Conversions API">
    For the most reliable tracking, pair your Pixel with the [Conversions API](/learn/conversions-api). This sends the same events server-side, so you capture conversions even when the browser Pixel is blocked.
  </Step>

  <Step title="Test in Events Manager">
    Use the "Test Events" tab in Events Manager. Browse your site and confirm each event appears in real time with the correct parameters (value, currency, content IDs).
  </Step>
</Steps>

## Monitor your Pixel data in AdAdvisor

Once your Pixel is tracking conversions, AdAdvisor pulls that data in and shows you exactly which campaigns, ad sets, and ads are driving results. You'll see [ROAS](/learn/roas), [CPA](/learn/cpa), and conversion counts side-by-side so you know where to scale and where to cut.

<Columns cols={2}>
  <Card title="Try AdAdvisor Free" icon="rocket" href="https://app.adadvisor.ai">
    Connect your Meta ad account and see Pixel-tracked conversions across every campaign.
  </Card>

  <Card title="Connect Your Meta Ads" icon="plug" href="/user-guide/connect-meta-ads">
    Step-by-step guide to linking your Meta ad account in AdAdvisor.
  </Card>
</Columns>

## Related terms

<Columns cols={3}>
  <Card title="Conversions API" icon="server" href="/learn/conversions-api">
    Server-side event tracking that complements the Pixel
  </Card>

  <Card title="Custom Audiences" icon="users" href="/learn/custom-audiences">
    Audiences built from your Pixel data
  </Card>

  <Card title="Retargeting" icon="rotate-left" href="/learn/retargeting">
    Re-engage visitors who didn't convert
  </Card>
</Columns>
