Twitter

Twitter

Twitter's (X's) advertising pixel tracks site visitor behavior and fires conversion events for campaigns running on the platform. The Universal Website Tag logs page views, custom events (purchases, signups), and audience membership. The embedded Tweet button also loads tracking scripts even when not clicked.

Overview

Twitter (now X) provides the Universal Website Tag (UWT), an advertising pixel that tracks site visitor behavior and fires conversion events for ad campaigns running on the X/Twitter platform. The pixel is the legacy Twitter Ads implementation — it is functionally equivalent to the X Ads pixel but may appear under the Twitter branding in older deployments. Embedded Tweet buttons and Follow buttons also load Twitter's tracking scripts even when the visitor does not interact with them.

What This Script Does

Universal Website Tag (UWT)

The UWT script loads from static.ads-twitter.com. It:

  • Fires a base page view event on every page load, recording the visit in Twitter's advertising attribution system
  • Fires discrete conversion events (purchases, signups, add-to-cart, content views) when the advertiser configures specific event triggers
  • Sets the muc third-party cookie (up to 2 years) and personalization_id cookie to identify browsers cross-site and match visitors to Twitter/X user profiles
  • Attributes conversions to Twitter ad clicks (click-through attribution window: typically 7 days) or ad impressions (view-through attribution window: typically 1 day)
  • Builds website custom audiences for retargeting: lists of users who visited specific pages or completed specific events
  • Supports hashed email matching (Advanced Matching) to deterministically link website visitors to Twitter/X user accounts

Embedded Buttons and Widgets

Embedded Tweet buttons, Follow buttons, and Timeline widgets load scripts from platform.twitter.com. These scripts:

  • Load on page render even if the visitor never interacts with the button
  • Set Twitter tracking cookies in the visitor's browser as a side effect of loading
  • Create a cross-site tracking surface for Twitter even on sites that have not intentionally deployed the advertising pixel

Consent & Compliance

  • Category: Marketing
  • GDPR: Requires consent. The UWT sets persistent cross-site tracking cookies and builds behavioral advertising profiles. IAB TCF purposes: Purpose 1 (Store/access information on device), Purpose 3 (Create personalised ads profile), Purpose 4 (Select personalised ads), Purpose 7 (Measure ad performance). Twitter/X is registered as IAB TCF Vendor ID 21.
  • Embedded widgets: Even passive embedded tweet buttons trigger cookie setting and should be consent-gated. Consider using click-to-activate wrappers for social embeds.
  • Data transfers: X Corp processes data in the US. EU-US Data Privacy Framework applies. The Irish DPC has investigated Twitter/X under GDPR; a 2022 decision resulted in a €450,000 fine for breach notification failures.
  • Cookies set: muc (3rd party, 2 years), personalization_id (3rd party, 2 years), first-party attribution cookies on the advertiser domain

Should You Block This Without Consent?

Yes — with marketing consent only. Both the UWT pixel and embedded social widgets require marketing consent before loading. Do not fire the UWT for visitors who decline advertising cookies. For IAB TCF deployments, gate activation on valid consent signals for Twitter/X (Vendor ID 21). Note that embedded Tweet buttons will also set tracking cookies — wrap them with a consent-aware activation layer if using social embeds.

Is Twitter GDPR compliant?

Twitter typically loads marketing and social media trackers, which are not strictly necessary for your site to work. Under the GDPR and the ePrivacy Directive, non-essential cookies and trackers must stay blocked until a visitor gives clear opt-in consent. So Twitter can be fully GDPR compliant, but only if your site holds its scripts until consent is granted and lets visitors decline just as easily. Compliance depends on how your site loads Twitter, not on Twitter itself.

Visit website

Products (3)

Consent Categories

Also Known As

Twitter pixelTwitter Universal Website TagTwitter ads trackingX pixel consenttweet button tracking

Industries

Computers Electronics and TechnologyTelecommunications

Tracked Domains (3)

Twitter's trackers are common, seen on about 5% of the sites ConsentStack has scanned. Scan your own site to see which of these are firing before consent.

twitter.comMarketing

twitter.com is a marketing domain operated by Twitter, used to serve ads, build audiences, and measure ad conversions. Seen on about 5% of scanned sites.

ads-twitter.comMarketing

ads-twitter.com is a marketing domain operated by Twitter, used to serve ads, build audiences, and measure ad conversions. Seen on about 3% of scanned sites.

twimg.comSocial Media

twimg.com is a social media domain operated by Twitter, used to power social embeds, share buttons, and audience matching. Seen on under 1% of scanned sites.

Frequently Asked Questions

Related Vendors

edX
edX
edX is an online learning platform offering courses from universities and institutions worldwide, now operated by 2U. Its scripts serve course content, video players, and interactive assessments. edX sets authentication cookies, tracks learner progress, and collects analytics on content engagement.
X Ads
X Ads
X Ads (formerly Twitter Ads) pixel records conversions and builds audiences for advertising campaigns on X. Scripts deploy on advertiser sites to track user actions attributed to X ad clicks or views. Collected events support campaign measurement, bid optimization, and website custom audience creation.
eyeota
eyeota
Audience intelligence and cross-device targeting platform. eyeota collects behavioral and demographic audience segments from publisher sites and makes them available for programmatic targeting. Scripts fire on publisher pages to classify visitors into interest-based categories.
TransUnion
TransUnion
Consumer data and identity resolution company. TransUnion's digital marketing services scripts collect online behavioral signals and link them to offline consumer data for audience targeting and attribution across marketing channels.
DeepIntent
DeepIntent
Healthcare programmatic advertising platform using clinical and claims data to target healthcare professionals and patients. DeepIntent scripts fire impression pixels on health content sites and track behavioral engagement for pharmaceutical advertising campaigns.
Teads
Teads
Native video advertising platform that serves in-stream and outstream video ads on publisher sites. The Teads script loads a video player that injects ads into content pages and measures viewability, play rates, and completion metrics. Sets cookies for frequency capping and audience targeting.

Manage consent for Twitter

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