Skip to content

Commit

Permalink
explicit win url response format as pixel (prebid#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
ckbo3hrk authored and Mat Brown committed Mar 20, 2017
1 parent dd893d9 commit 9621ec7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/adapters/adkernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ const AdKernelAdapter = function AdKernelAdapter() {
try {
document.body.appendChild(iframe);
} catch (error) {
/* istanbul ignore next */
utils.logError(error);
}
}
Expand Down Expand Up @@ -200,7 +201,7 @@ const AdKernelAdapter = function AdKernelAdapter() {
function formatAdMarkup(bid) {
var adm = bid.adm;
if ('nurl' in bid) {
adm += utils.createTrackPixelHtml(bid.nurl);
adm += utils.createTrackPixelHtml(`${bid.nurl}&px=1`);
}
return adm;
}
Expand Down
3 changes: 2 additions & 1 deletion test/spec/adapters/adkernel_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ describe('Adkernel adapter', () => {
expect(bidmanager.addBidResponse.firstCall.args[1].getStatusCode()).to.equal(CONSTANTS.STATUS.GOOD);
expect(utils.createTrackPixelHtml.calledOnce);
let result = pbjs.getBidResponsesForAdUnitCode(bid1_zone1.placementCode);
expect(result.bids[0].ad).to.include(bidResponse1.seatbid[0].bid[0].nurl);
let expectedNurl = bidResponse1.seatbid[0].bid[0].nurl + '&px=1';
expect(result.bids[0].ad).to.include(expectedNurl);
});

it('should perform usersync for each unique host/zone combination', () => {
Expand Down

0 comments on commit 9621ec7

Please sign in to comment.