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.
Consent Categories
Also Known As
Industries
Tracked Domains (1)
x.comMarketingFrequently 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
Manage consent for X Pixel
ConsentStack automatically detects and manages X Pixel trackers so your site stays compliant with global privacy regulations.