Skip to content

Repository files navigation

UID2 and EUID Integration Examples

This repository contains sample sites demonstrating various integration patterns for UID2 (Unified ID 2.0) and EUID (European Unified ID).

Available Integrations

For a list of all deployed sample sites and related documentation, see the UID2 Integration Samples and Tools or EUID Integration Samples and Tools pages.


Running Locally

The following instructions are for running the sample sites on your local machine. This requires a local UID2 operator because the hosted operator does not accept requests from localhost. If you want to run locally without setting up a local operator, see Run Without Local Operator below.

1. Run a Local Operator

These sample sites require a local UID2 operator instance.

  1. Clone the operator repo:

    git clone https://github.com/IABTechLab/uid2-operator.git
  2. Follow the setup instructions in the uid2-operator README

  3. Ensure the operator is running on http://localhost:8080

2. Set Up Environment Variables

Copy one of the sample environment files:

# For UID2
cp .env.sample.uid2 .env
# For EUID
cp .env.sample.euid .env

Edit .env and add your credentials:

  • UID_API_KEY — Your API key
  • UID_CLIENT_SECRET — Your client secret
  • UID_CSTG_SERVER_PUBLIC_KEY — Your CSTG public key
  • UID_CSTG_SUBSCRIPTION_ID — Your CSTG subscription ID

Important: When running locally with a local operator, update the base URLs to point to your local operator:

  • UID_SERVER_BASE_URL — Use http://host.docker.internal:8080 (for server-side calls from Docker containers)
  • UID_CLIENT_BASE_URL — Use http://localhost:8080 (for client-side calls from browser)

Note: Additional environment variables may be required depending on the integration type. The .env.sample.uid2 and .env.sample.euid files contain all available variables. See the README in each integration folder for which variables are required for that specific integration.

3. Start the Sample Sites

# Start all sample sites
docker-compose up -d
# Stop all services
docker-compose down

Start a Single Service

# Start only prebid-client
docker-compose up -d prebid-client
# Stop a single service
docker-compose stop prebid-client

Rebuild After Code Changes

# Rebuild all
docker-compose up -d --build
# Rebuild a single service
docker-compose up -d --build prebid-client

Available Sample Sites

Service NameDescriptionPortURL
javascript-sdk-client-sideJavaScript SDK Client Side3031http://localhost:3031
javascript-sdk-client-serverJavaScript SDK Client Server3032http://localhost:3032
server-sideServer Side Integration3033http://localhost:3033
javascript-sdk-react-client-sideJavaScript SDK React3034http://localhost:3034
google-secure-signals-client-serverGoogle Secure Signals Client Server3041http://localhost:3041
google-secure-signals-client-sideGoogle Secure Signals Client Side3042http://localhost:3042
google-secure-signals-server-sideGoogle Secure Signals Server Side3043http://localhost:3043
google-secure-signals-react-client-sideGoogle Secure Signals React3044http://localhost:3044
prebid-clientPrebid Client Side3051http://localhost:3051
prebid-client-serverPrebid Client Server3052http://localhost:3052
prebid-client-side-deferredPrebid Client Side Deferred3053http://localhost:3053
prebid-secure-signals-client-sidePrebid Secure Signals3061http://localhost:3061
hashing-toolHashing Tool3071http://localhost:3071

Run Without Local Operator (Using Integ Environment)

If you don't want to run a local operator, you can use HTTPS with custom domains to connect to the integration environment operator instead.

This setup:

  • Uses https:// with subdomains (e.g., https://prebid-client.sample-dev.com)
  • Connects to the UID2 integration operator (no local operator required)
  • Requires certificate setup and hosts file configuration

See tools/reverse-proxy/README.md for setup instructions.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages