Published by the ·

What is the X Pixel?

The X Pixel is a website tag that tracks what people do on your site after seeing or engaging with your X ads. X's alternative is the Conversion API, a server-to-server connection that needs X Ads API access and a developer account. X recommends the pixel for most advertisers and says at least one of the two is needed to get the full capabilities of web campaigns.

The pixel has two parts. The base code goes on every page and tracks visits. Event code tracks single actions, such as a purchase, and only works when the base code is present. The same pixel builds Website Activity Audiences for retargeting.

Source: X Help Center: Conversion tracking for websites, checked 15 October 2026

How do you create the pixel and its events?

Event types are Page view, Add to cart, Lead, Added payment info, Purchase and Custom. X advises using each conversion type only once on your site, because duplicates split the signal.

  1. Log in to ads.x.com.
  2. Under Tools, select Events Manager. No Tools tab usually means no credit card has been added to the ads account.
  3. Click Add event source and agree to the terms. X generates the base pixel with Landing Page Views and Site Visits events.
  4. Click Add events.
  5. On Event Details, name the event, choose its Type, adjust the attribution window if you want, and optionally turn on Website activity audience. Click Create Event.
  6. Choose to define the event with code, which X recommends for flexibility.
  7. On Event installation, pick how you'll install it, tick any parameters you want in the code template, and click Done.
  8. Repeat for each action you want to track.

Source: X Help Center: Conversion tracking for websites, checked 15 October 2026

How do you install the base code and event code?

Ticking parameters only builds a template: X says the code must be updated to pass real values. Parameters include value, currency (an ISO 4217 code such as EUR), conversion_id for removing duplicates when you also use the Conversion API, and contents for product details. Email addresses and phone numbers can be sent too, and X says the pixel hashes them with SHA256 automatically.

  1. In Events Manager, click View Twitter pixel for your pixel.
  2. On the Website code page, copy or download the code in the Pixel code field.
  3. Paste it before the closing head tag on every page of your site.
  4. For each event, click View install code, then Copy Code or Download.
  5. Add the event code to the right place, such as a thank-you page or a download button.
  6. If you use parameters, replace the default values so real figures are sent.

Source: X Help Center: Conversion tracking for websites, checked 15 October 2026

How do you install the X Pixel with Google Tag Manager?

X says event triggers must already be set up with gtag.js for this to work. X also documents Ensighten and Tealium, and says the old X Conversion Tracking (UWT) app in Ensighten is being replaced by the X Pixel template.

  1. In ads.x.com, go to Tools, then Events Manager.
  2. Click Install Pixel, then Partner Integrations and Google Tag Manager.
  3. Click continue and authorise access to your Google account.
  4. Choose client-side (Pixel), server-side (Conversion API) or both.
  5. Select the Google Tag Manager container to use.
  6. Review the account information and custom HTML before publishing. For purchase, add to cart and lead events, select Track Google Tag Manager dataLayer Standard Events first.
  7. Check the pixels in your Google Tag Manager account.

Source: X Help Center: Conversion tracking for websites, checked 15 October 2026

How do you check the X Pixel is working?

  • Events Manager statuses: Active means activity in the last 24 hours, No recent activity means none in that time, and Inactive means none detected
  • Recent Activity Log: hover over the three dots beside an event and choose View Activity to see sample data and parameters
  • X Pixel Helper: a free Chrome extension. Its badge shows how many pixels it found on the page, and it warns about issues such as a pixel firing more than once
  • Manual check: in your browser's developer tools, the Network tab should show one uwt.js file and two adsct calls per tag, all with status 200

Sources: X Help Center: Conversion tracking for websites, checked 15 October 2026; X Help Center: X Pixel Helper, checked 15 October 2026; X Business: FAQs about pixels, checked 15 October 2026

Why isn't your X Pixel tracking conversions?

  • No Tools tab in X Ads: add a credit card to the ads account
  • The code sits inside an iframe or the wrong part of the page: install the base code in the head section, outside any iframe
  • You rely on Campaign Manager 360 floodlight tags: X says to put its pixel directly on the page instead
  • Pixel calls show as blocked: your Content Security Policy must allow ads-twitter.com, ads-api.twitter.com and analytics.twitter.com in img-src and connect-src
  • Ads link through a click tracker, URL shortener or redirect: that breaks the click ID, so link to your site directly
  • You find a tag ID you don't recognise: it may belong to another ads account in your organisation, or to a deleted tag
  • The Account Highlights warning stays after a fix: X says it clears within 12 to 24 hours, otherwise contact @AdsSupport

Sources: X Business: FAQs about pixels, checked 15 October 2026; X Help Center: Conversion tracking for websites, checked 15 October 2026

Where does Zolyp fit? (Disclosure: Zolyp is our product)

The pixel measures what happens after an ad click. Zolyp works on your organic X posts: it plans, writes and schedules them, and sends a written weekly report on what worked. There's a 3-day free trial, no card required.

Common questions

Do I need the X Pixel to advertise on X?

Not for every campaign, but X says you need the pixel or the Conversion API to use the full capabilities of web campaigns, such as tracking purchases.

Where do I put the X Pixel code?

Paste the base code before the closing head tag on every page, and the event code on the page or element where the action happens.

Can I install the X Pixel with Google Tag Manager?

Yes. In Events Manager, choose Install Pixel, Partner Integrations, then Google Tag Manager, and connect your Google account.

How do I know if my X Pixel is working?

Check the event status in Events Manager, use the Recent Activity Log, or install the free X Pixel Helper extension for Chrome.

What's the difference between the X Pixel and the Conversion API?

The pixel is code on your website. The Conversion API sends conversions from your server and can track offline sales. X recommends the pixel for most advertisers.

More from Zolyp