Server-Side UID2 Integration Example with Google Secure Signals
This example demonstrates how a content publisher can use the UID2 services with Secure Signals to implement Server-Side Integration. [Source Code]
UID2 Integration Status
|
Ready for Targeted Advertising:
?
Indicates whether a valid UID2 token is present and can be used for personalized ad targeting.
|
no |
|
Advertising Token:
?
The encrypted UID2 token that is passed to ad systems without exposing raw user identity. It is automatically refreshed by the server when expired.
|
undefined |
|
Is Login Required?
?
Indicates whether a new UID2 token needs to be generated. Returns "yes" when no valid identity exists or the current identity has expired.
|
yes |
|
Has Opted Out?
?
Shows whether the user has exercised opt-out, in which case no advertising token may be generated or used.
|
no |
|
Identity State:
?
The complete identity object from the server. Contains the full UID2 identity data including refresh tokens and metadata.
|
null |
Google Secure Signals Status
Secure Signals automatically reads the server-generated token and shares it with Google Ad Manager.
|
Secure Signals Loaded?
?
Indicates whether Google Secure Signals has successfully loaded and stored the UID2 token. Returns "yes" when signals are available in localStorage.
|
no |
|
Secure Signals Value:
?
The encrypted UID2 signals stored by Google in localStorage under the key '_GESPSK-uidapi.com'. These signals are shared with Google Ad Manager.
|
undefined |