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.

Visit website

Products (1)

Consent Categories

Marketing

Also Known As

Twitter pixelTwitter Universal Website TagTwitter ads trackingX pixel consenttweet button tracking

Industries

Computers Electronics and TechnologyTelecommunications

Tracked Domains (3)

twitter.comMarketing
ads-twitter.comMarketing
twimg.comSocial Media

Frequently Asked Questions

Does the Twitter Universal Website Tag require consent?

Yes. The UWT sets persistent cross-site tracking cookies (muc, personalization_id, both up to 2 years), builds retargeting audiences, and fires conversion attribution. These activities require explicit marketing consent before the tag loads.

Do embedded Twitter buttons also set tracking cookies?

Yes. Even passive embedded Tweet buttons and Follow buttons load platform.twitter.com scripts on page render, setting tracking cookies as a side effect before any visitor interaction. These should be treated as marketing scripts and consent-gated accordingly.

How does ConsentStack handle Twitter tracking?

ConsentStack classifies Twitter as a marketing vendor and blocks both the UWT pixel and embedded social scripts until marketing consent is granted. For IAB TCF deployments, ConsentStack enforces consent for Twitter/X Vendor ID 21 before any script activates.

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 Twitter

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