Deferred ${IDENTITY_NAME} Integration with Prebid.js
+
+ This example demonstrates how to integrate ${IDENTITY_NAME} with Prebid.js using deferred configuration.
+ Unlike the standard integration where ${IDENTITY_NAME} is configured on page load, this pattern uses
+ mergeConfig() and refreshUserIds() to add ${IDENTITY_NAME} after the page has loaded.
+ [Source Code]
+
📄 Initial Prebid Config (on page load)
+Notice: No ${IDENTITY_NAME} userIds configured - this is intentional for deferred loading.
+ +What happens when you click:
+-
+
pbjs.mergeConfig(uidConfig)- Merges ${IDENTITY_NAME} user ID module configuration into the existing Prebid config without overwriting other settings. This allows adding ${IDENTITY_NAME} after the page has already loaded.
+ pbjs.refreshUserIds()- Triggers Prebid to re-fetch all configured user IDs, including the newly added ${IDENTITY_NAME} module, which initiates token generation using the provided email and CSTG credentials.
+
${IDENTITY_NAME} Integration Status
+ +|
+
+ Ready for Targeted Advertising:
+
+
+ ?
+
+
+ Indicates whether a valid ${IDENTITY_NAME} token is present and can be used for personalized ad targeting.
+
+ |
+ + |
|
+
+ Advertising Token:
+
+
+ ?
+
+
+ The encrypted ${IDENTITY_NAME} token that is passed to ad systems without exposing raw user identity.
+
+ |
+ + |
|
+
+ Is Login Required?
+
+
+ ?
+
+
+ Indicates whether a new ${IDENTITY_NAME} 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 uses mergeConfig() to add ${IDENTITY_NAME} after the page has loaded, then refreshUserIds() triggers token generation.
+ +|
+
+ Prebid Token Storage:
+
+
+ ?
+
+
+ Shows the ${IDENTITY_NAME} token stored by Prebid in localStorage under the key '${UID_STORAGE_KEY}'. Prebid manages this storage for header bidding.
+
+ |
+ + |