From a48979976d8d75780727fac9d035bb2468d3708d Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Tue, 23 Dec 2025 10:57:29 -0700 Subject: [PATCH 1/4] make changes to integrations page + add sections for prebid deferred and combined site --- docs/guides/integration-google-ss.md | 5 + docs/guides/integration-prebid-client-side.md | 46 ++++++++- docs/ref-info/integration-sample-sites.md | 94 ++++++++++++------- 3 files changed, 111 insertions(+), 34 deletions(-) diff --git a/docs/guides/integration-google-ss.md b/docs/guides/integration-google-ss.md index 7f01dc33d..08ed64299 100644 --- a/docs/guides/integration-google-ss.md +++ b/docs/guides/integration-google-ss.md @@ -82,6 +82,11 @@ If you want to use Secure Signals with Prebid.js, you must complete both these a For details, see [ESP Configurations](https://docs.prebid.org/dev-docs/modules/userId.html#esp-configurations) in the Prebid documentation. +A sample implementation for Prebid.js with Secure Signals is available at the following links: + +- Running site: [UID2 Prebid.js Secure Signals Integration Example](https://prebid-secure-signals.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-secure-signals](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) + ## Integrating with Single Sign-On (SSO) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index 8b0d43768..d477406f8 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -31,8 +31,8 @@ If you need to use an earlier version of Prebid.js, use the implementation solut An example of the UID2 Prebid.js client-side integration is available at the following links: -- Code: [Example Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2docs/tree/main/static/examples/cstg-prebid-example) -- Running site: [UID2 Prebid.js Client-Side Integration Example](https://unifiedid.com/examples/cstg-prebid-example/) +- Code: [Example Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) +- Running site: [UID2 Prebid.js Client-Side Integration Example](https://prebid-client.samples.uidapi.com/) ## Integrating with Single Sign-On (SSO) @@ -205,6 +205,48 @@ pbjs.setConfig({ }); ``` +## Optional: Deferred UID2 Configuration with mergeConfig + +In some scenarios, you may want to add UID2 to your Prebid.js configuration *after* the page has already loaded—for example, when the user logs in after page load, or when consent is granted asynchronously. + +Instead of using `setConfig()` (which overwrites existing configuration), use `mergeConfig()` to add UID2 without affecting other settings, and then call `refreshUserIds()` to trigger token generation: + +```js +// Step 1: User logs in or provides consent after page load +const uidConfig = { + userSync: { + userIds: [{ + name: 'uid2', + params: { + uid2ApiBase: 'https://operator-integ.uidapi.com', + email: 'user@example.com', + subscriptionId: subscriptionId, + serverPublicKey: publicKey + } + }] + } +}; + +// Step 2: Merge UID2 config into existing Prebid config (additive, won't overwrite) +pbjs.mergeConfig(uidConfig); + +// Step 3: Trigger user ID refresh to generate the token +await pbjs.refreshUserIds({ submoduleNames: ['uid2'] }); +``` + +### Key Points + +- **`mergeConfig()` is additive**: It adds UID2 to the existing `userSync.userIds` array without overwriting other user ID modules. +- **`refreshUserIds()`**: Triggers Prebid to generate/refresh user IDs. Use `{ submoduleNames: ['uid2'] }` to refresh only the UID2 module. +- **Clearing UID2**: Prebid does not provide a built-in way to remove a single user ID module after it's been added. To clear UID2 on logout, remove the token from localStorage and reload the page. + +### Deferred Integration Example + +An example of the deferred UID2 Prebid.js integration using `mergeConfig()` is available at the following links: + +- Code: [Deferred Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) +- Running site: [UID2 Prebid.js Deferred Integration Example](https://prebid-deferred.samples.uidapi.com/) + ## Optional: Prebid.js Integration with Google Secure Signals if you're using Prebid.js, and you're planning to pass UID2 tokens to Google using Google Secure Signals, there are a couple of additional configuration steps: diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index 72a7cb322..a27d32bd9 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -10,6 +10,8 @@ import Link from '@docusaurus/Link'; This page lists all official UID2 sample implementations highlighting common integration use cases, along with links to live demo sites, source code, and related documentation. Use this page to quickly identify which sample matches your needs and explore working examples. +All sample sites are available at [https://samples.uidapi.com/](https://samples.uidapi.com/). + ## Web Integrations This section summarizes the sample integrations available for integrating UID2 directly into websites. For integration options by participant type, see [Publisher Web Integration Overview](https://unifiedid.com/docs/guides/integration-options-publisher-web) or [Advertiser/Data Provider Integration Overview](https://unifiedid.com/docs/guides/integration-advertiser-dataprovider-overview). @@ -18,38 +20,70 @@ This section summarizes the sample integrations available for integrating UID2 d This sample is for publishers who prefer a fully client-side integration using the [SDK for JavaScript Reference Guide](https://unifiedid.com/docs/sdks/sdk-ref-javascript) to generate and manage tokens directly in the browser. This approach is ideal for fast prototyping with minimal back-end requirements. -- Site: [UID2 Publisher Client-Side Integration Example using UID2 JavaScript SDK](https://cstg-integ.uidapi.com/) -- Code: [uid2-web-integrations/examples/cstg](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/cstg) +- Site: [UID2 Publisher Client-Side Integration Example](https://js-client-side.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/javascript-sdk/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/javascript-sdk/client-side) - Doc: [Client-Side Integration Guide for JavaScript](https://unifiedid.com/docs/guides/integration-javascript-client-side) ### Client-Server Integration Using UID2 SDK for JavaScript This sample is for publishers who want more control over UID2 token creation (handled on your servers), while using the SDK for JavaScript on the client side to manage and refresh tokens in the browser. -- Site: [UID2 SDK Integration Example](https://example-jssdk-integ.uidapi.com/) -- Code: [uid2-web-integrations/examples/js-sdk](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/js-sdk) +- Site: [UID2 Client-Server Integration Example](https://js-client-server.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/javascript-sdk/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/javascript-sdk/client-server) - Doc: [Client-Server Integration Guide for JavaScript](https://unifiedid.com/docs/guides/integration-javascript-client-server) +### React Client-Side Integration Using UID2 SDK for JavaScript + +This sample is for publishers with React apps who want to integrate UID2 directly into their component-based architecture using the SDK for JavaScript. + +- Site: [UID2 React Client-Side Integration Example](https://js-react.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/javascript-sdk/react-client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/javascript-sdk/react-client-side) +- Doc: [Client-Side Integration Guide for JavaScript](https://unifiedid.com/docs/guides/integration-javascript-client-side) + ### UID2 Server-Only (Server-Side) This sample is for publishers who want all UID2 operations to occur on the server side, offering maximum control, security, and flexibility without relying on a client-side SDK. -- Site: [Server-Only UID2 Integration Example](https://example-srvonly-integ.uidapi.com/login) -- Code: [uid2-examples/publisher/server_only](https://github.com/IABTechLab/uid2-examples/tree/main/publisher/server_only) +- Site: [Server-Only UID2 Integration Example](https://server-side.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/server-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/server-side) - Doc: [Publisher Integration Guide, Server-Side](https://unifiedid.com/docs/guides/integration-publisher-server-side) ## Prebid.js Integrations -This section includes a sample page for generating UID2 tokens to be passed by Prebid.js in the RTB bidstream. For details, see [UID2 Integration Overview for Prebid](https://unifiedid.com/docs/guides/integration-prebid). +This section includes sample pages for generating UID2 tokens to be passed by Prebid.js in the RTB bidstream. For details, see [UID2 Integration Overview for Prebid](https://unifiedid.com/docs/guides/integration-prebid). ### Client-Side Integration with Prebid.js This sample is for publishers who want to generate UID2 tokens on the client side and pass them into header bidding auctions using Prebid.js. -- Site: [UID2 Prebid.js Client-Side Integration Example](https://unifiedid.com/examples/cstg-prebid-example/) -- Code: [uid2docs/static/examples/cstg-prebid-example](https://github.com/IABTechLab/uid2docs/tree/main/static/examples/cstg-prebid-example) +- Site: [UID2 Prebid.js Client-Side Integration Example](https://prebid-client.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-integrations/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) - Doc: [UID2 Client-Side Integration Guide for Prebid.js](https://unifiedid.com/docs/guides/integration-prebid-client-side) +### Client-Server Integration with Prebid.js + +This sample is for publishers who want to generate UID2 tokens on the server side and pass them to Prebid.js for header bidding. + +- Site: [UID2 Prebid.js Client-Server Integration Example](https://prebid-client-server.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-integrations/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-server) +- Doc: [UID2 Client-Server Integration Guide for Prebid.js](https://unifiedid.com/docs/guides/integration-prebid-client-server) + +### Deferred Configuration with Prebid.js + +This sample demonstrates how to add UID2 to Prebid.js *after* the page has loaded, using `mergeConfig()` and `refreshUserIds()`. This pattern is useful for async login flows, delayed consent, or Single Page Applications (SPAs). + +- Site: [UID2 Prebid.js Deferred Integration Example](https://prebid-deferred.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-integrations/client-side-deferred](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) +- Doc: [UID2 Client-Side Integration Guide for Prebid.js](https://unifiedid.com/docs/guides/integration-prebid-client-side) + +### Prebid.js with Secure Signals + +This sample demonstrates how to use UID2 with Prebid.js and Google Secure Signals together. + +- Site: [UID2 Prebid.js Secure Signals Integration Example](https://prebid-secure-signals.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-secure-signals](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) +- Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) + ## Google Secure Signals Integrations This section includes sample pages for passing UID2 identity data to Google's advertising systems through their Secure Signals feature. For details, see [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss). @@ -58,48 +92,44 @@ This section includes sample pages for passing UID2 identity data to Google's ad This sample is for publishers who want a purely client-side integration with GAM Secure Signals. -- Site: [UID2 Publisher Client-Side Integration Example using UID2 JavaScript SDK, Secure Signals](https://secure-signals-client-side-integ.uidapi.com/) -- Code: [uid2-web-integrations/examples/google-secure-signals-integration/client_side](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/client_side) +- Site: [UID2 Client-Side Integration Example with Google Secure Signals](https://secure-signals-client-side.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/google-secure-signals/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/client-side) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) -### React Client-Side Secure Signals +### Client-Server Secure Signals -This sample is for publishers with React apps who want to integrate UID2 + Secure Signals directly into their component-based architecture. +This sample is for publishers who want a hybrid approach with token generation on the server and client-side logic for secure signals. -- Site: [UID2 React Client-Side Integration Example with Google Secure Signals](https://secure-signals-react-integ.uidapi.com/) -- Code: [uid2-web-integrations/examples/google-secure-signals-integration/react_client_side](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/react_client_side) +- Site: [UID2 Client-Server Integration Example with Google Secure Signals](https://secure-signals-client-server.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/google-secure-signals/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/client-server) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) ### Server-Side Secure Signals This sample is for publishers who want all Secure Signals and UID2 logic server-side for better control and security. -- Site: [Server-Side UID2 Integration Example with Google Secure Signals](https://secure-signals-server-side-integ.uidapi.com/login) -- Code: [uid2-web-integrations/examples/google-secure-signals-integration/server_side](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/server_side) +- Site: [UID2 Server-Side Integration Example with Google Secure Signals](https://secure-signals-server-side.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/google-secure-signals/server-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/server-side) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) -- Additional site domains: - - [https://secure-signals-srvonly-integ.uidapi.com](https://secure-signals-srvonly-integ.uidapi.com) - - [https://esp-srvonly-integ.uidapi.com](https://esp-srvonly-integ.uidapi.com) -### Client-Server Secure Signals +### React Client-Side Secure Signals -This sample is for publishers who want a hybrid approach with token generation on the server and client-side logic for secure signals. +This sample is for publishers with React apps who want to integrate UID2 + Secure Signals directly into their component-based architecture. -- Site: [Example for Client-Server UID2 SDK Integration with Google Secure Signals](https://secure-signals-client-server-integ.uidapi.com/) -- Code: [uid2-web-integrations/examples/google-secure-signals-integration/with_sdk_v3](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/with_sdk_v3) +- Site: [UID2 React Client-Side Integration Example with Google Secure Signals](https://secure-signals-react.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/google-secure-signals/react-client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/react-client-side) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) -- Additional site domains: - - [https://secure-signals-jssdk-integ.uidapi.com](https://secure-signals-jssdk-integ.uidapi.com) - - [https://esp-jssdk-integ.uidapi.com](https://esp-jssdk-integ.uidapi.com) -## UID2 Hashing Tool +## Tools + +### UID2 Hashing Tool -This tool is for developers or clients validating data preparation, such as hashing and normalization of emails before token requests. The tool is available at the following links: +This tool is for developers or clients validating data preparation, such as hashing and normalization of emails or phone numbers before token requests. -- Site: [UID2 Hashing Tool](https://unifiedid.com/examples/hashing-tool/) -- Code: [uid2docs/static/examples/hashing-tool](https://github.com/IABTechLab/uid2docs/tree/main/static/examples/hashing-tool) +- Site: [UID2 Hashing Tool](https://hashing-tool.samples.uidapi.com/) +- Code: [uid2-examples/tools/hashing-tool](https://github.com/IABTechLab/uid2-examples/tree/main/tools/hashing-tool) - Doc: [Normalization and Encoding](https://unifiedid.com/docs/getting-started/gs-normalization-encoding) :::note -The sample sites in this file highlight some common integrations, but do not represent all available UID2 integration options. For a summary of all the integration options available, see [UID2 Integration Guides: Summary](https://unifiedid.com/docs/guides/summary-guides). +The sample sites on this page highlight some common integrations, but do not represent all available UID2 integration options. For a summary of all the integration options available, see [UID2 Integration Guides: Summary](https://unifiedid.com/docs/guides/summary-guides). ::: From c105d5d18a4523d62ec702269357f22b8da75289 Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Tue, 23 Dec 2025 11:23:28 -0700 Subject: [PATCH 2/4] ensure doc titles match webpage headers --- docs/guides/integration-prebid-client-side.md | 8 ++--- docs/ref-info/integration-sample-sites.md | 28 ++++++++-------- package-lock.json | 33 +------------------ 3 files changed, 19 insertions(+), 50 deletions(-) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index d477406f8..e0ad9b9ad 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -32,7 +32,7 @@ If you need to use an earlier version of Prebid.js, use the implementation solut An example of the UID2 Prebid.js client-side integration is available at the following links: - Code: [Example Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) -- Running site: [UID2 Prebid.js Client-Side Integration Example](https://prebid-client.samples.uidapi.com/) +- Running site: [Client-Side UID2 Integration with Prebid.js](https://prebid-client.samples.uidapi.com/) ## Integrating with Single Sign-On (SSO) @@ -205,7 +205,7 @@ pbjs.setConfig({ }); ``` -## Optional: Deferred UID2 Configuration with mergeConfig +## Optional: Deferred Client-Side UID2 Configuration with mergeConfig In some scenarios, you may want to add UID2 to your Prebid.js configuration *after* the page has already loaded—for example, when the user logs in after page load, or when consent is granted asynchronously. @@ -240,12 +240,12 @@ await pbjs.refreshUserIds({ submoduleNames: ['uid2'] }); - **`refreshUserIds()`**: Triggers Prebid to generate/refresh user IDs. Use `{ submoduleNames: ['uid2'] }` to refresh only the UID2 module. - **Clearing UID2**: Prebid does not provide a built-in way to remove a single user ID module after it's been added. To clear UID2 on logout, remove the token from localStorage and reload the page. -### Deferred Integration Example +### Deferred Client-Side Integration Example An example of the deferred UID2 Prebid.js integration using `mergeConfig()` is available at the following links: - Code: [Deferred Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) -- Running site: [UID2 Prebid.js Deferred Integration Example](https://prebid-deferred.samples.uidapi.com/) +- Running site: [Deferred UID2 Integration with Prebid.js](https://prebid-deferred.samples.uidapi.com/) ## Optional: Prebid.js Integration with Google Secure Signals diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index a27d32bd9..9081011f1 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -12,15 +12,15 @@ This page lists all official UID2 sample implementations highlighting common int All sample sites are available at [https://samples.uidapi.com/](https://samples.uidapi.com/). -## Web Integrations +## JavaScript SDK Integrations -This section summarizes the sample integrations available for integrating UID2 directly into websites. For integration options by participant type, see [Publisher Web Integration Overview](https://unifiedid.com/docs/guides/integration-options-publisher-web) or [Advertiser/Data Provider Integration Overview](https://unifiedid.com/docs/guides/integration-advertiser-dataprovider-overview). +This section summarizes sample integrations using the UID2 SDK for JavaScript directly, without Prebid.js or Google Secure Signals. For integration options by participant type, see [Publisher Web Integration Overview](https://unifiedid.com/docs/guides/integration-options-publisher-web) or [Advertiser/Data Provider Integration Overview](https://unifiedid.com/docs/guides/integration-advertiser-dataprovider-overview). ### Client-Side Integration Using UID2 SDK for JavaScript This sample is for publishers who prefer a fully client-side integration using the [SDK for JavaScript Reference Guide](https://unifiedid.com/docs/sdks/sdk-ref-javascript) to generate and manage tokens directly in the browser. This approach is ideal for fast prototyping with minimal back-end requirements. -- Site: [UID2 Publisher Client-Side Integration Example](https://js-client-side.samples.uidapi.com/) +- Site: [Client-Side UID2 Integration Example using JavaScript SDK](https://js-client-side.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/javascript-sdk/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/javascript-sdk/client-side) - Doc: [Client-Side Integration Guide for JavaScript](https://unifiedid.com/docs/guides/integration-javascript-client-side) @@ -28,7 +28,7 @@ This sample is for publishers who prefer a fully client-side integration using t This sample is for publishers who want more control over UID2 token creation (handled on your servers), while using the SDK for JavaScript on the client side to manage and refresh tokens in the browser. -- Site: [UID2 Client-Server Integration Example](https://js-client-server.samples.uidapi.com/) +- Site: [Client-Server UID2 Integration Example using JavaScript SDK](https://js-client-server.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/javascript-sdk/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/javascript-sdk/client-server) - Doc: [Client-Server Integration Guide for JavaScript](https://unifiedid.com/docs/guides/integration-javascript-client-server) @@ -36,7 +36,7 @@ This sample is for publishers who want more control over UID2 token creation (ha This sample is for publishers with React apps who want to integrate UID2 directly into their component-based architecture using the SDK for JavaScript. -- Site: [UID2 React Client-Side Integration Example](https://js-react.samples.uidapi.com/) +- Site: [React Client-Side UID2 Integration Example using JavaScript SDK](https://js-react.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/javascript-sdk/react-client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/javascript-sdk/react-client-side) - Doc: [Client-Side Integration Guide for JavaScript](https://unifiedid.com/docs/guides/integration-javascript-client-side) @@ -44,7 +44,7 @@ This sample is for publishers with React apps who want to integrate UID2 directl This sample is for publishers who want all UID2 operations to occur on the server side, offering maximum control, security, and flexibility without relying on a client-side SDK. -- Site: [Server-Only UID2 Integration Example](https://server-side.samples.uidapi.com/) +- Site: [Server-Side UID2 Integration Example](https://server-side.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/server-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/server-side) - Doc: [Publisher Integration Guide, Server-Side](https://unifiedid.com/docs/guides/integration-publisher-server-side) @@ -56,7 +56,7 @@ This section includes sample pages for generating UID2 tokens to be passed by Pr This sample is for publishers who want to generate UID2 tokens on the client side and pass them into header bidding auctions using Prebid.js. -- Site: [UID2 Prebid.js Client-Side Integration Example](https://prebid-client.samples.uidapi.com/) +- Site: [Client-Side UID2 Integration with Prebid.js](https://prebid-client.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-integrations/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) - Doc: [UID2 Client-Side Integration Guide for Prebid.js](https://unifiedid.com/docs/guides/integration-prebid-client-side) @@ -64,15 +64,15 @@ This sample is for publishers who want to generate UID2 tokens on the client sid This sample is for publishers who want to generate UID2 tokens on the server side and pass them to Prebid.js for header bidding. -- Site: [UID2 Prebid.js Client-Server Integration Example](https://prebid-client-server.samples.uidapi.com/) +- Site: [Client-Server UID2 Integration with Prebid.js](https://prebid-client-server.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-integrations/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-server) - Doc: [UID2 Client-Server Integration Guide for Prebid.js](https://unifiedid.com/docs/guides/integration-prebid-client-server) -### Deferred Configuration with Prebid.js +### Deferred Client-Side Configuration with Prebid.js This sample demonstrates how to add UID2 to Prebid.js *after* the page has loaded, using `mergeConfig()` and `refreshUserIds()`. This pattern is useful for async login flows, delayed consent, or Single Page Applications (SPAs). -- Site: [UID2 Prebid.js Deferred Integration Example](https://prebid-deferred.samples.uidapi.com/) +- Site: [Deferred UID2 Integration with Prebid.js](https://prebid-deferred.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-integrations/client-side-deferred](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) - Doc: [UID2 Client-Side Integration Guide for Prebid.js](https://unifiedid.com/docs/guides/integration-prebid-client-side) @@ -92,7 +92,7 @@ This section includes sample pages for passing UID2 identity data to Google's ad This sample is for publishers who want a purely client-side integration with GAM Secure Signals. -- Site: [UID2 Client-Side Integration Example with Google Secure Signals](https://secure-signals-client-side.samples.uidapi.com/) +- Site: [Client-Side UID2 Integration with Google Secure Signals](https://secure-signals-client-side.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/client-side) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) @@ -100,7 +100,7 @@ This sample is for publishers who want a purely client-side integration with GAM This sample is for publishers who want a hybrid approach with token generation on the server and client-side logic for secure signals. -- Site: [UID2 Client-Server Integration Example with Google Secure Signals](https://secure-signals-client-server.samples.uidapi.com/) +- Site: [Client-Server UID2 SDK Integration Example with Google Secure Signals](https://secure-signals-client-server.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/client-server) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) @@ -108,7 +108,7 @@ This sample is for publishers who want a hybrid approach with token generation o This sample is for publishers who want all Secure Signals and UID2 logic server-side for better control and security. -- Site: [UID2 Server-Side Integration Example with Google Secure Signals](https://secure-signals-server-side.samples.uidapi.com/) +- Site: [Server-Side UID2 Integration with Google Secure Signals](https://secure-signals-server-side.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/server-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/server-side) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) @@ -116,7 +116,7 @@ This sample is for publishers who want all Secure Signals and UID2 logic server- This sample is for publishers with React apps who want to integrate UID2 + Secure Signals directly into their component-based architecture. -- Site: [UID2 React Client-Side Integration Example with Google Secure Signals](https://secure-signals-react.samples.uidapi.com/) +- Site: [React Client-Side UID2 Integration with Google Secure Signals](https://secure-signals-react.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/react-client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/react-client-side) - Doc: [Google Ad Manager Secure Signals Integration Guide](https://unifiedid.com/docs/guides/integration-google-ss) diff --git a/package-lock.json b/package-lock.json index cb1cedb61..b228e0fa6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -243,7 +243,6 @@ "version": "5.45.0", "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-5.45.0.tgz", "integrity": "sha512-nxuCid+Nszs4xqwIMDw11pRJPes2c+Th1yup/+LtpjFH8QWXkr3SirNYSD3OXAeM060HgWWPLA8/Fxk+vwxQOA==", - "peer": true, "dependencies": { "@algolia/client-common": "5.45.0", "@algolia/requester-browser-xhr": "5.45.0", @@ -359,7 +358,6 @@ "version": "7.28.5", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.28.5.tgz", "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", - "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -2040,7 +2038,6 @@ "url": "https://opencollective.com/csstools" } ], - "peer": true, "engines": { "node": ">=18" }, @@ -2062,7 +2059,6 @@ "url": "https://opencollective.com/csstools" } ], - "peer": true, "engines": { "node": ">=18" } @@ -2167,7 +2163,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -2573,7 +2568,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -3438,7 +3432,6 @@ "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/plugin-content-docs/-/plugin-content-docs-3.9.2.tgz", "integrity": "sha512-C5wZsGuKTY8jEYsqdxhhFOe1ZDjH0uIYJ9T/jebHwkyxqnr4wW0jTkB72OMqNjsoQRcb0JN3PcSeTwFlVgzCZg==", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -3657,7 +3650,6 @@ "version": "3.9.2", "resolved": "https://registry.npmjs.org/@docusaurus/theme-classic/-/theme-classic-3.9.2.tgz", "integrity": "sha512-IGUsArG5hhekXd7RDb11v94ycpJpFdJPkLnt10fFQWOVxAtq5/D7hT6lzc2fhyQKaaCE62qVajOMKL7OiAFAIA==", - "peer": true, "dependencies": { "@docusaurus/core": "3.9.2", "@docusaurus/logger": "3.9.2", @@ -4288,7 +4280,6 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/@mdx-js/react/-/react-3.1.0.tgz", "integrity": "sha512-QjHtSaoameoalGnKDT3FoIl4+9RwyTmo9ZJGBdLOks/YOiWHoRDI3PUwEzOE7kEmGcV3AFcp9K6dYu9rEuKLAQ==", - "peer": true, "dependencies": { "@types/mdx": "^2.0.0" }, @@ -4832,7 +4823,6 @@ "version": "8.1.0", "resolved": "https://registry.npmjs.org/@svgr/core/-/core-8.1.0.tgz", "integrity": "sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA==", - "peer": true, "dependencies": { "@babel/core": "^7.21.3", "@svgr/babel-preset": "8.1.0", @@ -5187,7 +5177,6 @@ "version": "18.3.11", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.11.tgz", "integrity": "sha512-r6QZ069rFTjrEYgFdOck1gK7FLVsgJE7tTz0pQBczlBNUhBNk0MQH4UbnFSwjpQLMkLzgqvBBa+qGpLje16eTQ==", - "peer": true, "dependencies": { "@types/prop-types": "*", "csstype": "^3.0.2" @@ -5711,7 +5700,6 @@ "version": "8.15.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz", "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -5784,7 +5772,6 @@ "version": "6.12.6", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -5844,7 +5831,6 @@ "version": "5.45.0", "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-5.45.0.tgz", "integrity": "sha512-wrj4FGr14heLOYkBKV3Fbq5ZBGuIFeDJkTilYq/G+hH1CSlQBtYvG2X1j67flwv0fUeQJwnWxxRIunSemAZirA==", - "peer": true, "dependencies": { "@algolia/abtesting": "1.11.0", "@algolia/client-abtesting": "5.45.0", @@ -6270,7 +6256,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.25", "caniuse-lite": "^1.0.30001754", @@ -7153,7 +7138,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -7996,7 +7980,6 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", "dev": true, - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", @@ -8067,7 +8050,6 @@ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", "dev": true, - "peer": true, "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -14459,7 +14441,6 @@ "url": "https://github.com/sponsors/ai" } ], - "peer": true, "dependencies": { "nanoid": "^3.3.11", "picocolors": "^1.1.1", @@ -15315,7 +15296,6 @@ "version": "7.1.1", "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.1.1.tgz", "integrity": "sha512-orRsuYpJVw8LdAwqqLykBj9ecS5/cRHlI5+nvTo8LcCKmzDmqVORXtOIYEEQuL9D4BxtA1lm5isAqzQZCoQ6Eg==", - "peer": true, "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -15838,7 +15818,6 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.5.3.tgz", "integrity": "sha512-QQtaxnoDJeAkDvDKWCLiwIXkTgRhwYDEQCghU9Z6q03iyek/rxRh/2lC3HB7P8sWT2xC/y5JDctPLBIGzHKbhw==", "dev": true, - "peer": true, "bin": { "prettier": "bin/prettier.cjs" }, @@ -16118,7 +16097,6 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react/-/react-18.3.1.tgz", "integrity": "sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==", - "peer": true, "dependencies": { "loose-envify": "^1.1.0" }, @@ -16130,7 +16108,6 @@ "version": "18.3.1", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", - "peer": true, "dependencies": { "loose-envify": "^1.1.0", "scheduler": "^0.23.2" @@ -16181,7 +16158,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-6.0.0.tgz", "integrity": "sha512-YMMxTUQV/QFSnbgrP3tjDzLHRg7vsbMn8e9HAa8o/1iXoiomo48b7sk/kkmWEuWNDPJVlKSJRB6Y2fHqdJk+SQ==", - "peer": true, "dependencies": { "@types/react": "*" }, @@ -16208,7 +16184,6 @@ "version": "5.3.4", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", "integrity": "sha512-Ys9K+ppnJah3QuaRiLxk+jDWOR1MekYQrlytiXxC1RyfbdsZkS5pvKAzCCr031xHixZwpnsYNT5xysdFHQaYsA==", - "peer": true, "dependencies": { "@babel/runtime": "^7.12.13", "history": "^4.9.0", @@ -16849,7 +16824,6 @@ "version": "1.75.0", "resolved": "https://registry.npmjs.org/sass/-/sass-1.75.0.tgz", "integrity": "sha512-ShMYi3WkrDWxExyxSZPst4/okE9ts46xZmJDSawJQrnte7M1V9fScVB+uNXOVKRBt0PggHOwoZcn8mYX4trnBw==", - "peer": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", "immutable": "^4.0.0", @@ -16941,7 +16915,6 @@ "version": "8.17.1", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", - "peer": true, "dependencies": { "fast-deep-equal": "^3.1.3", "fast-uri": "^3.0.1", @@ -18092,8 +18065,7 @@ "node_modules/tslib": { "version": "2.8.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", - "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", - "peer": true + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/type-check": { "version": "0.4.0", @@ -18168,7 +18140,6 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "devOptional": true, - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -18965,7 +18936,6 @@ "version": "5.95.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", - "peer": true, "dependencies": { "@types/estree": "^1.0.5", "@webassemblyjs/ast": "^1.12.1", @@ -19628,7 +19598,6 @@ "version": "4.1.13", "resolved": "https://registry.npmjs.org/zod/-/zod-4.1.13.tgz", "integrity": "sha512-AvvthqfqrAhNH9dnfmrfKzX5upOdjUVJYFqNSlkmGf64gRaTzlPwz99IHYnVs28qYAybvAlBV+H7pn0saFY4Ig==", - "peer": true, "funding": { "url": "https://github.com/sponsors/colinhacks" } From 342d70bfecdda5799190df9d4a7aeedd05afb558 Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Tue, 23 Dec 2025 11:43:31 -0700 Subject: [PATCH 3/4] update description headers for each of the sites --- docs/guides/integration-prebid-client-side.md | 4 ++-- docs/ref-info/integration-sample-sites.md | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index e0ad9b9ad..adaa02b0e 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -207,12 +207,12 @@ pbjs.setConfig({ ## Optional: Deferred Client-Side UID2 Configuration with mergeConfig -In some scenarios, you may want to add UID2 to your Prebid.js configuration *after* the page has already loaded—for example, when the user logs in after page load, or when consent is granted asynchronously. +If you already have Prebid.js configured but didn't include UID2 in the initial setup, you can still add the UID2 module using `mergeConfig()` and `refreshUserIds()`. This allows Prebid.js to handle all UID2 work—token generation, storage, and refresh—even when UID2 wasn't part of your original configuration. Instead of using `setConfig()` (which overwrites existing configuration), use `mergeConfig()` to add UID2 without affecting other settings, and then call `refreshUserIds()` to trigger token generation: ```js -// Step 1: User logs in or provides consent after page load +// Step 1: Define the UID2 configuration const uidConfig = { userSync: { userIds: [{ diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index 9081011f1..1f500fcce 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -54,7 +54,7 @@ This section includes sample pages for generating UID2 tokens to be passed by Pr ### Client-Side Integration with Prebid.js -This sample is for publishers who want to generate UID2 tokens on the client side and pass them into header bidding auctions using Prebid.js. +This sample is for publishers who have access to DII on the client side and want to do front-end development only. Prebid.js handles the entire UID2 workflow—token generation, storage, and automatic refresh—with no server-side development required. - Site: [Client-Side UID2 Integration with Prebid.js](https://prebid-client.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-integrations/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) @@ -62,7 +62,7 @@ This sample is for publishers who want to generate UID2 tokens on the client sid ### Client-Server Integration with Prebid.js -This sample is for publishers who want to generate UID2 tokens on the server side and pass them to Prebid.js for header bidding. +This sample is for publishers who have access to DII on the server side and can do server-side development. The server generates the initial UID2 token, and Prebid.js continues to manage the token lifecycle—including storage and automatic refresh. - Site: [Client-Server UID2 Integration with Prebid.js](https://prebid-client-server.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-integrations/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-server) @@ -70,7 +70,7 @@ This sample is for publishers who want to generate UID2 tokens on the server sid ### Deferred Client-Side Configuration with Prebid.js -This sample demonstrates how to add UID2 to Prebid.js *after* the page has loaded, using `mergeConfig()` and `refreshUserIds()`. This pattern is useful for async login flows, delayed consent, or Single Page Applications (SPAs). +This sample demonstrates how publishers who already have Prebid.js configured can still add the UID2 module using functions provided by Prebid. This allows Prebid.js to handle all UID2 work even when the module wasn't included in the initial configuration. - Site: [Deferred UID2 Integration with Prebid.js](https://prebid-deferred.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-integrations/client-side-deferred](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) @@ -78,7 +78,7 @@ This sample demonstrates how to add UID2 to Prebid.js *after* the page has loade ### Prebid.js with Secure Signals -This sample demonstrates how to use UID2 with Prebid.js and Google Secure Signals together. +This sample demonstrates how to configure Prebid.js with both UID2 and Google Secure Signals, enabling the integration between header bidding and Google Ad Manager. - Site: [UID2 Prebid.js Secure Signals Integration Example](https://prebid-secure-signals.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-secure-signals](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) @@ -90,7 +90,7 @@ This section includes sample pages for passing UID2 identity data to Google's ad ### Client-Side Secure Signals -This sample is for publishers who want a purely client-side integration with GAM Secure Signals. +This sample is for publishers who want a client-side integration with Google Ad Manager Secure Signals. It uses the UID2 SDK for JavaScript to generate and manage tokens, while the Secure Signal script automatically shares the token with Google Ad Manager for ad requests. - Site: [Client-Side UID2 Integration with Google Secure Signals](https://secure-signals-client-side.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/client-side) @@ -98,7 +98,7 @@ This sample is for publishers who want a purely client-side integration with GAM ### Client-Server Secure Signals -This sample is for publishers who want a hybrid approach with token generation on the server and client-side logic for secure signals. +This sample is for publishers who want to generate UID2 tokens on the server side while using the SDK for JavaScript on the client to manage tokens. The Secure Signal script automatically shares the token with Google Ad Manager for ad requests. - Site: [Client-Server UID2 SDK Integration Example with Google Secure Signals](https://secure-signals-client-server.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/client-server](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/client-server) @@ -106,7 +106,7 @@ This sample is for publishers who want a hybrid approach with token generation o ### Server-Side Secure Signals -This sample is for publishers who want all Secure Signals and UID2 logic server-side for better control and security. +This sample is for publishers who want all UID2 token logic handled server-side. The Secure Signal script reads the token and automatically shares it with Google Ad Manager for ad requests. - Site: [Server-Side UID2 Integration with Google Secure Signals](https://secure-signals-server-side.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/server-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/server-side) @@ -114,7 +114,7 @@ This sample is for publishers who want all Secure Signals and UID2 logic server- ### React Client-Side Secure Signals -This sample is for publishers with React apps who want to integrate UID2 + Secure Signals directly into their component-based architecture. +This sample is for publishers with React apps who want a client-side integration with Google Secure Signals. It uses the UID2 SDK for JavaScript within a React component to generate and manage tokens, while the Secure Signal script automatically shares the token with Google Ad Manager. - Site: [React Client-Side UID2 Integration with Google Secure Signals](https://secure-signals-react.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/google-secure-signals/react-client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/google-secure-signals/react-client-side) From 930364ca198c39d53cf09d8d607e53e2c705510f Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Tue, 23 Dec 2025 12:16:54 -0700 Subject: [PATCH 4/4] update instructions for deferred prebid in client side page --- docs/guides/integration-google-ss.md | 2 +- docs/guides/integration-prebid-client-side.md | 25 +++++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/docs/guides/integration-google-ss.md b/docs/guides/integration-google-ss.md index 08ed64299..dc4626a45 100644 --- a/docs/guides/integration-google-ss.md +++ b/docs/guides/integration-google-ss.md @@ -84,7 +84,7 @@ If you want to use Secure Signals with Prebid.js, you must complete both these a A sample implementation for Prebid.js with Secure Signals is available at the following links: -- Running site: [UID2 Prebid.js Secure Signals Integration Example](https://prebid-secure-signals.samples.uidapi.com/) +- Site: [UID2 Prebid.js Secure Signals Integration Example](https://prebid-secure-signals.samples.uidapi.com/) - Code: [uid2-examples/web-integrations/prebid-secure-signals](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) ## Integrating with Single Sign-On (SSO) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index adaa02b0e..635d2e560 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -31,8 +31,8 @@ If you need to use an earlier version of Prebid.js, use the implementation solut An example of the UID2 Prebid.js client-side integration is available at the following links: -- Code: [Example Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) -- Running site: [Client-Side UID2 Integration with Prebid.js](https://prebid-client.samples.uidapi.com/) +- Site: [Client-Side UID2 Integration with Prebid.js](https://prebid-client.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-integrations/client-side](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) ## Integrating with Single Sign-On (SSO) @@ -207,9 +207,12 @@ pbjs.setConfig({ ## Optional: Deferred Client-Side UID2 Configuration with mergeConfig -If you already have Prebid.js configured but didn't include UID2 in the initial setup, you can still add the UID2 module using `mergeConfig()` and `refreshUserIds()`. This allows Prebid.js to handle all UID2 work—token generation, storage, and refresh—even when UID2 wasn't part of your original configuration. +If you already have Prebid.js configured but didn't include UID2 in the initial setup, you can still add the UID2 module using two functions provided by Prebid.js: -Instead of using `setConfig()` (which overwrites existing configuration), use `mergeConfig()` to add UID2 without affecting other settings, and then call `refreshUserIds()` to trigger token generation: +- [mergeConfig()](https://docs.prebid.org/dev-docs/publisher-api-reference/mergeConfig.html): Merges new configuration into the existing Prebid config without overwriting other settings. Use this to add the UID2 module to your existing `userSync.userIds` array. +- [refreshUserIds()](https://docs.prebid.org/dev-docs/publisher-api-reference/refreshUserIds.html): Reruns the user ID submodules to fetch the latest IDs. Call this after `mergeConfig()` to trigger UID2 token generation. + +You still pass the same configuration information as described above (API base URL, credentials, and DII) so that Prebid can handle the entire UID2 token lifecycle: ```js // Step 1: Define the UID2 configuration @@ -234,18 +237,18 @@ pbjs.mergeConfig(uidConfig); await pbjs.refreshUserIds({ submoduleNames: ['uid2'] }); ``` -### Key Points +:::note +Once you add UID2 to your configuration, Prebid does not provide functionality to remove individual submodules without overwriting the entire `userIds` array. For client-side integrations where Prebid has access to the UID2 token in localStorage, it is important to clear localStorage where the token is stored after the user logs out and reload the page to clear caches. This prevents future bid requests from using the identity. -- **`mergeConfig()` is additive**: It adds UID2 to the existing `userSync.userIds` array without overwriting other user ID modules. -- **`refreshUserIds()`**: Triggers Prebid to generate/refresh user IDs. Use `{ submoduleNames: ['uid2'] }` to refresh only the UID2 module. -- **Clearing UID2**: Prebid does not provide a built-in way to remove a single user ID module after it's been added. To clear UID2 on logout, remove the token from localStorage and reload the page. +If you are managing the UID2 SDK separately, use `window.__uid2.disconnect()` which handles all logout functionality—clearing both memory and storage—without requiring a page refresh. +::: ### Deferred Client-Side Integration Example -An example of the deferred UID2 Prebid.js integration using `mergeConfig()` is available at the following links: +An example of the deferred UID2 Prebid.js integration is available at the following links: -- Code: [Deferred Prebid.js UID2 Integration](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) -- Running site: [Deferred UID2 Integration with Prebid.js](https://prebid-deferred.samples.uidapi.com/) +- Site: [Deferred UID2 Integration with Prebid.js](https://prebid-deferred.samples.uidapi.com/) +- Code: [uid2-examples/web-integrations/prebid-integrations/client-side-deferred](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) ## Optional: Prebid.js Integration with Google Secure Signals