Skip to content

Commit 05606c6

Browse files
PulsePoint Adapter: Fix on multi-format support (prebid#5857)
* ET-1691: Pulsepoint Analytics adapter for Prebid. (#1) * ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter * ET-1691: Adding pulsepoint analytics and tests for pulsepoint adapter * ET-1691: cleanup * ET-1691: minor * ET-1691: revert package.json change * Adding bidRequest to bidFactory.createBid method as per prebid#509 * ET-1765: Adding support for additional params in PulsePoint adapter (#2) * ET-1850: Fixing prebid#866 * Minor fix * Adding mandatory parameters to Bid * APPS-3774
1 parent d3c0ded commit 05606c6

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

modules/pulsepointBidAdapter.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ function impression(slot) {
165165
function banner(slot) {
166166
const sizes = parseSizes(slot);
167167
const size = adSize(slot, sizes);
168-
return (slot.nativeParams || slot.params.video) ? null : {
168+
return (slot.mediaTypes && slot.mediaTypes.banner) ? {
169169
w: size[0],
170170
h: size[1],
171171
battr: slot.params.battr,
172172
format: sizes
173-
};
173+
} : null;
174174
}
175175

176176
/**

test/spec/modules/pulsepointBidAdapter_spec.js

+24-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ describe('PulsePoint Adapter Tests', function () {
1919
}
2020
}, {
2121
placementCode: '/DfpAccount2/slot2',
22+
mediaTypes: {
23+
banner: {
24+
sizes: [[728, 90]]
25+
}
26+
},
2227
bidId: 'bid23456',
2328
params: {
2429
cp: 'p10000',
@@ -72,6 +77,11 @@ describe('PulsePoint Adapter Tests', function () {
7277
}];
7378
const additionalParamsConfig = [{
7479
placementCode: '/DfpAccount1/slot1',
80+
mediaTypes: {
81+
banner: {
82+
sizes: [[1, 1]]
83+
}
84+
},
7585
bidId: 'bid12345',
7686
params: {
7787
cp: 'p10000',
@@ -89,6 +99,11 @@ describe('PulsePoint Adapter Tests', function () {
8999

90100
const ortbParamsSlotConfig = [{
91101
placementCode: '/DfpAccount1/slot1',
102+
mediaTypes: {
103+
banner: {
104+
sizes: [[1, 1]]
105+
}
106+
},
92107
bidId: 'bid12345',
93108
params: {
94109
cp: 'p10000',
@@ -146,6 +161,11 @@ describe('PulsePoint Adapter Tests', function () {
146161

147162
const schainParamsSlotConfig = [{
148163
placementCode: '/DfpAccount1/slot1',
164+
mediaTypes: {
165+
banner: {
166+
sizes: [[1, 1]]
167+
}
168+
},
149169
bidId: 'bid12345',
150170
params: {
151171
cp: 'p10000',
@@ -681,7 +701,10 @@ describe('PulsePoint Adapter Tests', function () {
681701
expect(ortbRequest.imp[1].banner).to.not.be.null;
682702
expect(ortbRequest.imp[1].banner.w).to.equal(728);
683703
expect(ortbRequest.imp[1].banner.h).to.equal(90);
684-
expect(ortbRequest.imp[1].banner.format).to.be.null;
704+
expect(ortbRequest.imp[1].banner.format).to.not.be.null;
705+
expect(ortbRequest.imp[1].banner.format).to.have.lengthOf(1);
706+
expect(ortbRequest.imp[1].banner.format[0].w).to.equal(728);
707+
expect(ortbRequest.imp[1].banner.format[0].h).to.equal(90);
685708
// adsize on response
686709
const ortbResponse = {
687710
seatbid: [{

0 commit comments

Comments
 (0)