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

Yahoo SSP Bid Adapter: fix for adId #7571

Merged
merged 76 commits into from
Oct 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2bb271c
Added ysspBidAdapter
adam-browning Aug 17, 2021
402a896
Merge remote-tracking branch 'upstream/master' into ysspBidAdapter
adam-browning Sep 9, 2021
a906363
Renaming to Yahoo SSP
adam-browning Sep 9, 2021
6f1258a
changing all internal references from yssp to yahoossp
adam-browning Sep 9, 2021
5a472b6
added alias for aol, onemobile, onedisplay
adam-browning Sep 9, 2021
f590a0b
Removing aliases from adapter
adam-browning Sep 16, 2021
7c8e049
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Sep 16, 2021
9025b09
Merge branch 'yahoosspBidAdapter' of https://github.com/adam-browning…
Sep 17, 2021
e3b5f39
Pass EU consent string in the correct location in the payload.
Sep 17, 2021
f11f0d9
Merge branch 'prebid:master' into feature/yahoosspBidAdapter
slimkrazy Sep 20, 2021
6b1a671
WIP
adam-browning Sep 23, 2021
d683c7c
WIP
adam-browning Sep 23, 2021
b11016b
pubId support 1st draft
adam-browning Sep 23, 2021
6a91280
WIP
adam-browning Sep 24, 2021
048f600
WIP
adam-browning Sep 24, 2021
8c26410
WIP pubId unit tests
adam-browning Sep 24, 2021
66422b6
WIP
adam-browning Sep 24, 2021
411cdc5
WIP
adam-browning Sep 26, 2021
d10689b
pubid tests stable
adam-browning Sep 26, 2021
4ccc073
pubId support
adam-browning Sep 26, 2021
3b59dfc
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Sep 26, 2021
1ab95ea
md update
adam-browning Sep 26, 2021
a766e94
site id inventory mapping fix
adam-browning Sep 27, 2021
54bc154
update to md file
adam-browning Sep 27, 2021
b38a443
update to md file
adam-browning Sep 27, 2021
7636019
order userId list
adam-browning Sep 28, 2021
c0f16b3
added user id yahoo.com
adam-browning Sep 28, 2021
52b72c2
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Sep 30, 2021
c5c9cf4
placementId support
adam-browning Sep 30, 2021
385965b
inventoryId & placementId stable unit tests
adam-browning Sep 30, 2021
c3e1dd9
maintainer group update
adam-browning Sep 30, 2021
c5ffa4e
maintainer group update
adam-browning Sep 30, 2021
28db614
Redirecting to PubGW urls without .ads.
adam-browning Sep 30, 2021
13dd71b
url switch fix
adam-browning Sep 30, 2021
d3ce338
fetch specific utils
adam-browning Sep 30, 2021
d4583f9
lint
adam-browning Sep 30, 2021
87d56e9
change inventoryId to siteId
adam-browning Oct 4, 2021
1055db4
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Oct 4, 2021
ba70e3e
WIP
adam-browning Oct 5, 2021
bf20154
custom key-value pair support
adam-browning Oct 5, 2021
adf6c32
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Oct 5, 2021
d6ce6df
WIP
adam-browning Oct 6, 2021
6d49210
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Oct 6, 2021
ec9e70c
WIP
adam-browning Oct 6, 2021
7f1e24f
WIP
adam-browning Oct 6, 2021
46f8837
WIP
adam-browning Oct 6, 2021
6c47ef7
WIP
adam-browning Oct 6, 2021
bc24bdc
WIP
adam-browning Oct 7, 2021
eed0ef9
updated FPD support
adam-browning Oct 7, 2021
16b2d93
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Oct 7, 2021
f5eeb4c
unit tests stable
adam-browning Oct 7, 2021
585409d
unit tests stable
adam-browning Oct 7, 2021
8d3ade5
check includes
adam-browning Oct 7, 2021
0528b6d
md file update
adam-browning Oct 7, 2021
a3e355a
code review updates
adam-browning Oct 8, 2021
e4eeb3e
WIP
adam-browning Oct 8, 2021
17e9350
WIP
adam-browning Oct 8, 2021
1ace361
code review comments
adam-browning Oct 8, 2021
bc6127e
WIP
adam-browning Oct 8, 2021
6497866
review comments implemented
adam-browning Oct 8, 2021
5bcd9a3
update to md file
adam-browning Oct 10, 2021
f57889e
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Oct 10, 2021
40a3331
update to md file
adam-browning Oct 10, 2021
03dddc8
update to md file
adam-browning Oct 10, 2021
317feb6
type fix
adam-browning Oct 11, 2021
1999db9
type fix
adam-browning Oct 11, 2021
d7ecc63
typo fix
adam-browning Oct 11, 2021
bc47d39
readme structure
adam-browning Oct 11, 2021
1ff6cde
typo
adam-browning Oct 11, 2021
961ee94
Merge remote-tracking branch 'upstream/master' into yahoosspBidAdapter
adam-browning Oct 12, 2021
79aa3c4
yarn.lock removed
adam-browning Oct 12, 2021
ad12f6f
revert yarn.lock
adam-browning Oct 12, 2021
50dae74
SRA Mode adId fix
adam-browning Oct 13, 2021
fba2e89
SRA adId fix
adam-browning Oct 13, 2021
2dc0efd
SRA adId patch v1.0.1
adam-browning Oct 13, 2021
4c5de40
SRA adId patch v1.0.1
adam-browning Oct 13, 2021
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
4 changes: 2 additions & 2 deletions modules/yahoosspBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Renderer } from '../src/Renderer.js';

const INTEGRATION_METHOD = 'prebid.js';
const BIDDER_CODE = 'yahoossp';
const ADAPTER_VERSION = '1.0.0';
const ADAPTER_VERSION = '1.0.1';
const PREBID_VERSION = '$prebid.version$';
const DEFAULT_BID_TTL = 300;
const TEST_MODE_DCN = '8a969516017a7a396ec539d97f540011';
Expand Down Expand Up @@ -581,7 +581,7 @@ export const spec = {
let cpm = (bid.ext && bid.ext.encp) ? bid.ext.encp : bid.price;

let bidResponse = {
adId: bid.id,
adId: deepAccess(bid, 'adId') ? bid.adId : bid.impid || bid.crid,
adUnitCode: bidderRequest.adUnitCode,
requestId: bid.impid,
bidderCode: spec.code,
Expand Down
29 changes: 28 additions & 1 deletion test/spec/modules/yahoosspBidAdapter_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const DEFAULT_AD_UNIT_CODE = '/19968336/header-bid-tag-1';
const DEFAULT_AD_UNIT_TYPE = 'banner';
const DEFAULT_PARAMS_BID_OVERRIDE = {};
const DEFAULT_VIDEO_CONTEXT = 'instream';
const ADAPTER_VERSION = '1.0.0';
const ADAPTER_VERSION = '1.0.1';
const PREBID_VERSION = '$prebid.version$';
const INTEGRATION_METHOD = 'prebid.js';

Expand Down Expand Up @@ -1252,6 +1252,33 @@ describe('YahooSSP Bid Adapter:', () => {
})
});

describe('bid response Ad ID / Creative ID', () => {
it('should use adId if it exists in the bid-response', () => {
const { serverResponse, bidderRequest } = generateResponseMock('banner');
const adId = 'bid-response-adId';
serverResponse.body.seatbid[0].bid[0].adId = adId;
const response = spec.interpretResponse(serverResponse, {bidderRequest});
expect(response[0].adId).to.equal(adId);
});

it('should use impid if adId does not exist in the bid-response', () => {
const { serverResponse, bidderRequest } = generateResponseMock('banner');
const impid = '25b6c429c1f52f';
serverResponse.body.seatbid[0].bid[0].impid = impid;
const response = spec.interpretResponse(serverResponse, {bidderRequest});
expect(response[0].adId).to.equal(impid);
});

it('should use crid if adId & impid do not exist in the bid-response', () => {
const { serverResponse, bidderRequest } = generateResponseMock('banner');
const crid = 'passback-12579';
serverResponse.body.seatbid[0].bid[0].impid = undefined;
serverResponse.body.seatbid[0].bid[0].crid = crid;
const response = spec.interpretResponse(serverResponse, {bidderRequest});
expect(response[0].adId).to.equal(crid);
});
});

describe('Time To Live (ttl)', () => {
const UNSUPPORTED_TTL_FORMATS = ['string', [1, 2, 3], true, false, null, undefined];
UNSUPPORTED_TTL_FORMATS.forEach(param => {
Expand Down