> ## Documentation Index
> Fetch the complete documentation index at: https://storekit.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Meta Pixel and Conversions API

> Set up Facebook and Instagram conversion tracking for your storekit store with a Meta Pixel or dataset, and prepare secure server-side Purchase tracking through the Conversions API.

Use Meta tracking to measure how Facebook and Instagram ads contribute to visits, checkout activity, and orders on your storekit store.

storekit's recommended setup uses:

* A Meta Pixel or dataset ID to identify the correct data source
* Browser events for customer activity such as page views and checkout
* The Meta Conversions API (CAPI) for authoritative server-side Purchase events, when enabled for your store

## Before you start

You need:

* Access to your organisation's Meta Business Portfolio or Business Suite
* Permission to manage the Pixel or dataset in Meta Events Manager
* The storekit store URL you want to measure
* Approval from the person responsible for your privacy notice, cookie consent, and advertising measurement

Meta increasingly displays website event sources as **datasets** in Events Manager. A dataset linked to a Pixel may use the same ID. Meta documents the relationship in [About datasets in Meta Events Manager](https://www.facebook.com/business/help/750785952855662).

## Do you need a Meta app?

You do not normally need to create your own Meta app for a manual storekit setup.

Meta recommends generating the access token through Events Manager. Meta's documented **Manage Integrations** flow creates the required Conversions API app and system user without App Review. A custom app is generally only needed for an organisation building its own OAuth-based onboarding or managing many advertisers programmatically.

See Meta's current [Conversions API getting started guide](https://developers.facebook.com/docs/marketing-api/conversions-api/get-started/) before creating credentials, because Meta may change labels or permission requirements.

## 1. Select or create the Meta data source

In [Meta Events Manager](https://www.facebook.com/events_manager2), select the Pixel or dataset that should receive events from this store.

Use the same data source for browser and server events. Creating separate data sources for the same storefront makes attribution and deduplication harder.

Record its Pixel or dataset ID. Do not confuse this with an ad account ID, Business Portfolio ID, or Meta app ID.

## 2. Add the ID to storekit

The Meta Pixel integration is configured separately for each store.

<Steps>
  <Step title="Open the Meta Pixel integration">
    In the storekit dashboard, go to **Stores** → your store → **Settings** → **Integrations** → **Meta Pixel**.
  </Step>

  <Step title="Enter the data source ID">
    Enter the ID in **Meta Pixel ID**.
  </Step>

  <Step title="Save the setting">
    Click **Save**.
  </Step>
</Steps>

Repeat these steps for every store that should send events to the same or a different Meta data source.

## 3. Generate a Conversions API access token

In your Meta Business account, open Events Manager and select the Pixel or dataset. Then open **Settings**, find **Conversions API**, and under **Set up manually** choose **Generate access token**.

Meta notes that the token option is only visible to users with sufficient business permissions. If the option is missing, ask a Meta Business administrator to complete the step or grant the required access.

Return to the storekit **Meta Pixel** integration, enter the token in **Conversions API access token**, and click **Save**. Server-side tracking is enabled when both the Pixel ID and access token are saved.

<Warning>
  Treat the access token as a password. Paste it only into **Conversions API access token**. Do not put it in a support ticket, shared document, analytics tag, browser code, screenshot, or chat message.
</Warning>

## 4. Understand which events are sent

The current setup can include:

| Delivery           | Events                                                  | Notes                                                                              |
| ------------------ | ------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| Browser Meta Pixel | `PageView`, `AddToCart`, `InitiateCheckout`, `Purchase` | Enabled by the **Meta Pixel ID** setting                                           |
| Conversions API    | `Purchase`                                              | Enabled when both **Meta Pixel ID** and **Conversions API access token** are saved |

Server-side Purchase values come from the completed storekit order rather than values supplied by the browser. Customer identifiers may be normalised and SHA-256 hashed before delivery; website context such as IP address, browser user agent, and source URL may also be sent to support matching and attribution.

## 5. Test before running campaigns

### Check browser events

1. Install Meta's **Meta Pixel Helper** browser extension
2. Open the storekit store
3. Visit a menu, add an item, and begin checkout
4. Confirm that the expected events use the intended Pixel or dataset ID

### Check server events

Meta's **Test Events** tool requires a temporary `test_event_code` to be included in the server request. Ask storekit support to coordinate this test; there is no dashboard field for the code.

In your Meta Business account, open Events Manager, select the Pixel or dataset, and then open **Test Events**.

1. Provide the generated test code through the secure process agreed with storekit support
2. Place a test order
3. Confirm that Meta receives a server-side `Purchase`

Remove the test code after verification. Meta warns that Test Events can still be used for ads measurement, so use a genuine controlled test rather than repeatedly sending production orders with a test code.

You can also check **Overview** in Events Manager after a real order to confirm that production events are arriving.

## Prevent duplicate Purchase events

Duplicate Purchase events can inflate reported revenue and campaign performance.

* Do not add a second Meta `Purchase` tag through Google Tag Manager
* Do not install another Meta Pixel plugin on the same store
* Use the same Pixel or dataset for browser and server delivery
* Coordinate the browser-to-server rollout with storekit support

Meta deduplicates matching browser and server events only when they carry the same event name and event ID. If Events Manager shows separate Browser and Server Purchase events rather than a deduplicated event, pause campaign decisions based on those totals and contact storekit support.

## Privacy and consent

Server-side delivery does not remove your privacy obligations or replace cookie and consent controls.

Before enabling Meta tracking:

* Confirm the lawful basis for advertising measurement in every region where you operate
* Update your privacy and cookie notices to describe Meta and server-side conversion measurement
* Make sure your consent configuration matches the advice of your legal or privacy team
* Avoid sending data that your organisation has not approved for advertising use
* Review Meta's Business Tools Terms and data-processing requirements

## Recommended rollout

1. Configure one non-critical store first
2. Verify the Pixel or dataset ID
3. Check browser events before enabling server delivery
4. Enter the Conversions API access token and save the integration
5. Complete a controlled test order
6. Confirm one Purchase is counted, with no duplicate revenue
7. Compare storekit orders with Meta reporting over several days
8. Roll out to the remaining stores

## Troubleshooting

### The access-token option is missing

You may not have sufficient Meta Business permissions. Ask an administrator to check your access to the Pixel or dataset and follow Meta's current getting-started guide.

### No server Purchase appears

Confirm that:

* Both **Meta Pixel ID** and **Conversions API access token** are saved
* The Pixel or dataset ID matches the selected Meta data source
* The test order completed successfully
* Events Manager is showing the expected date range and data source

### Revenue is higher than storekit

Look for duplicate Browser and Server Purchase events, custom GTM Purchase tags, another Pixel plugin, or the same test order being submitted more than once.

### Events have low match quality

Complete the test with realistic customer details, check that the storefront is supplying a normal browser user agent and source URL, and review Meta's diagnostics for missing parameters.

## Related

<CardGroup cols={2}>
  <Card title="Google Tag Manager" icon="tags" href="/docs/guides/integrations/marketing/google-tag-manager">
    Configure GTM separately from Meta tracking
  </Card>

  <Card title="Customer Data" icon="users" href="/docs/guides/marketing/customer-data">
    Understand the customer information stored in storekit
  </Card>
</CardGroup>


## Related topics

- [Google Tag Manager](/docs/guides/integrations/marketing/google-tag-manager.md)
- [Event Tracking](/docs/privacy-security/event-tracking.md)
- [Capturing Guest Data](/docs/guides/guest-data/overview.md)
- [API & Webhooks](/docs/guides/integrations/api-webhooks.md)
- [1. Create Your Store](/docs/getting-started/launch/create-your-store.md)
