X Pixel

Report your funnel events to X Ads to measure and optimize campaigns on X (formerly Twitter).

The X integration loads the X Pixel on your funnels and reports your funnel events to X Ads Events Manager from the visitor's browser. Unlike Meta and TikTok, X events are sent from the browser only.

On X, each conversion event you want to measure is an event you create in Events Manager, identified by an Event ID such as tw-abcde-fghij. Purchasely fires the matching event for each of its four front events.

Purchasely eventSuggested X event typeWhat to enter in the Console
Page ViewPage viewIts Event ID
Screen ViewedContent viewIts Event ID
Purchase TappedCheckout initiatedIts Event ID
PurchasePurchase, with value and currencyIts Event ID

Every event carries a unique conversion ID, so X deduplicates repeated events from the same visit.

📘

Prerequisites

The Tools → Events manager menu of X Ads Manager is available once a payment method is added to your X Ads account.

1. Create the pixel and get the Pixel ID

Skip this step if your X Ads account already has a pixel.

  1. In X Ads Manager, open Tools → Events manager and click Add event source. Save it.
X Ads Events manager: Add event source
  1. The pixel appears with its ID, a five-character code. Copy it.
X Ads Events manager: copy the pixel ID

2. Create one event per Purchasely event

Repeat for each event you want to measure. At minimum, create the Purchase event.

  1. In Events manager, click Add events.
X Ads Events manager: Add events
  1. Enter a Name (for example Purchase), select the Event type from the table above and keep the default attribution windows.
X Ads: event details
  1. Keep Define event with code as the setup method.
X Ads: setup method, define event with code
  1. Under Event installation, click Save without copying any code: Purchasely fires the event for you.
X Ads: event installation, save
  1. Each event now has an ID in the form tw-xxxxx-xxxxx. Copy the ID of each event you created.
X Ads Events manager: list of events with their IDs

3. Enter the Pixel ID and Event IDs in the Console

  1. In Web2App → Setup, section 4. External integrations, open X Pixel.
  2. Enable the integration and paste the five-character Pixel ID.
  3. In the Front events tab, enable the events you created in X and paste each Event ID next to its event. Disable the others.
  4. Save.
Purchasely Console: X Pixel integration with Pixel ID and Event IDs

4. Check that events arrive

Open the sandbox URL of a Web Flow, browse a few screens and complete a purchase with a Stripe test card. In Events manager, each event switches to Active and shows a Last recorded time.

X Ads Events manager: events overview
X Ads Events manager: status and last recorded columns

Troubleshooting

ProblemCause and solution
Events never become Active.An Event ID is missing or does not belong to this pixel. Check the IDs in the Front events tab.
Only some events are recorded.Only events with an Event ID are sent. Add the missing IDs or disable the events you do not track.
Purchases are under-counted.X receives browser events only. Ad blockers and some in-app browsers block them; compare with your Purchasely dashboards.

What’s Next

Next, run your funnel end to end in sandbox before going live.

Did this page help you?