From a48979976d8d75780727fac9d035bb2468d3708d Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Tue, 23 Dec 2025 10:57:29 -0700 Subject: [PATCH 01/13] 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 02/13] 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 03/13] 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 04/13] 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 From ed322bcc72b442afb2f09985a525f3123452f1ba Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 12:06:28 -0700 Subject: [PATCH 05/13] update instances of secure signal to secure signals --- docs/ref-info/integration-sample-sites.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index 1f500fcce..437a494f8 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -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 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. +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 Signals 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 client-side integration with Google Ad ### Client-Server 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. +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 Signals 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 to generate UID2 tokens on the server sid ### Server-Side Secure Signals -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. +This sample is for publishers who want all UID2 token logic handled server-side. The Secure Signals 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 UID2 token logic handled server-side. ### React Client-Side Secure Signals -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. +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 Signals 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 486b4ca4c8528ac4b62bd53056f7a7e37e37f79e Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 12:09:56 -0700 Subject: [PATCH 06/13] update title link to match destination for prebid deferred --- docs/ref-info/integration-sample-sites.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index 437a494f8..a616248cf 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -80,7 +80,7 @@ This sample demonstrates how publishers who already have Prebid.js configured ca 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/) +- Site: [Client-Side UID2 Integration with Prebid.js (with Google Secure Signals)](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) From 599f335874e3b2fe216f77874b1d038374e4f7f8 Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 12:23:49 -0700 Subject: [PATCH 07/13] update description sentence per feedback --- docs/ref-info/integration-sample-sites.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index a616248cf..a32ca8159 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -68,7 +68,7 @@ This sample is for publishers who have access to DII on the server side and can - 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 Client-Side Configuration with Prebid.js +### Deferred Client-Side Integration with Prebid.js 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. @@ -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 client-side integration with Google Ad Manager Secure Signals. It uses the UID2 SDK for JavaScript to generate and manage tokens, while the Secure Signals script automatically shares the token with Google Ad Manager for ad requests. +This sample is for publishers who want a client-side integration with Google Ad Manager Secure Signals. In this integration, the UID2 SDK for JavaScript generates and manages tokens, and the Secure Signals script automatically shares the tokens 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) @@ -124,7 +124,7 @@ This sample is for publishers with React apps who want a client-side integration ### UID2 Hashing Tool -This tool is for developers or clients validating data preparation, such as hashing and normalization of emails or phone numbers before token requests. +This tool is for developers or clients validating data preparation, such as hashing and normalization of emails or phone numbers before token requests. The tool is available at the following links: - 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) From 4cbb4eec0b955559e985a3eddab9436dd0af0d4b Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 12:39:17 -0700 Subject: [PATCH 08/13] put links in correct destination and add cross reference for google ss --- docs/guides/integration-google-ss.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/integration-google-ss.md b/docs/guides/integration-google-ss.md index dc4626a45..79bb47137 100644 --- a/docs/guides/integration-google-ss.md +++ b/docs/guides/integration-google-ss.md @@ -82,10 +82,7 @@ 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: - -- 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) +A sample implementation for Prebid.js with Secure Signals is also available. For details, see [Sample Implementations](#sample-implementations). ## Integrating with Single Sign-On (SSO) @@ -171,6 +168,9 @@ The following sample implementations are available to illustrate how to integrat - Client-side integration example using React, the UID2 JavaScript SDK, and Google secure signals: - [Sample implementation](https://secure-signals-react-integ.uidapi.com) - [Code repository](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/react_client_side) +- Client-side integration example using Prebid.js with Google Secure Signals: + - [Sample implementation](https://prebid-secure-signals.samples.uidapi.com/) + - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) Each sample implementation has its own instructions. From 142772347fc82997ce05910fc9dd0bb685d61adc Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 12:59:44 -0700 Subject: [PATCH 09/13] add and update sample implementation sections for prebid --- .../integration-prebid-client-server.md | 12 ++++--- docs/guides/integration-prebid-client-side.md | 32 +++++++++++-------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/docs/guides/integration-prebid-client-server.md b/docs/guides/integration-prebid-client-server.md index 1cba4390f..1c2df7a05 100644 --- a/docs/guides/integration-prebid-client-server.md +++ b/docs/guides/integration-prebid-client-server.md @@ -36,10 +36,6 @@ Information about how to integrate Prebid with UID2 is also in the following loc - On the Prebid site, on the [Unified ID 2.0](https://docs.prebid.org/dev-docs/modules/userid-submodules/unified2.html) page for the Prebid User ID submodule. - In the Prebid GitHub repository, on the [UID2 User ID Submodule](https://github.com/prebid/Prebid.js/blob/master/modules/uid2IdSystem.md) page. - - ## Integrating with Single Sign-On (SSO) @@ -394,3 +390,11 @@ if you're using Prebid.js, and you're planning to pass UID2 tokens to Google usi - In your Google Ad Manager account, make sure that encrypted signals are properly shared with third-party bidders: see [Allow Secure Signals Sharing](integration-google-ss.md#allow-secure-signals-sharing). - Update your Prebid.js configuration: see [Optional: Enable Secure Signals in Prebid.js](integration-google-ss.md#optional-enable-secure-signals-in-prebidjs). + +## Sample Implementation + +The following sample implementation is available to illustrate how to integrate UID2 with Prebid.js using client-server integration: + +- Client-server integration example using Prebid.js: + - [Sample implementation](https://prebid-client-server.samples.uidapi.com/) + - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-server) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index 635d2e560..81c11d791 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -27,13 +27,6 @@ This implementation requires Prebid.js version 8.21.0 or later. For version info If you need to use an earlier version of Prebid.js, use the implementation solution presented in the [UID2 Client-Server Integration Guide for Prebid.js](integration-prebid-client-server.md) instead. -## Integration Example - -An example of the UID2 Prebid.js client-side integration is available at the following links: - -- 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) @@ -243,12 +236,7 @@ Once you add UID2 to your configuration, Prebid does not provide functionality t 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 is available at the following links: - -- 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) +A sample implementation for deferred configuration is also available. For details, see [Sample Implementations](#sample-implementations). ## Optional: Prebid.js Integration with Google Secure Signals @@ -256,3 +244,21 @@ if you're using Prebid.js, and you're planning to pass UID2 tokens to Google usi - In your Google Ad Manager account, make sure that encrypted signals are properly shared with third-party bidders: see [Allow Secure Signals Sharing](integration-google-ss.md#allow-secure-signals-sharing). - Update your Prebid.js configuration: see [Optional: Enable Secure Signals in Prebid.js](integration-google-ss.md#optional-enable-secure-signals-in-prebidjs). + +A sample implementation for Prebid.js with Secure Signals is also available. For details, see [Sample Implementations](#sample-implementations). + +## Sample Implementations + +The following sample implementations are available to illustrate how to integrate UID2 with Prebid.js on the client side: + +- Client-side integration example using Prebid.js: + - [Sample implementation](https://prebid-client.samples.uidapi.com/) + - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) +- Deferred client-side integration example using Prebid.js: + - [Sample implementation](https://prebid-deferred.samples.uidapi.com/) + - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) +- Client-side integration example using Prebid.js with Google Secure Signals: + - [Sample implementation](https://prebid-secure-signals.samples.uidapi.com/) + - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) + +Each sample implementation has its own instructions. From 40fd39a0c343662fe00c575b3bf8f66532dcb610 Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 13:12:33 -0700 Subject: [PATCH 10/13] update links for js sdk --- docs/guides/integration-google-ss.md | 28 +++++++++---------- .../integration-javascript-client-server.md | 15 +++++----- .../integration-javascript-client-side.md | 15 +++++----- .../integration-prebid-client-server.md | 4 +-- docs/guides/integration-prebid-client-side.md | 12 ++++---- .../integration-publisher-server-side.md | 6 ++-- 6 files changed, 40 insertions(+), 40 deletions(-) diff --git a/docs/guides/integration-google-ss.md b/docs/guides/integration-google-ss.md index 79bb47137..069139af8 100644 --- a/docs/guides/integration-google-ss.md +++ b/docs/guides/integration-google-ss.md @@ -156,21 +156,21 @@ For details, see [Client-Side Integration Guide for JavaScript](integration-java The following sample implementations are available to illustrate how to integrate with the Google Ad Manager secure signals feature: -- Server-side integration example using the UID2 JavaScript SDK with Google secure signals: - - [Sample implementation](https://secure-signals-server-side-integ.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/server_side) -- Client-server integration example using the UID2 JavaScript SDK with Google secure signals: - - [Sample implementation](https://secure-signals-client-server-integ.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/with_sdk_v3) -- Client-side integration example using the UID2 JavaScript SDK with Google secure signals: - - [Sample implementation](https://secure-signals-client-side-integ.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/client_side) -- Client-side integration example using React, the UID2 JavaScript SDK, and Google secure signals: - - [Sample implementation](https://secure-signals-react-integ.uidapi.com) - - [Code repository](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/google-secure-signals-integration/react_client_side) +- Client-side integration example using the UID2 JavaScript SDK with Google Secure Signals: + - 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) +- Client-server integration example using the UID2 JavaScript SDK with Google Secure Signals: + - 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) +- Server-side integration example using the UID2 JavaScript SDK with Google Secure Signals: + - 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) +- Client-side integration example using React, the UID2 JavaScript SDK, and Google Secure Signals: + - 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) - Client-side integration example using Prebid.js with Google Secure Signals: - - [Sample implementation](https://prebid-secure-signals.samples.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) + - Site: [Client-Side UID2 Integration with Prebid.js (with Google Secure Signals)](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) Each sample implementation has its own instructions. diff --git a/docs/guides/integration-javascript-client-server.md b/docs/guides/integration-javascript-client-server.md index e8a443a85..08a7755be 100644 --- a/docs/guides/integration-javascript-client-server.md +++ b/docs/guides/integration-javascript-client-server.md @@ -22,12 +22,6 @@ If you prefer to integrate with UID2 via **only** client-side JavaScript changes For technical details about the SDK, see [SDK for JavaScript Reference Guide](../sdks/sdk-ref-javascript.md). -## Sample Implementation - -For a sample implementation, see the UID2 SDK Integration example: -- [Client-Server UID2 SDK Integration Example](https://example-jssdk-integ.uidapi.com/) -- [Code Repository with Readme](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/js-sdk) - ## Introduction This guide outlines the basic steps that you need to consider if you are building an integration without using an SDK. For example, you need to decide how to implement user authentication and data capture, how to manage UID2 identity information and use it for targeted advertising, and how to refresh tokens, deal with missing identities, and handle user opt-outs. @@ -36,7 +30,7 @@ For a workflow diagram, see [Integration Steps](#integration-steps). See also [F For details about the UID2 opt-out workflow and how users can opt out, see [User Opt-Out](../getting-started/gs-opt-out.md). -To facilitate the process of establishing client identity using UID2 and retrieving advertising tokens, the web integration steps provided in this guide rely on the SDK for JavaScript. Here's an [example application](https://example-jssdk-integ.uidapi.com/) that illustrates the integration steps described in this guide and the usage of the SDK (currently only for email addresses). For the application documentation, see [UID2 SDK Integration Example](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/js-sdk). +To facilitate the process of establishing client identity using UID2 and retrieving advertising tokens, the web integration steps provided in this guide rely on the SDK for JavaScript. For a sample implementation, see [Sample Implementation](#sample-implementation). :::tip The first-party cookie and local storage implementation details might change in the future. To avoid potential issues, be sure to rely on the functionality documented in the [SDK for JavaScript API Reference](../sdks/sdk-ref-javascript.md#api-reference) for your identity management. @@ -178,3 +172,10 @@ The client lifecycle is complete when the user decides to log out from the publi ## FAQs For a list of frequently asked questions for the publisher audience, see [FAQs for Publishers](../getting-started/gs-faqs.md#faqs-for-publishers). + +## Sample Implementation + +A sample implementation is available for client-server integration using the UID2 SDK for JavaScript: + +- 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) diff --git a/docs/guides/integration-javascript-client-side.md b/docs/guides/integration-javascript-client-side.md index c40180320..d18ea6192 100644 --- a/docs/guides/integration-javascript-client-side.md +++ b/docs/guides/integration-javascript-client-side.md @@ -57,14 +57,6 @@ If you want to use a debug build of the SDK, use the following URL instead: - [https://cdn.integ.uidapi.com/uid2-sdk-4.0.1.js](https://cdn.integ.uidapi.com/uid2-sdk-4.0.1.js) -## Sample Implementation - -For a sample implementation, see this example: -- Code: [Example Client-Side Integration for JavaScript](https://github.com/IABTechLab/uid2-web-integrations/tree/main/examples/cstg) -- Running site: [Client-Side Integration Example, UID2 JavaScript SDK](https://cstg-integ.uidapi.com/) - - - ## Integrating with Single Sign-On (SSO) @@ -407,3 +399,10 @@ function bytesToBase64(bytes) { return btoa(binString); } ``` + +## Sample Implementation + +A sample implementation is available for client-side integration using the UID2 SDK for JavaScript: + +- 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) diff --git a/docs/guides/integration-prebid-client-server.md b/docs/guides/integration-prebid-client-server.md index 1c2df7a05..5032ee513 100644 --- a/docs/guides/integration-prebid-client-server.md +++ b/docs/guides/integration-prebid-client-server.md @@ -396,5 +396,5 @@ if you're using Prebid.js, and you're planning to pass UID2 tokens to Google usi The following sample implementation is available to illustrate how to integrate UID2 with Prebid.js using client-server integration: - Client-server integration example using Prebid.js: - - [Sample implementation](https://prebid-client-server.samples.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-server) + - 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) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index 81c11d791..145e0e2e3 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -252,13 +252,13 @@ A sample implementation for Prebid.js with Secure Signals is also available. For The following sample implementations are available to illustrate how to integrate UID2 with Prebid.js on the client side: - Client-side integration example using Prebid.js: - - [Sample implementation](https://prebid-client.samples.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side) + - 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) - Deferred client-side integration example using Prebid.js: - - [Sample implementation](https://prebid-deferred.samples.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-integrations/client-side-deferred) + - 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) - Client-side integration example using Prebid.js with Google Secure Signals: - - [Sample implementation](https://prebid-secure-signals.samples.uidapi.com/) - - [Code repository](https://github.com/IABTechLab/uid2-examples/tree/main/web-integrations/prebid-secure-signals) + - Site: [Client-Side UID2 Integration with Prebid.js (with Google Secure Signals)](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) Each sample implementation has its own instructions. diff --git a/docs/guides/integration-publisher-server-side.md b/docs/guides/integration-publisher-server-side.md index be29eaef4..2b8e24e89 100644 --- a/docs/guides/integration-publisher-server-side.md +++ b/docs/guides/integration-publisher-server-side.md @@ -131,10 +131,10 @@ If the user logs out, do not use the UID2 token. ## Sample Implementation -A sample implementation is available for server-side integration. See: +A sample implementation is available for server-side integration: -- [Server-Only UID2 Integration Example](https://example-srvonly-integ.uidapi.com/login) -- [Server-Only UID2 Integration Example (readme)](https://github.com/IABTechLab/uid2-examples/blob/main/publisher/server_only/README.md) +- 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) ## FAQs From 9c41ac15b92f8d09fdf457fb6d0cb601851d23ab Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 13:34:32 -0700 Subject: [PATCH 11/13] add note regarding phone numbers and update deferred title --- docs/guides/integration-prebid-client-side.md | 2 +- docs/ref-info/integration-sample-sites.md | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/guides/integration-prebid-client-side.md b/docs/guides/integration-prebid-client-side.md index 145e0e2e3..39f72f964 100644 --- a/docs/guides/integration-prebid-client-side.md +++ b/docs/guides/integration-prebid-client-side.md @@ -255,7 +255,7 @@ The following sample implementations are available to illustrate how to integrat - 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) - Deferred client-side integration example using Prebid.js: - - Site: [Deferred UID2 Integration with Prebid.js](https://prebid-deferred.samples.uidapi.com/) + - Site: [Deferred Client-Side 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) - Client-side integration example using Prebid.js with Google Secure Signals: - Site: [Client-Side UID2 Integration with Prebid.js (with Google Secure Signals)](https://prebid-secure-signals.samples.uidapi.com/) diff --git a/docs/ref-info/integration-sample-sites.md b/docs/ref-info/integration-sample-sites.md index a32ca8159..4a670913c 100644 --- a/docs/ref-info/integration-sample-sites.md +++ b/docs/ref-info/integration-sample-sites.md @@ -12,6 +12,10 @@ 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/). +:::note +The sample implementations on this page demonstrate email-based integrations; however, phone numbers are also supported and follow the same integration patterns, using a different SDK method and requiring an additional normalization step. For a phone number integration example, see the [UID2 Hashing Tool](#uid2-hashing-tool). +::: + ## JavaScript SDK Integrations 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). @@ -72,7 +76,7 @@ This sample is for publishers who have access to DII on the server side and can 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/) +- Site: [Deferred Client-Side 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) From a8a39a8c6b03d4c9529624c277a2b41a7e5ee1b3 Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 15:21:24 -0700 Subject: [PATCH 12/13] remove repeat word in same sentence --- docs/guides/integration-javascript-client-server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guides/integration-javascript-client-server.md b/docs/guides/integration-javascript-client-server.md index 08a7755be..41d5fb7ba 100644 --- a/docs/guides/integration-javascript-client-server.md +++ b/docs/guides/integration-javascript-client-server.md @@ -30,7 +30,7 @@ For a workflow diagram, see [Integration Steps](#integration-steps). See also [F For details about the UID2 opt-out workflow and how users can opt out, see [User Opt-Out](../getting-started/gs-opt-out.md). -To facilitate the process of establishing client identity using UID2 and retrieving advertising tokens, the web integration steps provided in this guide rely on the SDK for JavaScript. For a sample implementation, see [Sample Implementation](#sample-implementation). +To facilitate the process of establishing client identity using UID2 and retrieving advertising tokens, the web integration steps provided in this guide rely on the SDK for JavaScript. For an example, see [Sample Implementation](#sample-implementation). :::tip The first-party cookie and local storage implementation details might change in the future. To avoid potential issues, be sure to rely on the functionality documented in the [SDK for JavaScript API Reference](../sdks/sdk-ref-javascript.md#api-reference) for your identity management. From 92be1c944256467dc0d2b7c883df62d2ba32643b Mon Sep 17 00:00:00 2001 From: Eiman Eltigani Date: Mon, 29 Dec 2025 15:40:21 -0700 Subject: [PATCH 13/13] fix order of sample implementation section before faq --- docs/guides/integration-javascript-client-server.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/integration-javascript-client-server.md b/docs/guides/integration-javascript-client-server.md index 41d5fb7ba..257b0d759 100644 --- a/docs/guides/integration-javascript-client-server.md +++ b/docs/guides/integration-javascript-client-server.md @@ -169,13 +169,13 @@ The client lifecycle is complete when the user decides to log out from the publi ``` -## FAQs - -For a list of frequently asked questions for the publisher audience, see [FAQs for Publishers](../getting-started/gs-faqs.md#faqs-for-publishers). - ## Sample Implementation A sample implementation is available for client-server integration using the UID2 SDK for JavaScript: - 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) + +## FAQs + +For a list of frequently asked questions for the publisher audience, see [FAQs for Publishers](../getting-started/gs-faqs.md#faqs-for-publishers).