Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PBJS Core/RP Analytics Adapter - First Party Data Update #6612

Merged
merged 1 commit into from
Apr 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions modules/rubiconAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -662,12 +662,12 @@ let rubiconAdapter = Object.assign({}, baseAdapter, {
return ['banner'];
},
'gam', () => {
if (utils.deepAccess(bid, 'fpd.context.adServer.name') === 'gam') {
return {adSlot: bid.fpd.context.adServer.adSlot}
if (utils.deepAccess(bid, 'ortb2Imp.ext.data.adserver.name') === 'gam') {
return {adSlot: bid.ortb2Imp.ext.data.adserver.adSlot}
}
},
'pbAdSlot', () => utils.deepAccess(bid, 'fpd.context.pbAdSlot'),
'pattern', () => utils.deepAccess(bid, 'fpd.context.aupName')
'pbAdSlot', () => utils.deepAccess(bid, 'ortb2Imp.ext.data.pbadslot'),
'pattern', () => utils.deepAccess(bid, 'ortb2Imp.ext.data.aupname')
])
]);
return memo;
Expand Down
2 changes: 1 addition & 1 deletion src/prebid.js
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ $$PREBID_GLOBAL$$.removeAdUnit = function (adUnitCode) {
$$PREBID_GLOBAL$$.requestBids = hook('async', function ({ bidsBackHandler, timeout, adUnits, adUnitCodes, labels, auctionId } = {}) {
events.emit(REQUEST_BIDS);
const cbTimeout = timeout || config.getConfig('bidderTimeout');
adUnits = adUnits || $$PREBID_GLOBAL$$.adUnits;
adUnits = (adUnits && config.convertAdUnitFpd(utils.isArray(adUnits) ? adUnits : [adUnits])) || $$PREBID_GLOBAL$$.adUnits;

utils.logInfo('Invoking $$PREBID_GLOBAL$$.requestBids', arguments);

Expand Down
16 changes: 10 additions & 6 deletions test/spec/modules/rubiconAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -1906,14 +1906,18 @@ describe('rubicon analytics adapter', function () {

it('should pass aupName as pattern', function () {
let bidRequest = utils.deepClone(MOCK.BID_REQUESTED);
bidRequest.bids[0].fpd = {
context: {
aupName: '1234/mycoolsite/*&gpt_leaderboard&deviceType=mobile'
bidRequest.bids[0].ortb2Imp = {
ext: {
data: {
aupname: '1234/mycoolsite/*&gpt_leaderboard&deviceType=mobile'
}
}
};
bidRequest.bids[1].fpd = {
context: {
aupName: '1234/mycoolsite/*&gpt_skyscraper&deviceType=mobile'
bidRequest.bids[1].ortb2Imp = {
ext: {
data: {
aupname: '1234/mycoolsite/*&gpt_skyscraper&deviceType=mobile'
}
}
};
events.emit(AUCTION_INIT, MOCK.AUCTION_INIT);
Expand Down