Integration Samples and Tools
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.
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 or Advertiser/Data Provider Integration 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 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
- Code: uid2-web-integrations/examples/cstg
- Doc: Client-Side Integration Guide for JavaScript
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
- Code: uid2-web-integrations/examples/js-sdk
- Doc: Client-Server Integration Guide for JavaScript
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
- Code: uid2-examples/publisher/server_only
- Doc: Publisher Integration Guide, 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.
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
- Code: uid2docs/static/examples/cstg-prebid-example
- Doc: UID2 Client-Side Integration Guide for Prebid.js
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.
Client-Side Secure Signals
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
- Code: uid2-web-integrations/examples/google-secure-signals-integration/client_side
- Doc: Google Ad Manager Secure Signals Integration Guide
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.
- Site: UID2 React Client-Side Integration Example with Google Secure Signals
- Code: uid2-web-integrations/examples/google-secure-signals-integration/react_client_side
- Doc: Google Ad Manager Secure Signals Integration Guide
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
- Code: uid2-web-integrations/examples/google-secure-signals-integration/server_side
- Doc: Google Ad Manager Secure Signals Integration Guide
- Additional site domains:
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.
- Site: Example for Client-Server UID2 SDK Integration with Google Secure Signals
- Code: uid2-web-integrations/examples/google-secure-signals-integration/with_sdk_v3
- Doc: Google Ad Manager Secure Signals Integration Guide
- Additional site domains:
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:
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.