Client-Side UID2 Integration with Prebid.js
This example demonstrates how a content publisher can integrate UID2 with Prebid.js for header bidding, using client-side token generation. For documentation, see the UID2 Client-Side Integration Guide for Prebid.js. [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.
|
|
|
Advertising Token:
?
The encrypted UID2 token that is passed to ad systems without exposing raw user identity.
|
|
|
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.
|
|
|
Has Opted Out?
?
Shows whether the user has exercised opt-out, in which case no advertising token may be generated or used.
|
Prebid Integration Status
Prebid.js is configured to handle the entire token lifecycle—generation, storage, and automatic refresh.
|
Prebid Token Storage:
?
Shows the UID2 token stored by Prebid in localStorage under the key '__uid2_advertising_token'. Prebid manages this storage for header bidding.
|