> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.cartpanda.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Set Up the Facebook (Meta) Pixel on Cartpanda

The Facebook (Meta) Pixel allows you to track conversions and key events in your store, such as page views, payment initiation, and completed purchases.

It is essential for anyone running ads on Facebook and Instagram, as it helps you understand customer behavior, optimize campaigns, and improve ad performance.

# How to find your Facebook Pixel ID

To locate your Pixel ID:
1. Access your **Facebook Business Manager** account.
2. Click the **Settings (gear icon)** in the side menu.
3. Go to **Data Sources**.
4. Select **Pixels**.
5. Find the desired Pixel.
6. The **Pixel ID** appears below the Pixel name.

Once you have the Pixel ID, you can proceed with the setup in Cartpanda.

# Setting up the Facebook Pixel on Cartpanda

This is the simplest configuration method.
1. Go to **Admin** page.
2. Open the **Tracking and scripting** section.
3. Locate **Facebook Pixel**.
4. The standard method will be selected by default.
5. Paste your **Pixel ID**.
6. Click **Save**.

###### Pixel per product

You can also create **product-specific pixels**:
* Click **Add new Pixel**
* Add the desired product
* Associate the Pixel only with that item

# Setting up your Pixel via API

The **Facebook Pixel API (Conversions API / CAPI)** provides more accurate event tracking by sending data directly from Cartpanda’s server to Facebook, reducing losses caused by ad blockers, cookie restrictions, and browser limitations.
Unlike the standard browser-based method, API tracking ensures higher data reliability.

###### Before you start

Make sure that:
* You have access to the **Facebook Events Manager**
* Your **Facebook Pixel is already created**
* Your store domain is properly configured and published
* You have admin permissions in the Facebook Business account

###### Step-by-step API setup

1. Access your **Cartpanda Admin Panel**.
2. Go to the **Tracking / Pixel settings** section.
3. Locate **Facebook Pixel**.
4. Select the **API (CAPI)** configuration method.
5. Connect your **Facebook Business account** when prompted.
6. Authorize Cartpanda to send events via API.
7. Select the correct **Facebook Pixel**.
8. Save the configuration.

Once enabled, events will automatically be sent via server-side tracking.

###### Events sent via API

With the API enabled, Cartpanda sends events such as:
* PageView
* Initiate Checkout
* Purchase
* Purchase CC
* Purchase PIX
* Purchase Boleto
* Upsell events (when applicable)

These events will appear in the **Events Manager** as **Server** or **Server + Browser** events.

###### How to validate the API integration

To confirm the API is working correctly:
1. Open the **Facebook Events Manager**.
2. Select the configured Pixel.
3. Go to **Test Events**.
4. Place a test order in your store.
5. Confirm that events appear as **Server** or **Server + Browser**.

Duplicate events are expected. Facebook automatically handles **event deduplication**.

###### Important notes

* No manual CAPI scripts are required.
* Avoid using third-party API plugins together with Cartpanda to prevent conflicts.
* API tracking can work alongside browser-based Pixel tracking.

# Custom conversions

You can optimize your campaigns by creating **custom conversions** based on payment methods.

###### Available events
* **Purchase CC** (Credit card)
`payment_method contains credit_card`
* **Purchase Pix**
`payment_method contains pix`
* **Purchase Boleto**
`payment_method contains billet`

These events help you analyze performance by payment method more precisely.

# How the Pixel works with Upsells enabled

When an **upsell** is active, event behavior changes slightly:

###### Credit card payments

1. After the main purchase, the following events fire:
* Standard **Purchase**
* Custom **Purchase CC**
2. Then:
* If the upsell is **rejected**, no additional events fire.
* If the upsell is **accepted**, a custom event **Upsell 1 Purchase** is triggered.

This event allows you to measure upsell performance accurately.

# How to validate your Facebook Pixel

To ensure everything is working correctly:
* Use the **Meta Pixel Helper** browser extension
* Check the **Facebook Events Manager**
* Place test orders
* Use an incognito window to avoid cached data or extensions

# Frequently asked questions

###### Why don’t all purchases appear in Facebook?
Facebook reports events with an estimated margin of error between **15% and 30%**.
This is expected behavior. For more accurate tracking, consider using additional analytics tools.

###### My Pixel shows a yellow warning
In most cases, you’ll see a message like:

${color}[#ebc400](**“This pixel is not paired with any product catalog”**)

This means:
* The event **was fired correctly**
* Facebook simply didn’t find a linked product catalog. Creating a catalog is optional.

###### I tested the Pixel, but events don’t appear in my ads

Events appear in ad campaigns **only for users who clicked on the ad**.
Traffic coming from other sources will not be attributed to the campaign.