Skip to content

Commit

Permalink
Pass app and device fields to Prebid server (#2044)
Browse files Browse the repository at this point in the history
* Pass app to Prebid server

pbsrequest.go code is indeed developed to read the app fields present in the root of PBSRequest json not in the PBSRequest.ad_units child object. So far no app bundle is passed in the prebid server payload to the differents bidders...
With this fix, the device and app should be passed in the setConfig rather than AdUnits.

* Update prebidServerBidAdapter.js
  • Loading branch information
Antoine Jacquemin (Rubicon) authored and Matt Kendall committed Feb 2, 2018
1 parent 9f412aa commit 7773f58
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion modules/prebidServerBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ export function PrebidServer() {
/* Prebid executes this function when the page asks to send out bid requests */
baseAdapter.callBids = function(s2sBidRequest, bidRequests, addBidResponse, done, ajax) {
const isDebug = !!getConfig('debug');
const app = !!getConfig('app');
const device = !!getConfig('device');
const adUnits = utils.deepClone(s2sBidRequest.ad_units);
adUnits.forEach(adUnit => {
let videoMediaType = utils.deepAccess(adUnit, 'mediaTypes.video');
Expand All @@ -232,7 +234,9 @@ export function PrebidServer() {
url: utils.getTopWindowUrl(),
prebid_version: '$prebid.version$',
ad_units: adUnits.filter(hasSizes),
is_debug: isDebug
is_debug: isDebug,
device: device,
app: app
};

let digiTrust = _getDigiTrustQueryParams();
Expand Down

0 comments on commit 7773f58

Please sign in to comment.