To learn about optable-web-sdk integration on your web site or application, see the latest releases, or report an issue, please check out the web-sdk GitHub README. If you're looking for more information on Optable, head over to Optable.co
In all demo pages, the Optable demo environment is used. Data stored by the demo environment is periodically deleted.
Note that the examples below initialize the OptableSDK with cookies=true, so all ID storage is done using
cookies.
Generally, it is preferable to use secure first party HTTP-only cookies for transporting IDs from
OptableSDK. However, when the integrating website does not share the same top-level domain name with the
Optable DCN, then first party cookies are not reliable, and the LocalStorage method should be used. To
enable it, simply initialize the OptableSDK object with the cookies
option set to
false
, and the SDK will do the rest.
Click here to see the examples using LocalStorage.
Example | Description |
---|---|
identify |
Simple script tag integration showing how to send a hashed Email address and optional
publisher user ID to your DCN.
|
identify from ReactJS app |
Similar to the plain identify API example, but from a
ReactJS web application which imports the SDK
npm module. See
our GitHub for the
source code.
|
witness | Shows how to log events with optional properties to your DCN. |
profile | Shows how to set visitor traits (e.g., age=45 ) and sync them to your DCN. |
Example | Description |
---|---|
targeting: GAM360 | Shows how to load active cohorts for a visitor and pass them to Google Ad Manager (GAM) via the Google Publisher Tag for ad targeting. |
targeting: GAM360 (cached data) | Shows how to load and cache active cohorts in a visitor's browser. Separately, cached cohorts are passed to Google Ad Manager (GAM) via the Google Publisher Tag for ad targeting. |
targeting: Prebid.js | Shows how to load and cache active cohorts in a visitor's browser. Separately, cached cohorts are passed to Prebid.js bidder adapters via the first-party data segments and taxonomy mechanism. |
Example | Description |
---|---|
UID2 integration | Shows how the standard UID2 integration workflow for publishers can be implemented using the UID2 services operated by Optable and the UID2 SDK. |