# Facebook Pixel/CAPI Connector

> *Fueled's Facebook integration is available to Shopify merchants on our "Fueled Standard" plan and above.*

{% hint style="warning" %}
Important: Before turning on Fueled's Facebook Pixel/Conversion API integration, please disable any other Facebook attribution scripts that you might have installed, including Shopify's built-in Facebook Pixel/CAPI integration.

Having multiple Facebook Pixel/CAPI integrations enabled at the same time can result in conversion event duplication in Facebook.
{% endhint %}

## Introduction

Fueled's Facebook Ads Connector integrates with both Facebook Pixel and Facebook's Conversion API (CAPI) for robust and complete event tracking.

<figure><img src="/files/tHVYDDix9YvubHaMLTWP" alt=""><figcaption><p>Visualization of how Fueled works with Facebook Pixela and Conversion API (CAPI).</p></figcaption></figure>

Shopify's built-in Facebook Pixel/Conversion API (CAPI) integration works well for small businesses. But growth marketers and high-performing teams often seek out more robust solutions to power their Facebook Ads spend and targeting.

Fueled's Facebook integration captures more event types that what you get out of the box with other tools. We follow best practices and continually innovate, so that merchants using our application can get more precise in their targeting and feed Facebook's algorithms more and better data.

## How It Works

Fueled's Facebook integration loads your Facebook Pixel on all pages, and sends the following browser events to Facebook via the Facebook Pixel API:

* `PageView`
* `View content`  — for both Product Pages and Collection Pages
* `Add to cart`
* `CartViewed`
* `Initiate checkout`
* `Add payment info`
* `Purchase`
* *(More events coming soon!)*

We also send these same events to Facebook Conversion API (CAPI) — where Facebook deduplicates each set of events. By sending these events through both the Pixel API and the Conversion API, we ensure that Facebook receives the most accurate and complete data possible.

Through our CAPI integration, we can also enrich events to improve customer match rates and provide additional information about conversions.

## Installing Fueled's Facebook Pixel/CAPI Integration

First, make sure you've disabled any other FB Pixel/Conversion API integration on your site, including Shopify's built-in integration. You can still use Shopify's Facebok App, but you will need to choose Fueled as your Pixel/CAPI connector.

Then, go to the "Facebook" tab in the Fueled app:

<figure><img src="/files/aO8h4qTGKlbSGL4vz0zd" alt=""><figcaption><p>Screenshot of Fueled's configuration UI for Facebook Pixel/CAPI.</p></figcaption></figure>

Here, you will enter your Facebook Pixel ID, as well as a Facebook Access Token. You can find these within Facebook Events Manager, as described below.

### Retrieving Your Facebook Pixel ID and Business Access Token

Check out this short video for a complete guide to configuring your Facebook Pixel and Business Access Token for Fueled:

{% embed url="<https://www.loom.com/share/002c55b36bed44629cab5573d2e06fad?sid=3f92d84c-42b5-4964-b621-903c27b13fbe>" %}
Short video on configuring Fueled's Facebook integration.
{% endembed %}

#### Step 1: Creating a Facebook DataSet

1. Go into Facebook Business Manager.
2. Select "Events Manager"
3. Select "Connect Data Sources"
4. Follow the instructions for the manual setup of a Facebook Pixel/CAPI integration (as described in the video above).

#### Step 2: Copy/paste your Facebook Pixel/Dataset ID

<figure><img src="/files/vJNOnYARAv7ehyTLclID" alt=""><figcaption><p>Screenshot of Facebook Dataset UI for copy/pasting your Facebook Pixel ID</p></figcaption></figure>

Place this Pixel ID in Fueled's Facebook configuration UI:

<figure><img src="/files/1sllQ6Swh45W4H2cbnC2" alt=""><figcaption><p>Copy/paste your Facebook Pixel ID into our configuration UI.</p></figcaption></figure>

#### Step 3: Copy/paste your Facebook Business Access Token

1. Scroll down the "Settings" tab for your new Facebook Dataset to the section called "Conversions API."
2. Click "Generate Access Token"

<figure><img src="/files/u7RkNoYEUrYhWqOaKhor" alt=""><figcaption><p>Scroll down the settings screen in the Facebook Dataset UI to generate a Business Access Token.</p></figcaption></figure>

Place this token in your Fueled configuration settings for our Facebook integration:

<figure><img src="/files/KXaoLZ3HU6LQpEIWOARM" alt=""><figcaption><p>Drop the Facebook Business Access Token into your Fueled configuration.</p></figcaption></figure>

#### Step 4: Enable Advanced Customer Matching in your Facebook Dataset

<figure><img src="/files/cURFs9JlKmvwwnv9Ow79" alt=""><figcaption><p>Go into your Facebook Dataset "Settings" to enable Automatic Website Matching.</p></figcaption></figure>

## Test Your Integration

Once you complete this setup, you should start to see events flowing into Facebook Events Manager soon. Note: Initially, there can be a 4-24 hour delay before events are summarized on the "Overview" tab of your Facebook Dataset. But you can use Facebook's event testing tool to check if events are actively flowing.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.fueled.io/apps/shopify/facebook-ads-connector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
