Skip to content

Commit 70a3cf2

Browse files
author
Tim Sturtewagen
committed
adpod category support test
1 parent fb95850 commit 70a3cf2

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

modules/adheseBidAdapter.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
'use strict';
22

33
import { registerBidder } from '../src/adapters/bidderFactory.js';
4-
import { BANNER, VIDEO } from '../src/mediaTypes.js';
4+
import { BANNER, VIDEO, ADPOD } from '../src/mediaTypes.js';
55

66
const BIDDER_CODE = 'adhese';
77
const GVLID = 553;
@@ -97,16 +97,25 @@ function adResponse(bid, ad) {
9797
adhese: {
9898
originData: adDetails.originData,
9999
origin: adDetails.origin,
100-
originInstance: adDetails.originInstance
100+
originInstance: adDetails.originInstance,
101101
}
102102
});
103103

104104
if (bidResponse.mediaType === VIDEO) {
105+
bidResponse.meta = {
106+
primaryCatId: 'IAB2-10',
107+
adServerCatId: 399
108+
}
105109
bidResponse.vastXml = markup;
110+
bidResponse.video = {
111+
context: ADPOD,
112+
durationSeconds: 30
113+
}
106114
} else {
107115
const counter = ad.impressionCounter ? "<img src='" + ad.impressionCounter + "' style='height:1px; width:1px; margin: -1px -1px; display:none;'/>" : '';
108116
bidResponse.ad = markup + counter;
109-
}
117+
}
118+
110119
return bidResponse;
111120
}
112121

@@ -193,7 +202,8 @@ function getAdDetails(ad) {
193202
if (isAdheseAd(ad)) {
194203
creativeId = ad.id;
195204
dealId = ad.orderId;
196-
originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id };
205+
originData = { priority: ad.priority, orderProperty: ad.orderProperty, adFormat: ad.adFormat, adType: ad.adType, libId: ad.libId, adspaceId: ad.adspaceId, viewableImpressionCounter: ad.viewableImpressionCounter, slotId: ad.slotID, slotName: ad.slotName, advertiserId: ad.advertiserId, adId: ad.id
206+
};
197207
} else {
198208
creativeId = ad.origin + (ad.originInstance ? '-' + ad.originInstance : '');
199209
if (ad.originData) {

0 commit comments

Comments
 (0)