---
title: "Getting Started with Facebook Pixel - CAPI"
description: "Getting Started"
url: https://capi.appesy.com/en/articles/3-getting-started-with-facebook-pixel-capi
collection: "Getting started"
updated: 2025-09-09
language: en
---

# Getting Started with Facebook Pixel - CAPI

Getting Started

Welcome aboard! 🎉

This guide is designed to help you set up your Facebook Pixel & Conversion API (CAPI) quickly and correctly so that you can start tracking, optimizing ads, and improving campaign performance.

## Step 1: Prepare Your Facebook Pixel (Dataset)

Before sending events to Facebook, you need to **create or connect a Pixel** (now referred to as a “Dataset” in Meta Events Manager).

**Option 1: Use an existing Pixel**

-   Go to Meta Events Manager
    
-   Choose your Business Manager and select an existing Pixel (Dataset)
    

**Option 2: Create a new Pixel (Dataset)**

1.  Go to **Meta Events Manager**
    
2.  Click **“Connect Data Sources” > “Web”**
    
3.  Select **“Conversions API”** > click **Next**
    
4.  Enter your Pixel name (e.g., “Shopify Store”) and choose **Set up manually** → **Conversions API and Meta pixel**
    
5.  Finish setup — don’t worry about installation steps; our app will handle that
    

![](https://staticfiles.gleap.io/ghelparticle/fwHiAnxgpcr8a7R6WVyIs8nB0sw3MxY8KVyHLfekxbESvEHWhwk34hCIHzWJqdUYAoo21oJAVVY.gif)

## Step 2: Enable App Embed in Theme

To activate tracking:

1.  In your Shopify Admin, go to **Online Store > Themes > Customize**
    
2.  Click on **App Embeds** (bottom left)
    
3.  Toggle **Facebook Pixel & CAPI** ON
    
4.  Save your changes
    

This will allow the app to track **Page view**, **Add to cart**, **Initiate checkout**, and other key events.

## Step 3: Create Pixel

Inside our app:

**Pixel Setup**

1.  Go to **Pixel & CAPI Configuration > Create Pixel**
    
2.  Enter your **Pixel Name** and **Facebook Pixel ID**
    
3.  Select the pages you want to track
    

> **Info:** Log in with Facebook to select the right business and dataset

**Conversion API**

1.  Enable **Conversion API**
    
2.  Get your **Facebook Access Token**
    
    -   In Meta Events Manager, select your Pixel, then open the **Settings** tab
        
    -   Scroll down to the **Conversions API**
        
    -   In **Set up direct integration,** click **Generate access token** and copy the code shown
        

![](https://staticfiles.gleap.io/ghelparticle/qHX3c12c1OkFNVAa4XqNXgjdiOmGY44Fr3KSbeydvy0rmi1B4FHZWh7urUQa2CI7uH6onWdVepm.png)

Generate access token

3.  Enter **Facebook Access Token** and **Test Event Code (Optional)**
    

**Standard Events**

Select the events you want to track - At least one event must be selected to proceed.

Available tracking events:

-   **Page view** – When a visitor loads any page on your site
    
-   **View content** – When a visitor views a product detail page
    
-   **Add to cart** – When a customer adds a product to their cart
    
-   **Initiate checkout** – When a customer starts the checkout process
    
-   **Add payment info** – When a customer enters their payment information
    
-   **Purchase** – When a customer completes a purchase
    
-   **Search** – When a visitor uses the search function on your website
    

> **Info:** Our app will send events using **both Pixel (browser)** and **CAPI (server)**.

## Step 4: Send Your First Events

**1\. Test Browser Events (Pixel)**

Make sure your Facebook Pixel is connected through the app. Then:

-   Go to **Meta Events Manager** – **Test Events** tab
    
-   Enter your store URL in the test field and click Test events
    
-   On your store, perform actions such as: viewing a product page, adding a product to cart, initiating checkout, completing a purchase
    
-   Return to Facebook Events Manager to confirm that events like Page view, View content, Add to cart, Initiate checkout, and Purchase are appearing in real time
    

![](https://staticfiles.gleap.io/ghelparticle/9cyXwI0w3S2jNhu2tWuW03N8OeJvCSU5GWGGutQJzqxr0ZQRESrl7lm3UbGXpT1DS2IYXH25CMA.png)

**2\. Test Server Events (Conversion API)**

If you've enabled CAPI, follow these steps to test:

-   In Meta Events Manager, get your **Test Event Code**
    
-   Enter this code into the Test Event Code field in our app
    
-   Perform the same actions on your storefront
    
-   Server-side events will now show up in the Test Events tab, marked as coming from **Server**
    

![](https://staticfiles.gleap.io/ghelparticle/7tmpkuiNETxF4BLa3unaGHq7ucBAsHwhp98HND9hgTQVLfNrE0IyGkla1IOBIjrNjv0l1K5Q0yW.png)

Test Event Code

**3\. Check Event Deduplication**

When both Pixel (browser) and CAPI (server) are sending the same events (like a purchase), Facebook will deduplicate them automatically, as long as the events share the same event\_name and event\_id.

Our app should automatically handle deduplication logic. In Events Manager, you may see both sources reported, with one flagged as deduplicated.

![](https://staticfiles.gleap.io/ghelparticle/r32paNuuR4XKvDfwOCXh28jamDI7NmB6ZNdi4WLWLq7uSnVmutzquIcuOOl5lOxEIMekOtSGkJK.png)
