# Connect Segment to Meta Conversions API

In addition to our direct [Shopify to Meta Conversions API](/integrations/facebook-capi/how-it-works-shopify-to-meta-conversions-api.md) connection, Littledata's [Shopify source](broken://pages/LmulTGg2pFesTCBd1PgZ) supports the Meta-specific identifiers needed for the cloud-mode [Meta Conversions API](https://segment.com/docs/connections/destinations/catalog/facebook-pixel-server-side/#server-event-parameter-requirements) destination in Segment.

You need to have both the frontend Meta Pixel code and the server-side tracking (CAPI) set up on your website. To make this all work via Segment, here are the extra setup steps you will need to get Meta Ads tracking working end-to-end.

### Add Meta Pixel to all the landing pages

This is needed to track the page views and set the Meta cookies. Pixel is added automatically via Segment's tracker when you set up Segment's [Meta Pixel destination](https://segment.com/docs/connections/destinations/catalog/facebook-pixel). Alternatively, you can add the Meta Pixel tracking code yourself in the Shopify theme files.

### Enable User matching

For the Match Rate between frontend and server-side tracking to be high, you need to pass the same External ID from the browser and the server. It can be `userId` or, if it is not set, alternatively `anonymousId`. Here are the steps to accomplish that in Segment's Meta Pixel destination.

1. Go to the Meta Pixel connection settings ![segment fb pixel settings](https://res.cloudinary.com/littledata/w_512,h_508,c_fit/littledata-blog-images/2021/12/segment-fb-pixel-settings-e1638372162843.png)
2. Turn on "**Enable Advanced Matching**"
3. Turn on "**Use User ID or Anonymous ID as External ID"**

### Match Product Categories to Meta Content Types

Segment tries to match the content type of events based on `product_group`, but Shopify’s Meta sales channel sets the product’s content type as `product`, resulting in a product catalog that can't be matched to events. To solve this you need to manually map product categories to the `product` content type.

1. Go to the Meta CAPI destination settings![segment fb capi settings](https://res.cloudinary.com/littledata/w_512,h_365,c_fit/littledata-blog-images/2021/09/settings.png)
2. Click on **Map Categories to FB Content Types** ![map product category](https://res.cloudinary.com/littledata/w_512,h_257,c_fit/littledata-blog-images/2021/09/mapping.png)
3. Add all product types from the store to map to `product`. **Note**: Any uncategorized products will be included in category **all** so please add that mapping as well.

### Map Segment price to the Meta 'value' field

Events sent via Littledata to Segment include multiple value properties, so you need to select `properties.price` to map to Meta’s `value` property.

1. Go to the Meta CAPI connection settings in Segment ![segment settings](https://res.cloudinary.com/littledata/w_512,h_365,c_fit/littledata-blog-images/2021/09/settings.png)
2. Click Value Field Identifier settings![value field identifier](https://res.cloudinary.com/littledata/w_512,h_146,c_fit/littledata-blog-images/2021/09/value-field.png)
3. Select `properties.price` and click **Save**

### Limitations

Littledata's Segment integration offers support the following Meta Pixel / CAPI events:

* View content
* Add to cart
* Initiate checkout
* Add payment info
* Purchase

Other events sent by Littledata may appear as not supported or not delivered in the Segment dashboard.


---

# 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://help.littledata.io/integrations/shopify-to-segment/connect-segment-to-facebook-conversions-api.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.
