# Setup Guide

This guide will help you set up X Pixel as a destination in the RudderStack dashboard. It also lists the configuration settings required to correctly send data from the supported sources to X Pixel.

## Connection compatibility

{{< destination-config >}}

{{< info >}}
While using a Content Security Policy (CSP) header on your website, you need to [allowlist]({{< ref "sources/event-streams/sdks/rudderstack-javascript-sdk/load-js-sdk.md#allowlist-destination-domain" >}}) the `ads-twitter.com`, `ads-api.twitter.com`, and `analytics.twitter.com` domains in the `img-src` and `connect-src` directives to to see results with X Pixel.
{{< /info >}}

## Setup

In your [RudderStack dashboard](https://app.rudderstack.com/), add a source. Then, from the list of destinations, select **XPixel**.

### Connection settings

| Setting | Description |
| :----| :-----|
| Destination name | Assign a name to uniquely identify the destination. |
| Pixel ID | Enter your Pixel ID of your X pixel event source. |

### Configuration settings

The [Client-side Event Filtering]({{< ref "sources/event-streams/sdks/event-filtering.md" >}}) setting lets you specify which events should be discarded or allowed to flow through to X Pixel.

| Setting | Description |
| :----| :-----|
| Choose if you want to turn on events filtering | Choose from either of the **No events filtering**, **Filter via allowlist**, and **Filter via denylist** options to specify if and how you want to filter the events.    |
| Allowlisted/Denylisted events | If you have selected either of the **Filter via allowlist** or **Filter via denylist** options in the previous setting, use this setting to specify the events you want to allow or discard while flowing to X Pixel.  |

### Event mapping

| Setting | Description |
| :----| :-----|
| External Event mappings | Click **Set-up mapping** to map the RudderStack events to X Pixel events. RudderStack also provides the JSON mapper to set these mappings. |

## Next steps

- [Send events in device mode]({{< ref "destinations/streaming-destinations/xpixel/device-mode.md" >}})

## FAQ

#### How can I verify that X Pixel is correctly placed on my website?

You can leverage the [X Pixel Helper](https://business.x.com/en/help/campaign-measurement-and-analytics/pixel-helper.html) to verify the X Pixel placement. It shares the tracking status of the X Pixel and relevant events, and also includes the error codes depending on the issue.

Download the Google Chrome extension for X Pixel Helper [here](https://chrome.google.com/webstore/detail/twitter-pixel-helper/jepminnlebllinfmkhfbkpckogoiefpd?hl=en-US).
