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

Update Rubicon Analytics Adapter bidId to match PBS #4156

Merged
merged 49 commits into from
Oct 11, 2019
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8d635ff
Add microadBidAdapter
Feb 15, 2019
3055b90
Remove unnecessary encodeURIComponent from microadBidAdapter
Feb 26, 2019
67fb91b
Submit Advangelists Prebid Adapter
Feb 26, 2019
3ebb916
Submit Advangelists Prebid Adapter 1.1
Feb 27, 2019
4f5c451
Correct procudtion endpoint for prebid
Feb 28, 2019
2dc6d1d
Merge branch 'microad-bid-adapter' of git://github.com/strong-zero/Pr…
Feb 28, 2019
fa3e081
Merge remote-tracking branch 'origin/master' into master-rubicon-clean
Mar 18, 2019
600a46e
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Mar 18, 2019
7f578b3
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 23, 2019
176a312
Merge branch 'master' of https://github.com/prebid/Prebid.js
Mar 26, 2019
9abf89c
Merge branch 'master' of https://github.com/prebid/Prebid.js
May 13, 2019
6ce04ab
Merge remote-tracking branch 'upstream/master'
Jun 10, 2019
415e2f6
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jun 27, 2019
61fb82c
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 11, 2019
3cc4c67
analytics update with wrapper name
Jul 11, 2019
cd81e02
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
e2b4e04
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
53b5970
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 15, 2019
5c00ed5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 16, 2019
28848ad
reverted error merge
Jul 16, 2019
ab635ee
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 19, 2019
93308f5
Merge branch 'master' of https://github.com/prebid/Prebid.js into mas…
Jul 24, 2019
1cfd52d
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 25, 2019
d619807
Merge branch 'master' of https://github.com/prebid/Prebid.js
Jul 27, 2019
9893f0f
Merge branch 'master' of https://github.com/prebid/Prebid.js
Aug 7, 2019
986a251
Merge remote-tracking branch 'upstream/master'
Aug 23, 2019
2cae7c0
Merge branch 'master' of https://github.com/prebid/Prebid.js into ori…
Aug 27, 2019
d7fd252
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 4, 2019
83fff17
update for rubicon analytics to send seat[].bid.id for PBS video and …
Sep 4, 2019
eaf71a7
fixed conditional for server and video or banner
Sep 10, 2019
c7c01ba
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
704777a
update to source and tests to support matching bidid with pbs
Sep 10, 2019
24a28aa
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 10, 2019
cd8722e
Merge branches 'analytics-adapter-bidid-match-pbs' and 'master' of ht…
Sep 25, 2019
7a1a4ec
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js
Sep 25, 2019
4173d16
Merge branch 'master' of https://github.com/prebid/Prebid.js
Sep 25, 2019
29a8094
Merge branch 'master' of https://github.com/rubicon-project/Prebid.js…
Sep 25, 2019
f4948e3
updated with optimized value test for bidid
Sep 25, 2019
ca13952
update changed default value of netRevenue to true
Sep 27, 2019
0b6cd48
Merge branch 'master' of https://github.com/prebid/Prebid.js
Oct 3, 2019
73def01
Merge branches 'analytics-adapter-bidid-match-pbs' and 'master' of ht…
Oct 3, 2019
026be67
remove var declaration for rightSlot to correct lgtm error for unused…
Oct 3, 2019
c6b957a
update defineSlot div id to match div id defined in html body
Oct 3, 2019
38d7671
update test ad unit test props
Oct 3, 2019
993ab93
revert lock to match remote master
Oct 3, 2019
b0fde7e
add seatBidId to bidObj in rpBidAdapter interpretResponse
Oct 3, 2019
6f74194
update setTargeting to execute in the bids back handler
Oct 4, 2019
237280f
remove dev integration test page
Oct 4, 2019
fce6b76
meaningless commit to get lgtm to re-run
bretg Oct 11, 2019
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
2 changes: 2 additions & 0 deletions modules/prebidServerBidAdapter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,8 @@ const OPEN_RTB_PROTOCOL = {
bidObject.adserverTargeting = extPrebidTargeting;
}

bidObject.seatBidId = bid.id;

if (utils.deepAccess(bid, 'ext.prebid.type') === VIDEO) {
bidObject.mediaType = VIDEO;
let sizes = bidRequest.sizes && bidRequest.sizes[0];
Expand Down
9 changes: 7 additions & 2 deletions modules/rubiconAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function sendMessage(auctionId, bidWonId) {
function formatBid(bid) {
return utils.pick(bid, [
'bidder',
'bidId',
'bidId', bidId => utils.deepAccess(bid, 'bidResponse.seatBidId') || bidId,
'status',
'error',
'source', (source, bid) => {
Expand Down Expand Up @@ -235,7 +235,8 @@ export function parseBidResponse(bid, previousBidResponse) {
'dimensions', () => utils.pick(bid, [
'width',
'height'
])
]),
'seatBidId',
]);
}

Expand Down Expand Up @@ -414,6 +415,10 @@ let rubiconAdapter = Object.assign({}, baseAdapter, {
}
bid.clientLatencyMillis = Date.now() - cache.auctions[args.auctionId].timestamp;
bid.bidResponse = parseBidResponse(args, bid.bidResponse);
// RP server banner overwrites bidId with bid.seatBidId
if (utils.deepAccess(bid, 'bidResponse.seatBidId') && bid.bidder === 'rubicon' && bid.source === 'server' && ['video', 'banner'].some(i => utils.deepAccess(bid, 'bidResponse.mediaType') === i)) {
bid.seatBidId = bid.bidResponse.seatBidId;
}
break;
case BIDDER_DONE:
args.bids.forEach(bid => {
Expand Down
4 changes: 4 additions & 0 deletions modules/rubiconBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,10 @@ export const spec = {
height: bid.h || utils.deepAccess(bidRequest, 'mediaTypes.video.h') || utils.deepAccess(bidRequest, 'params.video.playerHeight'),
};

if (bid.id) {
bidObject.seatBidId = bid.id;
}

if (bid.dealid) {
bidObject.dealId = bid.dealid;
}
Expand Down
2 changes: 1 addition & 1 deletion modules/rubiconBidAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ globalsupport@rubiconproject.com for more information.
video: {
context: 'instream',
playerSize: [640, 480],
mimes: ['video/mp4', 'video/x-ms-wmv']
mimes: ['video/mp4', 'video/x-ms-wmv'],
protocols: [2,5],
maxduration:30,
linearity: 1,
Expand Down
6 changes: 4 additions & 2 deletions test/spec/modules/rubiconAnalyticsAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ const BID2 = Object.assign({}, BID, {
mediaType: 'banner',
cpm: 1.52,
source: 'server',
seatBidId: 'aaaa-bbbb-cccc-dddd',
rubiconTargeting: {
'rpfl_elemid': '/19968336/header-bid-tag1',
'rpfl_14062': '2_tier0100'
Expand Down Expand Up @@ -222,6 +223,7 @@ const MOCK = {
'transactionId': 'c116413c-9e3f-401a-bee1-d56aec29a1d4',
'sizes': [[1000, 300], [970, 250], [728, 90]],
'bidId': '3bd4ebb1c900e2',
'seatBidId': 'aaaa-bbbb-cccc-dddd',
'bidderRequestId': '1be65d7958826a',
'auctionId': '25c6d7f5-699a-4bfc-87c9-996f915341fa'
}
Expand Down Expand Up @@ -354,7 +356,7 @@ const ANALYTICS_MESSAGE = {
'bids': [
{
'bidder': 'rubicon',
'bidId': '3bd4ebb1c900e2',
'bidId': 'aaaa-bbbb-cccc-dddd',
'status': 'success',
'source': 'server',
'clientLatencyMillis': 3214,
Expand Down Expand Up @@ -421,7 +423,7 @@ const ANALYTICS_MESSAGE = {
'bidder': 'rubicon',
'transactionId': 'c116413c-9e3f-401a-bee1-d56aec29a1d4',
'adUnitCode': '/19968336/header-bid-tag1',
'bidId': '3bd4ebb1c900e2',
'bidId': 'aaaa-bbbb-cccc-dddd',
'status': 'success',
'source': 'server',
'clientLatencyMillis': 3214,
Expand Down
1 change: 1 addition & 0 deletions test/spec/modules/rubiconBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,7 @@ describe('the rubicon adapter', function () {

expect(bids).to.be.lengthOf(1);

expect(bids[0].seatBidId).to.equal('0');
expect(bids[0].creativeId).to.equal('4259970');
expect(bids[0].cpm).to.equal(2);
expect(bids[0].ttl).to.equal(300);
Expand Down