From 4eff79f2232ab91ab29d3ddad92efc9b692f84f5 Mon Sep 17 00:00:00 2001 From: Anand Venkatraman Date: Mon, 16 Oct 2017 22:58:53 +0530 Subject: [PATCH] PulsePoint Lite adapter - Enabling Sync pixel (#1686) * 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 https://github.com/prebid/Prebid.js/issues/509 * ET-1765: Adding support for additional params in PulsePoint adapter (#2) * ET-1850: Fixing https://github.com/prebid/Prebid.js/issues/866 * Minor fix * Enabling User sync pixel * minor fix --- modules/pulsepointLiteBidAdapter.js | 5 +++++ test/spec/modules/pulsepointLiteBidAdapter_spec.js | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/modules/pulsepointLiteBidAdapter.js b/modules/pulsepointLiteBidAdapter.js index 84f955317c0..00b5c014e98 100644 --- a/modules/pulsepointLiteBidAdapter.js +++ b/modules/pulsepointLiteBidAdapter.js @@ -53,6 +53,11 @@ export const spec = { type: 'iframe', url: '//bh.contextweb.com/visitormatch' }]; + } else if (syncOptions.pixelEnabled) { + return [{ + type: 'image', + url: '//bh.contextweb.com/visitormatch/prebid' + }]; } } diff --git a/test/spec/modules/pulsepointLiteBidAdapter_spec.js b/test/spec/modules/pulsepointLiteBidAdapter_spec.js index 8e1f12dac93..96f5c7a8d1f 100644 --- a/test/spec/modules/pulsepointLiteBidAdapter_spec.js +++ b/test/spec/modules/pulsepointLiteBidAdapter_spec.js @@ -224,6 +224,14 @@ describe('PulsePoint Lite Adapter Tests', () => { expect(options[0].url).to.equal('//bh.contextweb.com/visitormatch'); }); + it('Verifies image pixel sync', () => { + const options = spec.getUserSyncs({ pixelEnabled: true}); + expect(options).to.not.be.undefined; + expect(options).to.have.lengthOf(1); + expect(options[0].type).to.equal('image'); + expect(options[0].url).to.equal('//bh.contextweb.com/visitormatch/prebid'); + }); + it('Verify app requests', () => { const request = spec.buildRequests(appSlotConfig); const ortbRequest = JSON.parse(request.data);