What is the guest_id_marketing cookie?
guest_id_marketing is an HTTP cookie placed by X (formerly Twitter) when a page loads a widget, share button, embedded video player, or tracking pixel belonging to the X platform. It commonly appears on websites that display embedded Twitter/X posts or use share buttons linking to that network.
It is set for "guest" visitors — people who do not have an X account or are not logged in at that moment — yet whose interactions with X-related content are still tracked for advertising purposes.
What data it stores
The cookie stores a unique identifier associated with the anonymous (guest) visitor, generated by X to recognize the same browser on future visits. The value is an opaque alphanumeric string generated and interpreted only by X's systems.
Data collected through this identifier is sent to X's servers (X Corp, formerly Twitter, Inc.) and used to link interactions on third-party sites to the visitor's advertising profile, even without an X account or an active login.
What it is used for
The main purpose is advertising: X uses this identifier to measure the effectiveness of campaigns promoted on its platform, attribute conversions to previously shown ads, and build audience segments for remarketing, including for visitors without an X account.
For the website operator, the cookie serves no direct function — it is a side effect of embedding X widgets or pixels, though it indirectly enables measurement of traffic generated by X campaigns toward the site.
Does it require consent?
guest_id_marketing is classified as a marketing cookie (advertising/tracking) and is not strictly necessary for the site to function. Under the GDPR (Regulation 2016/679) and the ePrivacy Directive, prior consent from the visitor is required before it can be set.
- The cookie must be clearly listed in the site's cookie policy, including provider, purpose, and duration.
- X widgets, embeds, or share buttons should load only after consent for the marketing category has been granted.
- Site owners must make withdrawing consent as easy as giving it.
How to block or delete guest_id_marketing
A visitor can delete or block this cookie through browser settings (per-site cookie management or clearing browsing data), or by using a tracker blocker or privacy extension. Blocking it does not affect the core functionality of the visited site, only X-related components.
For site owners, the correct approach is to automatically block X scripts and widgets until consent is given, using a CMP such as CookieFix, which prevents these resources from loading before the visitor chooses the marketing category.
Frequently asked questions
It's an advertising tracking cookie set by X (Twitter) to identify anonymous, non-logged-in visitors for marketing purposes and campaign measurement.
It's a marketing cookie, not strictly necessary, so setting it on a site requires the visitor's prior consent under GDPR and ePrivacy.
It typically lasts 2 years from when it's set, based on X's known practices, though the exact value can vary.
You can use a consent management platform (CMP) that automatically blocks X widgets and scripts until the visitor accepts the marketing category.