The mile RTD provider computes per-slot targeting values through a runtime engine and sets GPT slot targeting used by GAM unified Pricing rules.
It sets a single targeting key:
mile_rtdThe value is provider-specific and is returned by window[params.runtimeGlobalName].getMileTargetingByAdUnit(...)
Disclosure: This module loads external code that is not open source and has not been reviewed by Prebid.org.
Build the Mile RTD module into your Prebid.js package with:
gulp build --modules=rtdModule,mileRtdProvider,...
Targeting is applied during:
onAuctionInitEventonBidResponseEventThe runtime engine returns a map keyed by ad unit identifier (slot element ID or ad unit path), and each resolved slot gets:
mile_rtdtargetingByAdUnit[slotElementId] or targetingByAdUnit[adUnitPath]Example runtime response:
{
"div-gpt-ad-123": "segA_floorHigh",
"/1234567/homepage/top": "segB_floorMid"
}
Resulting GPT slot targeting:
slot.setTargeting("mile_rtd", "segA_floorHigh");
Use the RTD module with provider name mile:
pbjs.setConfig({
realTimeData: {
dataProviders: [
{
name: "mile",
waitForIt: false,
params: {
runtimeScriptUrl: "https://cdn.example.com/mile-rtd-runtime.js",
runtimeGlobalName: "mileRtdRuntime", // optional, default shown
},
},
],
},
});
runtimeScriptUrl (optional): URL of runtime script to load.runtimeGlobalName (optional): global object name exposing getMileTargetingByAdUnit; defaults to mileRtdRuntime.