UID2

Also known as: Unified ID 2.0

On this page 7

UID2, short for Unified ID 2.0, is an open-source, deterministic advertising identifier generated from a user’s hashed and salted email address or phone number, designed to let publishers, advertisers and ad platforms recognize the same person across sites and apps without third-party cookies. In privacy in marketing, UID2 is the best-known example of an authenticated identity framework: it depends on users logging in and on a notice that their identifier will be used for advertising.

Supporters present UID2 as a more transparent replacement for cookies, with a central opt-out. Critics point out that it still enables cross-site tracking of individuals, only with a sturdier key, so its privacy value depends heavily on consent, governance and how partners use it.

How UID2 generates and protects the identifier

The process starts with a directly identifying input, an email address or phone number that the user entered when signing in. The input is normalized, for example lowercased and trimmed, and hashed with SHA-256. An operator service then combines this hash with a secret salt and hashes it again, producing the raw UID2, a stable value that is the same for that person everywhere in the ecosystem.

The raw UID2 is not passed openly through advertising auctions. Instead, the publisher receives an encrypted UID2 token that changes frequently and carries an expiry time, together with a refresh token. Only authorized participants, such as demand-side platforms, can decrypt the token back to the raw UID2 for matching and targeting.

FormWho handles itKey property
Hashed email or phonePublisher or advertiserPseudonymous, but easy to match
Raw UID2Authorized platforms and data partnersStable across the ecosystem
UID2 tokenPublishers and bid requestsEncrypted and short-lived
Refresh tokenPublisher integrationRenews tokens and checks opt-out
Forms of the identifier in the UID2 flow

Participants and governance

UID2 is an ecosystem with defined roles rather than a single product. Operators run the services that generate identifiers and keys, publishers collect logins, advertisers upload first-party customer data, and demand-side platforms use the identifiers to buy media. Each participant must sign terms that require honoring opt-outs and limiting use to advertising purposes.

RoleContributionMain obligation
PublisherLogged-in audiences and tokensShow notice and pass valid tokens
AdvertiserCustomer lists for targetingUse data only with a legal basis
Demand-side platformDecryption and biddingRespect opt-out status
Data providerAudience segments keyed to UID2Rotate data when salts change
OperatorIdentifier generation and keysProtect salts and encryption keys
Main roles in a UID2 deployment

Salts are rotated in buckets on a long schedule, so a raw UID2 changes occasionally, which forces partners to refresh stored mappings. This limits, but does not prevent, the long-term accumulation of profiles.

UID2 compared with other identity approaches

UID2 sits between cookie-based tracking and privacy-preserving advertising APIs. It restores person-level identity for logged-in users, whereas browser-based proposals such as the Google Privacy Sandbox aim to remove individual identifiers from the advertiser’s view entirely.

ApproachIdentifier basisPrivacy character
UID2Salted hash of email or phonePerson-level, pseudonymous, opt-out
Hashed email without frameworkPlain SHA-256 hashEasily matched, no shared opt-out
Third-party cookieRandom browser identifierDevice-level, widely blocked
Contextual advertisingPage content, no identifierNo individual profile needed
Privacy-preserving attributionAggregated browser reportsNo cross-site identifier shared
How UID2 compares with neighboring approaches

For European audiences, a sister framework called EUID follows the same design but is built around consent signals such as those from the IAB TCF, because notice alone does not satisfy European rules on tracking.

Hashing an email address is pseudonymization, not anonymization. Anyone who knows the email and the method can compute the same hash, and the raw UID2 remains linked to one person, so it is personal data under the GDPR and comparable laws. Its stability across publishers is exactly what makes it useful for advertising and sensitive from a privacy perspective.

  • Notice quality decides much of the legitimacy: users must understand that signing in links their activity across sites for advertising.
  • Opt-out propagation depends on every partner checking status regularly; stale copies of raw UID2 values undermine it.
  • Legal basis varies by region: notice and choice may suffice in some United States contexts, while European processing generally needs consent.
  • Data minimization suffers when partners enrich UID2 profiles with offline purchase or location data.

Practical choices when adopting UID2

Organizations usually adopt UID2 to keep addressable advertising on browsers that block third-party cookies. The decisive questions are how many users actually log in, whether the legal basis is solid in every market, and whether contextual or aggregated alternatives would meet the same goal with less personal data.

SituationRecommended choiceReason
High share of logged-in readersIntegrate UID2 with clear noticeLarge addressable audience
Mostly anonymous trafficPrioritize contextual targetingFew users produce tokens
European audienceUse EUID with consentNotice alone is insufficient
Sensitive content categoriesAvoid identity-based targetingInferences may reveal special data
Decision guide for adopting UID2

Integration itself is usually modest in effort. Publishers can generate tokens on the server after login or through a client-side integration that hashes the email in the browser, and most header bidding setups can pass tokens through an existing identity module. The harder work is organizational: documenting the purpose and retention of every copy of a raw UID2, mapping which partners receive it, and testing opt-out handling end to end. Measurement teams should also expect match rates well below the logged-in share, because tokens expire, users sign in with different addresses and some partners cannot decrypt them.

In plain words

When you sign in to a news site with your email, the site can turn that email into a coded number. Other sites where you log in with the same email produce the same number. Advertisers use it to recognize you across those sites without old-style cookies.

The code hides your actual email. Still, the number stands for you personally, so it is a privacy decision. You should be told about it and able to opt out.

A real-world example

A regional news publisher in the United States finds that about a third of its visitors use browsers that block third-party cookies, and that ads shown to them earn much lower prices. About 20 percent of readers are logged in to read premium articles. The publisher adds a clear advertising notice to its login screen, integrates UID2 and passes encrypted tokens in its ad requests for logged-in users only.

Advertisers can now reach those readers with campaigns matched to their own customer lists, and the publisher sees higher prices for authenticated impressions. Its privacy team also schedules regular checks that tokens are refreshed, so readers who used the central opt-out stop receiving targeted ads within the refresh cycle. Anonymous readers continue to receive contextual advertising only.