ID5 Samples

Quickly get started with code samples for all of our integrations: Prebid.js, the ID5 API, and our cookie syncing pixels

Prebid
Basic

A basic example of a Prebid implementation using default options.

Prebid
ID5 API + Prebid

Sample code for fetching the ID5 Universal ID with the ID5 API to pass into Prebid.

Prebid
Passing Static Consent

Sample code for fetching the ID5 Universal ID using static consent data.

ID5 API
Basic

Sample code for fetching the ID5 Universal ID with the ID5 API and making it available to other JS code on page.

ID5 API
ID5 API with lbCDN (Experimental)

Sample code for fetching the ID5 Universal ID with the ID5 API delivered with lbCDN.

ID5 API
Passing Hard Signals

Sample code for fetching the ID5 Universal ID using a customer's email address with the ID5 API.

ID5 API
Passing Static Consent

Sample code for fetching the ID5 Universal ID using static consent data.

ID5 API
A/B Testing (50/50 split)

Sample code for using the A/B Testing feature with a 50% chance of being in the control group.

ID5 API
A/B Testing (Always Control Group)

Sample code guaranteeing that you are always put in the Control Group (no ID5 ID made available).

Usersync
Initiate a Call with a basic pixel

Sample code for using the ID5 usersync image pixel to initiate calls without sending a user ID.

Usersync
Initiate a Call with JS

Sample code for using the ID5 usersync JS to initiate calls without sending a user ID.