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

# X Pixel

> Track funnel events and optimize ad campaigns with X Pixel and Conversions API

The X Pixel integration tracks your funnel events and sends them to X Events Manager. This helps you target ads better and optimize your campaigns on X (formerly Twitter).

The integration includes two tracking methods:

* **X Pixel event tracking**
* **Conversion API**

<Frame>
  <img src="https://mintcdn.com/funnelfox/7RjRLWo5BVK8z5cz/assets/x-pixel.png?fit=max&auto=format&n=7RjRLWo5BVK8z5cz&q=85&s=ce8fcab1c82d50d77e8ad6852ee80849" width="1920" height="879" data-path="assets/x-pixel.png" />
</Frame>

## X Pixel vs Conversion API

Here's how these two tracking methods work:

* **X Pixel** is JavaScript code on your funnel pages that tracks visitor actions and sends this data to X through their browser.
* **Conversion API** connects FunnelFox servers directly to X, ensuring events are tracked even when browser tracking fails or gets blocked.

<Info>
  Conversion API is recommended alongside X Pixel to maximize performance benefits. Learn more in the [X documentation on Conversion API](https://business.x.com/en/help/campaign-measurement-and-analytics/conversion-tracking-for-websites).
</Info>

## Use Conversion API

Conversion API acts as a backup when browser tracking fails or gets blocked.

Here's a common example: When someone purchases your product through PayPal, they complete the transaction on PayPal's website rather than on your funnel. Some browsers (especially mobile app browsers) can't track this properly, which means you might miss the `Purchase` event.

Conversion API solves this problem. When FunnelFox servers receive transaction details from PayPal, they automatically send a `Purchase` event to X using Conversion API. This ensures you never miss important conversion data.

## Tracked events

| Event                  | X Pixel Trigger                                                                    | Conversion API Trigger                                                             |
| ---------------------- | ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| `PageView`             | User viewed a funnel page.                                                         | User viewed a funnel page.                                                         |
| `CompleteRegistration` | User completed screen with Authorization element or email input.                   | User completed screen with Authorization element or email input.                   |
| `InitiateCheckout`     | User has seen the checkout element.<br />**(Triggers only once per user session)** | User has seen the checkout element.<br />**(Triggers only once per user session)** |
| `Purchase`             | User completed checkout (not for free trial).                                      | FunnelFox received transaction event from PSP (not for free trial).                |

## Next steps

* [Set up X Pixel integration](/docs/integrations/tracking/set-up-x-pixel).
