> For the complete documentation index, see [llms.txt](https://help.littledata.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.littledata.io/integrations/facebook-capi/how-to-install-shopify-to-conversions-api.md).

# Shopify to Meta Conversions API installation guide

This guide shows you how to connect your Shopify store to Meta in the Littledata app. You copy two values from Meta Events Manager (your Pixel ID and a Conversions API access token) and paste them into the Littledata app.

### Before you start

* The Littledata app is installed on your Shopify store.
* You have full control of the Meta pixel (also called a dataset) in your Meta business portfolio, or developer access to the business. Without it, Meta hides the **Generate access token** link you need below.
* You can open the Littledata app and Meta Events Manager in two browser tabs, so you can copy values between them.

### Start the setup in the Littledata app

{% stepper %}
{% step %}

#### Open the Littledata app

In your Shopify admin, go to **Apps** and open **Littledata**.
{% endstep %}

{% step %}

#### Add the destination

In the **Destinations** section, click **Add destination**. A list of destinations opens.
{% endstep %}

{% step %}

#### Choose Meta

Find **Meta** in the list and click **Connect** next to it. The setup opens on the **Connect your store to Meta Ads** screen. Click **Continue**.
{% endstep %}

{% step %}

#### Choose your tracking preferences

On the **Set up your tracking** screen, pick one option and click **Continue**:

* **Use best practices** (recommended): tracks all supported events and uses the **Shopify Product ID** as the product identifier. You can change this later.
* **Customize your tracking**: on the next two screens, choose your product identifier, then choose which events to send to Meta. Click **Continue** on each screen.

You'll then see **Connect your Meta pixel**, with empty **Pixel ID** and **Access token** fields. Leave this tab open.
{% endstep %}
{% endstepper %}

### Get your Pixel ID and access token from Meta

{% stepper %}
{% step %}

#### Open Meta Events Manager

In a new browser tab, open Meta Business Suite. Click **All tools**, then **Events Manager**. If you have more than one business portfolio, choose the one that owns your pixel.
{% endstep %}

{% step %}

#### Open Datasets and find your pixel

In the Events Manager left menu (**Connect data**, **Overview**, **Datasets**, **Custom conversions**, **Integrations**), click **Datasets**. Your pixels are listed in the middle column. Under each pixel name you'll see **ID** followed by a long number.

If you have more than one pixel, pick the one you use for this Shopify store.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-ede74c84088041827e047b64bcca429505924995%2Fhc-meta-datasets-pixel-id.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Copy your Pixel ID

Copy the number after **ID** under your pixel's name. Copy the digits only, not the word "ID". It's usually 15 or 16 digits, like `556318326161417`.

You can also click the pixel, open its **Settings** tab and copy the **Pixel ID** under **Details**. It's the same number.
{% endstep %}

{% step %}

#### Paste the Pixel ID into the Littledata app

Go back to the Littledata app tab and paste the number into the **Pixel ID** field.
{% endstep %}

{% step %}

#### Open the pixel's Settings tab

Back in Meta Events Manager, click your pixel. At the top you'll see the tabs **Overview**, **Test events**, **Diagnostics**, **History** and **Settings**. Click **Settings**, then scroll down to the **Conversions API** section.
{% endstep %}

{% step %}

#### Click Generate access token

The **Conversions API** section has three ways to set up, one under the other. You only need the small grey **Generate access token** link in the middle one:

1. **Set up manually**, with a **Get started** button. Don't click **Get started**. It starts Meta's step-by-step guide and doesn't show you a token.
2. **Set up direct integration**, with two options: **Set up with Dataset Quality API** (marked **Recommended**, selected by default) and **Set up without Dataset Quality API**. Leave **Set up with Dataset Quality API** selected. These are options, not buttons. Just below them is the small grey text link **Generate access token**. Click this link.
3. **Set up through a partner integration**, with a **Choose a partner** button. Don't click this.

Meta shows a long token made of letters and numbers. It usually starts with `EAA`.

If generating the token fails, select **Set up without Dataset Quality API** and click **Generate access token** again.

<figure><img src="https://3956158252-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1QhTbrMraNWciQeDvu1b%2Fuploads%2Fgit-blob-3d2f608fbd6bb1075e9d26797f0daa3433a29c11%2Fhc-meta-capi-generate-token.png?alt=media" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Copy the token

Copy the whole token right away. Meta doesn't store it, so you can't view it again after you close the window. If you lose it, generate a new one.
{% endstep %}

{% step %}

#### Paste the token into the Littledata app

Go back to the Littledata app tab and paste the token into the **Access token** field. Make sure there are no spaces before or after it. Click **Continue**.

If you see **Please enter a valid pixel ID** or **Please enter a valid access token**, check that you copied the full value with no extra characters.
{% endstep %}
{% endstepper %}

### Turn off other Meta tracking and connect

Turn off any other app that sends events to the same Meta pixel. This includes Shopify's Facebook & Instagram sales channel, other tracking apps, and Meta tags in server-side Google Tag Manager (sGTM).

Meta can't deduplicate their events against Littledata's, because each tool uses its own event IDs. A purchase tracked by both would be counted twice. See [Does Meta deduplicate Littledata's events against other apps?](https://help.littledata.io/integrations/facebook-capi/meta-capi-faq#does-meta-deduplicate-littledatas-events-against-other-apps)

{% stepper %}
{% step %}

#### Open the Facebook & Instagram sales channel settings

Skip to the next part if you don't use this sales channel. In your Shopify admin, under **Sales channels**, click **Facebook & Instagram**. Then click **Settings** in the channel's menu.
{% endstep %}

{% step %}

#### Open the data sharing settings

On the Settings page, click **Data sharing settings**.

On older layouts, the page shows a **Share data** card with your current level (for example **Maximum**). Click the **Change** link at the top right of that **Share data** card. Don't click any other **Change** link further down the page. Those belong to other settings, not data sharing.
{% endstep %}

{% step %}

#### Turn off customer data sharing

On the data sharing page, find the **Customer data sharing** section. Switch customer data sharing off, then click **Save**.

Do this whatever level is shown (**Standard**, **Enhanced** or **Maximum**). Lowering the level isn't enough: every level still sends events to your Meta pixel, and Littledata sends both browser and server events, so they would be counted twice.
{% endstep %}

{% step %}

#### Turn off other tracking apps

For any other app that sends events to this Meta pixel, uninstall the app or turn off its Meta tracking. Check that app's documentation for how. If you use sGTM, remove or pause its Meta tags for this pixel.

Also check **Settings** > **Customer events** in your Shopify admin for any custom pixel that sends Meta events, and remove any Meta pixel code pasted into your theme.
{% endstep %}

{% step %}

#### Confirm and connect

Back in the Littledata app, you're on the **Disable other tracking apps** screen. Tick **I've disabled other tracking apps** and click **Connect**.
{% endstep %}

{% step %}

#### Wait while tracking is added

You'll see **Adding tracking** while Littledata applies its tracking to your Meta pixel. When it's done, you'll see **You're connected! Here's where to go next.** The Meta connection is now live.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
New and Returning Customer Purchase events are not added automatically. You can add them from the **Event editor**. See [New and Returning Customer Purchase in Meta Ads](https://help.littledata.io/integrations/facebook-capi/meta-ads-custom-events-verifying-new-and-returning-customer-purchase).
{% endhint %}

### Check that it works

{% stepper %}
{% step %}

#### Check the destination card

In the Littledata app, find the Meta card in **Destinations**. It shows a green **Connected** badge.
{% endstep %}

{% step %}

#### Check events in Meta

In Meta Events Manager, click **Datasets**, select your pixel and open the **Overview** tab. As shoppers browse and buy, Littledata's events (for example **Purchase**) start to show in the events list. Look at the **Integration** column: events Littledata sends from both the browser and the server show **Multiple**, and server-only events show **Conversions API**. New events can take a little while to appear.

If you still see events coming from Shopify's Facebook & Instagram channel, its data sharing is still on.
{% endstep %}
{% endstepper %}

### Related articles

* [How it works: Shopify to Meta Conversions API](https://help.littledata.io/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api)
* [FAQ: Meta Conversions API](https://help.littledata.io/integrations/facebook-capi/meta-capi-faq)
* [Troubleshooting common Meta errors](https://help.littledata.io/integrations/facebook-capi/common-meta-errors)
* [Turning off Shopify's CAPI integration](https://help.littledata.io/integrations/facebook-capi/disable-capi-shopify)
