Prebid.js Integration with OptableRTD

Overview

This demo demonstrates how to integrate Optable's targeting capabilities with Prebid.js using the OptableRTD module. The implementation assumes Google Ad Manager (GAM) as the primary ad server, integrated via Google Publisher Tag (GPT).

Key Features
  • Loads active visitor cohorts and passes them to Prebid.js via OptableRTD
  • Automatically forwards matching cohorts to GAM for targeting
  • Supports local cache updates for improved targeting accuracy
  • Configurable GAM targeting override via localStorage
Implementation

The Prebid.js configuration requires minimal setup. Here's the essential configuration:

pbjs.mergeConfig({
  debug: true,
  priceGranularity: "low",
  userSync: {
    iframeEnabled: true,
    enabledBidders: ["pubmatic"]
  },
  realTimeData: {
    auctionDelay: 400,
    dataProviders: [{
      name: 'optable',
      waitForIt: true  // Required to respect auctionDelay
    }]
  }
});
Important Notes
  • Targeting Cache: For optimal targeting accuracy, call targeting on page load to update the local cache, as the RTD module only uses cached values.
  • GAM Targeting Override: Set localStorage.disableGamTargeting = "true" before page load to prevent the SDK from sending targeting data to GAM.
web-sdk-demo-gam360/header-ad
web-sdk-demo-gam360/box-ad
web-sdk-demo-gam360/footer-ad