X Pixel

X Pixel

X Pixel fires JavaScript events on user interactions and sends conversion data to X's advertising platform. Scripts track website actions such as purchases, sign-ups, and page views to measure ad campaign performance and build retargeting audiences across X's ad network.

Overview

X Pixel (formerly Twitter Pixel) is the conversion tracking and audience-building tool for X's (formerly Twitter's) advertising platform. It is a JavaScript tag placed on advertiser websites to measure the effectiveness of ad campaigns running on X by tracking what users do after clicking or viewing an ad. The pixel connects website activity to X's advertising infrastructure, enabling advertisers to attribute conversions, optimize ad delivery, and build retargeting audiences.

For website operators running X ad campaigns, the pixel is the measurement bridge between ad spend on X and business outcomes on the website. However, it also means that X receives detailed behavioral data about website visitors, which feeds into X's broader advertising ecosystem.

What This Script Does

The X Pixel performs conversion tracking and audience data collection through several mechanisms:

  • Conversion tracking: Fires on predefined conversion events — such as purchases, sign-ups, content views, downloads, and add-to-cart actions — and sends event data to X's ad platform. This allows advertisers to measure which ads drove which outcomes.
  • Page view tracking: Records page visits across the site, building a browsing profile that X uses for ad optimization and audience insights.
  • Event parameters: Transmits transaction details like order value, currency, product identifiers, and conversion count alongside event signals, enabling revenue attribution and return-on-ad-spend calculations.
  • Cookie-based identification: Sets first-party cookies to identify returning visitors and match them to X user profiles. This cross-referencing enables X to attribute conversions to specific ad impressions or clicks.
  • Retargeting audience construction: Builds audience segments based on website behavior (e.g., "visited pricing page but didn't purchase") that advertisers can target with X ad campaigns.
  • Enhanced matching: When configured, can send hashed personal data (email addresses, phone numbers) to X for deterministic user matching, improving attribution accuracy beyond cookie-based identification.
  • Dynamic ad optimization: Sends product and content data that X uses to serve dynamically personalized ads to users who previously interacted with specific items on the website.

Consent & Compliance

The X Pixel is a marketing and advertising technology that collects personal data and shares it with X's advertising platform. Under GDPR, ePrivacy Directive, and comparable privacy frameworks, this type of data collection and cross-platform sharing requires explicit consent from website visitors.

Key compliance considerations:

  • Consent requirement: The pixel must not fire before the visitor has granted marketing consent. Pre-consent loading would set tracking cookies and transmit data to X without authorization.
  • Data sharing: Be aware that data sent to X via the pixel may be used by X for its own advertising purposes, including targeting across X's platform. Your privacy policy should disclose this data sharing relationship.
  • Enhanced matching: If using enhanced matching features that transmit hashed PII, ensure this is explicitly covered in your consent flow and privacy policy.
  • Data retention: X retains conversion data according to its own policies. Understand and disclose these retention periods.
  • International transfers: Data transmitted to X may be processed in the United States, which requires appropriate transfer mechanisms under GDPR.

Should You Block This Without Consent?

The X Pixel is an advertising tool that tracks user behavior, sets identification cookies, shares data with X's ad platform, and builds retargeting audiences. These are marketing activities that require explicit consent under privacy regulations. The pixel must not load until marketing consent is obtained. Yes.

Visit website

Consent Categories

Marketing
Analytics

Also Known As

x pixeltwitter pixelx conversion trackingtwitter ads pixelx retargeting pixelx advertising tracker

Industries

Computers Electronics and TechnologyTelecommunications

Tracked Domains (1)

x.comMarketing

Frequently Asked Questions

Does X Pixel require consent?

Yes. X Pixel tracks page views and conversion events, sets identification cookies, builds retargeting audiences, and shares behavioral data with X's advertising platform. Under GDPR, these activities require explicit marketing consent before the pixel fires.

What does X Pixel track on a website?

X Pixel records page views, conversion events (purchases, signups, add-to-cart), and transaction parameters. It sets first-party cookies to identify returning visitors and can send hashed email addresses for deterministic matching to X user profiles.

How does ConsentStack manage X Pixel?

ConsentStack classifies X Pixel as a marketing vendor and blocks it until marketing consent is granted. No cookies are set and no conversion events fire before consent is recorded. ConsentStack ensures the pixel remains fully suppressed for visitors who decline.

Related Vendors

Google Ads
Google Ads
Google Ads is Google's advertising platform for search, display, and remarketing campaigns. Conversion tracking scripts fire on advertiser landing pages to measure actions taken after ad clicks. The remarketing tag builds audience lists for retargeting users across Google's ad network.
Google
Google
Google is the dominant provider of web analytics, advertising, and infrastructure tools. Scripts like Google Analytics, Tag Manager, Ads, and reCAPTCHA collect behavioral data, manage tag firing, serve targeted ads, and detect bots. Sets persistent cookies to track users and correlate activity across sites.
Microsoft Dynamics 365
Microsoft Dynamics 365
Microsoft Dynamics 365 is a suite of CRM and ERP applications that integrates with websites through tracking scripts and embedded forms. Web tracking code captures visitor behavior, page views, and form submissions to build customer profiles and score leads. Sets cookies to identify returning visitors and attribute marketing touchpoints across sessions.
Microsoft
Microsoft
Runs Clarity (session recording and heatmaps), the Microsoft Advertising UET tag (conversion tracking), and Bing's remarketing pixel. Clarity injects a recording script that captures mouse movements, clicks, and rage clicks. The UET tag fires conversion events to tie ad clicks to on-site actions across Microsoft's ad network.
Microsoft Advertising UET Tag
Microsoft Advertising UET Tag
Microsoft Advertising UET Tag is the Universal Event Tracking pixel for Microsoft's ad platform, formerly Bing Ads. The JavaScript tag fires on advertiser websites to track page views, conversions, and custom events for campaign optimization. Sets cookies to identify visitors across sessions and attribute conversions to Microsoft Search and Audience Network ad clicks.
LinkedIn Ads
LinkedIn Ads
LinkedIn Ads is LinkedIn's advertising platform for B2B marketing and professional audience targeting. Conversion tracking scripts and pixels fire on advertiser websites to measure sign-ups, downloads, and purchases driven by LinkedIn ad campaigns. Sets cookies for audience matching, retargeting list building, and cross-device attribution reporting.

Manage consent for X Pixel

ConsentStack automatically detects and manages X Pixel trackers so your site stays compliant with global privacy regulations.