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.
| Form | Who handles it | Key property |
|---|---|---|
| Hashed email or phone | Publisher or advertiser | Pseudonymous, but easy to match |
| Raw UID2 | Authorized platforms and data partners | Stable across the ecosystem |
| UID2 token | Publishers and bid requests | Encrypted and short-lived |
| Refresh token | Publisher integration | Renews tokens and checks opt-out |
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.
| Role | Contribution | Main obligation |
|---|---|---|
| Publisher | Logged-in audiences and tokens | Show notice and pass valid tokens |
| Advertiser | Customer lists for targeting | Use data only with a legal basis |
| Demand-side platform | Decryption and bidding | Respect opt-out status |
| Data provider | Audience segments keyed to UID2 | Rotate data when salts change |
| Operator | Identifier generation and keys | Protect salts and encryption keys |
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.
| Approach | Identifier basis | Privacy character |
|---|---|---|
| UID2 | Salted hash of email or phone | Person-level, pseudonymous, opt-out |
| Hashed email without framework | Plain SHA-256 hash | Easily matched, no shared opt-out |
| Third-party cookie | Random browser identifier | Device-level, widely blocked |
| Contextual advertising | Page content, no identifier | No individual profile needed |
| Privacy-preserving attribution | Aggregated browser reports | No cross-site identifier shared |
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.
Privacy and legal considerations
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.
| Situation | Recommended choice | Reason |
|---|---|---|
| High share of logged-in readers | Integrate UID2 with clear notice | Large addressable audience |
| Mostly anonymous traffic | Prioritize contextual targeting | Few users produce tokens |
| European audience | Use EUID with consent | Notice alone is insufficient |
| Sensitive content categories | Avoid identity-based targeting | Inferences may reveal special data |
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.