> For the complete documentation index, see [llms.txt](https://docs.zellify.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zellify.app/platform-introduction/integrations/meta-pixel-and-conversions-api.md).

# Meta (Pixel & Conversions API)

Send funnel, quiz, and payment events to Meta using both the Facebook Pixel (client-side) and the Conversions API (server-side).

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2Fdp70femDINaU5zXAqHlT%2Feoiufthgpietbgvoejbg.png?alt=media&amp;token=de5b105b-7aac-454e-b412-940c996fa1e4" alt=""><figcaption></figcaption></figure>

When enabled, Zellify automatically fires standard and custom Meta events as users move through your funnels.

This allows you to:

* Optimize ad delivery using funnel and payment signals
* Track conversions across the full funnel journey
* Improve event match quality with server-side CAPI events
* Build custom audiences based on funnel behavior
* Attribute purchases back to specific ad campaigns

Both the Pixel and CAPI send the same events with the same event ID, allowing Meta to automatically deduplicate them.

***

## Enabling the Integration

Meta is configured per campaign.

To enable Meta on a campaign:

1. Open a **Campaign** in the Zellify dashboard
2. Go to **Campaign Settings**
3. Select **Meta** as the traffic source
4. Enter your **Meta Pixel ID**
5. Enter your **Meta Conversions API (CAPI) Token**
6. (Optional) Enter a **Test Event Code** for debugging

When enabled:

* The Meta Pixel is loaded on all funnel pages in that campaign
* Conversions API events are sent server-side in parallel

This allows you to use different Pixels for different campaigns.

***

## Finding Your Pixel ID and CAPI Token

#### Pixel ID

1. Go to **Meta Events Manager**
2. Select your Pixel under **Data Sources**
3. Your Pixel ID is displayed in the header

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2FQeFDlKArWJSi93RPzoHy%2Fimage.png?alt=media&amp;token=652b6dfb-2b13-46d1-8fba-52eaa2349ced" alt=""><figcaption></figcaption></figure>

#### Conversions API Token

1. In Events Manager, select your Pixel
2. Go to **Settings**
3. Scroll to **Conversions API**
4. Click **Generate Access Token**
5. Copy the token and paste it into Zellify

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2FJxj6yblxuHkW7hhC9Nl7%2Fimage.png?alt=media&amp;token=d0e5c0b2-668c-4061-8360-f3d0b94f83a9" alt=""><figcaption></figcaption></figure>

#### Test Event Code (Optional)

1. In Events Manager, go to **Test Events**
2. Copy the Test Event Code shown at the top
3. Paste it into Zellify to verify events are received correctly

<figure><img src="https://951987241-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVPontcfIF8v0iocPko5l%2Fuploads%2FFnr7IzVA8TeApde169uZ%2Fimage.png?alt=media&amp;token=593db6ee-8695-4ac4-9543-04c9f8cca677" alt=""><figcaption></figcaption></figure>

***

## How It Works

Every event is sent through two channels simultaneously:

**Pixel (client-side)**\
Events fire directly from the user’s browser.

**Conversions API (server-side)**\
The same events are sent from Zellify’s backend to Meta.

Both channels send the same `event_id`. Meta uses this ID to deduplicate events, ensuring each conversion is counted only once while maximizing match quality.

No additional setup is required for deduplication.

***

## Events Sent to Meta

Below is the full list of events sent to Meta.

| Funnel Event         | Meta Event Name      | Type     | Includes Value |
| -------------------- | -------------------- | -------- | -------------- |
| Page view            | PageView             | Standard | No             |
| Lead                 | Lead                 | Standard | No             |
| Page completed       | PageCompleted        | Custom   | No             |
| Email captured       | CompleteRegistration | Standard | No             |
| Checkout presented   | InitiateCheckout     | Standard | Yes            |
| Payment method added | AddPaymentInfo       | Standard | Yes            |
| Payment succeeded    | Purchase             | Standard | Yes            |
| Trial started        | StartTrial           | Standard | No (value: 0)  |
| Subscription started | Subscribe            | Standard | No (value: 0)  |

***

## Event Details

#### PageView

Fired on every funnel page visit.

#### Lead

Fired when the user engages beyond the first page.

#### PageCompleted (Custom Event)

Fired when a user completes a funnel step.

#### CompleteRegistration

Fired when a user submits their email.

#### InitiateCheckout

Fired when the payment form is loaded. Includes product and value data.

#### AddPaymentInfo

Fired when a user begins entering payment details.

#### Purchase

Fired when a payment completes successfully. Includes full purchase value and item details.

#### StartTrial

Fired when a free trial begins. Value is set to 0.

#### Subscribe

Fired when a paid subscription begins. Revenue is reported through the Purchase event.

***

## Purchase Event Data

When **Purchase** fires, the event includes:

* value — Total purchase amount (decimal, e.g. 9.99)
* currency — Currency code (e.g. USD)
* content\_ids — Array of product IDs
* contents — Array of items (id, quantity, item\_price)
* num\_items — Number of items purchased
* content\_type — Always set to product

This ensures accurate revenue tracking and optimization inside Meta Ads Manager.

***

## Advanced Matching & User Data

Zellify sends user data with every event to improve Meta’s ability to match events to user profiles.

### Client-Side (Pixel Advanced Matching)

* em — User’s email (after email capture)
* external\_id — Session ID
* country — User’s country
* ct — User’s city

### Server-Side (Conversions API)

* em — User’s email (after email capture)
* external\_id — Session ID
* fbp — Facebook browser cookie
* fbc — Facebook click ID
* country — User’s country
* city — User’s city
* client\_ip\_address — User’s IP address
* client\_user\_agent — Browser user agent

The fbp and fbc values are automatically collected from the browser and forwarded server-side, improving match rates for users arriving from Meta ads.

***

## Event Deduplication

Both the Pixel and Conversions API send the same event\_id for each event.

Meta uses this ID to automatically deduplicate events, ensuring each conversion is counted only once even though it arrives through two channels.

This is handled automatically by Zellify and requires no additional configuration.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zellify.app/platform-introduction/integrations/meta-pixel-and-conversions-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
