Advertising vendor · X Corp.
X Pixel Cookies: List With Purpose and Retention
Last verified 2026-10-17 · Updated 2026-10-17
On this page
Cookies the X Pixel Sets on Your Site
The X Pixel triggers advertising cookies on X domains, led by personalization_id on .twitter.com and muc_ads on t.co, and writes 3 first-party cookies on your domain, _twpid, _twclid, and _twsid.
| Name | Type | Category | Party | Retention | What it does |
|---|---|---|---|---|---|
_twclid | Cookie | Advertising | First-party | 13 months (390 days) | The _twclid cookie keeps the twclid click ID of an X ad on your domain, so the X Pixel credits a later conversion to the ad click. |
_twpid | Cookie | Advertising | First-party | Not documented | The X Pixel wrote the _twpid cookie on a test site next to the _twclid cookie. |
_twsid | Cookie | Advertising | First-party | Not documented | The X Pixel wrote the _twsid cookie on a test site next to the _twclid cookie. |
guest_id | Cookie | Advertising | Third-party | Not documented | The guest_id cookie arrived on .twitter.com together with the personalization_id cookie when the X Pixel ran on a test site. |
guest_id_ads | Cookie | Advertising | Third-party | Not documented | The guest_id_ads cookie arrived on .twitter.com together with the personalization_id cookie when the X Pixel ran on a test site. |
guest_id_marketing | Cookie | Advertising | Third-party | Not documented | The guest_id_marketing cookie arrived on .twitter.com together with the personalization_id cookie when the X Pixel ran on a test site. |
muc_ads | Cookie | Advertising | Third-party | 2 years (730 days) | The muc_ads cookie on t.co is an X advertising cookie that the X Pixel endpoint on t.co sets for 2 years. |
personalization_id | Cookie | Advertising | Third-party | 2 years (730 days) | The personalization_id cookie is an X advertising cookie that tracks activity on and off X for 2 years and needs consent under the ePrivacy Directive. |
Scripts, Pixels, and Endpoints the X Pixel Loads
The X Pixel loads 2 known scripts, pixels, and data endpoints. Each row gives the host to look for in the Network tab of Chrome DevTools or in a cookie scanner report.
| Type | Resource | Host | What it does |
|---|---|---|---|
| Script | X Pixel base code (uwt.js) | static.ads-twitter.com | The X Pixel library loads from static.ads-twitter.com and writes the _twclid cookie on your domain. |
| Data endpoint | X Pixel event endpoint (adsct) | analytics.twitter.comt.co | The event endpoint receives every visit that the X Pixel reports, and its responses set the personalization_id and muc_ads cookies. |
Does the X Pixel Need Consent?
Yes, the X Pixel cookies need consent in the EU and the UK, and need no prior opt-in in California. The table gives the rule for each law, taken from the page of the personalization_id cookie.
| Law | Consent before the cookies are set | Opt-out right | Source |
|---|---|---|---|
| EU ePrivacy Directive + GDPR | Required | Withdraw at any time | Article 5(3), ePrivacy Directive |
| UK PECR | Required | Withdraw at any time | Regulation 6 and Schedule A1, PECR |
| California CCPA | No general opt-in | Opt out of sale and sharing | Cal. Civ. Code 1798.120 |
The consent table describes what each law requires and is not legal advice. Whether a law applies to your site depends on where your visitors are, where your business is based, and how you set up the X Pixel, such as the first-party cookie setting of the X Pixel.
Read the reason for each answer in the consent rules for the personalization_id cookie.
How to Add the X Pixel to a Consent Banner
Add the X Pixel to a consent banner by holding back the X Pixel base code until the visitor accepts advertising cookies. Both TermsFeed products block the X Pixel in the Advertising category.
Add the X Pixel to TermsFeed Free Cookie Consent
TermsFeed Free Cookie Consent runs a tagged script only after the visitor accepts its category. Change type="text/javascript" to type="text/plain" and add data-cookie-consent="targeting".
<script type="text/plain" data-cookie-consent="targeting">
!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);
},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='https://static.ads-twitter.com/uwt.js',
a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');
twq('config','YOUR_PIXEL_ID');
</script>
Cookie Consent is free and needs no account. Build your free consent banner with TermsFeed Free Cookie Consent.
Add the X Pixel to TermsFeed Privacy Consent
Add the X Pixel from its template in TermsFeed Privacy Consent and type your Pixel ID, which X Ads shows in the twq('config', ...) line of the pixel in Events Manager. The X Pixel loads only after the visitor accepts the X vendor, and nothing reaches X before that.
The X Pixel template asks for the Pixel ID and fills every other field of the vendor. Pick the "X Pixel" card under Advertising, enter the Pixel ID, and click "Add X Pixel". Find the Pixel ID in X Ads under Tools › Events manager › your pixel; the ID is in twq('config', ...). The illustration shows the template form in the TermsFeed app.
Privacy Consent detects the location of each visitor and records every answer in a consent log. Set up the X Pixel from its template with TermsFeed Privacy Consent.
Follow every step, the vendor settings, and the check in Chrome DevTools in how to block the personalization_id cookie.
Who Runs the X Pixel
X Corp. runs X from the United States. X Internet Unlimited Company in Dublin provides X to users in the European Union, the European Free Trade Association (EFTA), and the UK. X and the advertiser act as independent controllers under the X controller-to-controller data protection addendum.
Read how X Corp. handles the data in the X Pixel privacy policy, and sign the X Controller-to-Controller Data Protection Addendum before you collect data from visitors in the EU or the UK. Both documents appear in the sources at the end of this page.
X Pixel Cookie FAQs
Does the X Pixel need consent?
Yes, the X Pixel cookies need consent in the EU and the UK, and need no prior opt-in in California. Firstly, the ePrivacy Directive requires consent before a site sets the advertising cookies of the X Pixel. Secondly, the UK PECR requires consent before a site sets the advertising cookies of the X Pixel. Thirdly, the CCPA sets no general opt-in requirement for the advertising cookies of the X Pixel, and the table gives the opt-out right of visitors. The consent section of this page gives the table for each law.
How long do the X Pixel cookies last?
The cookies of the X Pixel with a documented lifetime last from 13 months (390 days) to 2 years (730 days). The _twclid cookie lasts the shortest time, and the muc_ads cookie lasts longest. 5 cookies have no documented lifetime. Check their expiry in Chrome DevTools on your own site. The retention column of the cookie list gives the lifetime of each cookie.
How do I block the X Pixel cookies?
Block the the X Pixel cookies by holding back the X Pixel base code until the visitor accepts advertising cookies. Tag the X Pixel base code with data-cookie-consent="targeting" in TermsFeed Free Cookie Consent, or add the X Pixel as a vendor in TermsFeed Privacy Consent. The page of the personalization_id cookie gives the full steps and the settings of the X Pixel.
Sources for the X Pixel Cookies
The facts on this page come from the documentation X publishes, checked on 2026-10-17. The list gives every source, so you check each fact yourself.
- TermsFeed website auditor test of the X Pixel (internal)
- X Help Center, X cookies
- X Help Center, About conversion tracking
- X Help Center, Conversion tracking for websites
- X Developer Platform, Web conversions
- TermsFeed check of the X Pixel and its endpoints in Chrome and curl, 17 October 2026 (internal)
- X Pixel privacy policy
- X Controller-to-Controller Data Protection Addendum