> For the complete documentation index, see [llms.txt](https://docs.getpurpledot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getpurpledot.com/integrations/analytics/meta/connect.md). Agents can also search and read this documentation through its [MCP server](https://docs.getpurpledot.com/~gitbook/mcp).

# Connect Meta

Connect Meta to receive events from the Purple Dot checkout.

Background: [How analytics integrations work](https://docs.getpurpledot.com/integrations/analytics/how-analytics-integrations-work.md#checkout-events).

{% hint style="warning" %}
Purple Dot sends Meta the sale when the shopper places the pre-order. When you release it, Purple Dot also creates an order in your e-commerce platform, and a connection that reads platform orders can record the sale again. After a test release, check that the new order doesn't duplicate the sale in Meta. See [De-duplicating orders at release](https://docs.getpurpledot.com/understanding-purple-dot/pre-order-timing-and-your-reporting.md#de-duplicating-orders-at-release).
{% endhint %}

## Before you start

* [Set up Meta storefront tracking](https://docs.getpurpledot.com/integrations/analytics/meta/set-up-storefront-tracking.md), or verify your existing tag or pixel.
* Your store sells pre-orders through the Purple Dot checkout.
* The [Facebook & Instagram](https://apps.shopify.com/facebook) app is installed in your Shopify store and connected to your Meta Business account.
* A **dataset (pixel)** is active on the storefront through that app, with browser events flowing in Events Manager.
* You have admin access to your Meta Business Manager and Events Manager.

## Steps

1. In [Meta Events Manager](https://business.facebook.com/events_manager), select the dataset used on your storefront: the same one connected through the Facebook & Instagram app.
2. Go to **Settings** > **Conversions API** and choose **Set up manually** or **Connect via partner**. Either works, because Purple Dot sends events directly with an access token.
3. Confirm the dataset accepts server events for the events listed in [the event reference](https://docs.getpurpledot.com/integrations/analytics/meta/events-and-settings.md#events), and configure these parameters to send with them: **Event ID**, **Email**, **Browser ID**, **Phone**, and **Client IP**.

   <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-6486fc1ffdea1aa3861ccc53930373f9b3ff5188%2Fanalytics-meta-setup-3.png?alt=media" alt="Meta setup screen"><figcaption></figcaption></figure>
4. Under **Set up manually**, select **Generate access token**. Copy the token straight away and store it securely, as Meta may not show it again.

   <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-0e158e813976eea9fd7a24e6de46ebd667ae857b%2Fanalytics-meta-setup-4.png?alt=media" alt="Meta setup screen"><figcaption></figcaption></figure>
5. On the same dataset, open **Settings** and copy the **Dataset ID** (a numeric string). Use the Dataset ID, not the Business Manager ID or ad account ID.

   <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-6440ccaa9df1bcd8935e02da8bdf41c5d0edb43b%2Fanalytics-meta-setup-5.png?alt=media" alt="Meta setup screen"><figcaption></figcaption></figure>
6. Optional: open the **Test Events** tab and copy the **Test event code** shown at the top. Keep the tab open.
7. In the Merchant Portal, go to **Settings** > **Integrations**.
8. Under **Analytics**, select **Connect** for **Meta**.
9. Enter the **Access Token** and **Dataset ID** from steps 4 and 5.
10. Optional: enter the **Test Event Code** from step 6, select **Test Connection**, and wait for **Credentials verified!**.
11. Select **Save**.

## Verify

* **Test event:** after **Test Connection**, go back to **Events Manager** > your dataset > **Test Events**. Within a few seconds you should see an event named `PurpleDotTestEvent`, shown as received or processed, not rejected.

  <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-de8d5cb824a10751e5917087d82a24f03a07c1be%2Fanalytics-meta-setup-6.png?alt=media" alt="Meta verification screen"><figcaption></figcaption></figure>
* **Live checkout:** open any storefront page with your test event code in the URL, for example `https://your-store.com/products/example-product?meta_test_event_code=TEST52433`. Complete a test pre-order (add to cart, open checkout, enter payment details, complete the order), then confirm in **Test Events** that the real checkout events appear: `InitiateCheckout`, `AddPaymentInfo`, and `Purchase`.

  <figure><img src="https://2758444809-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM5A7csYKEplvsuQqHenE%2Fuploads%2Fgit-blob-125269ad911fd11023d7271a882ef63aaad4e408%2Fanalytics-meta-setup-7.png?alt=media" alt="Meta verification screen"><figcaption></figcaption></figure>

## Troubleshooting

* [My integration is not syncing](https://docs.getpurpledot.com/troubleshooting/orders-and-inventory/integration-is-not-syncing.md)
* [Get more help](https://docs.getpurpledot.com/troubleshooting/get-more-help.md)

## Related

* **Concept:** [Choosing a checkout method](https://docs.getpurpledot.com/understanding-purple-dot/choosing-a-checkout-method.md)
* **Do this:** [Track pre-order conversion](https://docs.getpurpledot.com/managing-pre-orders/reports-and-data/track-pre-order-conversion.md)
* **Look up:** [Meta events and settings](https://docs.getpurpledot.com/integrations/analytics/meta/events-and-settings.md)
* **Fix it:** [My integration is not syncing](https://docs.getpurpledot.com/troubleshooting/orders-and-inventory/integration-is-not-syncing.md)


---

# 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.getpurpledot.com/integrations/analytics/meta/connect.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.
