diff --git a/modules/oneVideoBidAdapter.js b/modules/oneVideoBidAdapter.js index b0efe561dac..d2c42b042af 100644 --- a/modules/oneVideoBidAdapter.js +++ b/modules/oneVideoBidAdapter.js @@ -6,8 +6,7 @@ export const spec = { ENDPOINT: 'https://ads.adaptv.advertising.com/rtb/openrtb?ext_id=', SYNC_ENDPOINT1: 'https://cm.g.doubleclick.net/pixel?google_nid=adaptv_dbm&google_cm&google_sc', SYNC_ENDPOINT2: 'https://pr-bh.ybp.yahoo.com/sync/adaptv_ortb/{combo_uid}', - SYNC_ENDPOINT3: 'https://sync-tm.everesttech.net/upi/pid/m7y5t93k?redir=https%3A%2F%2Fsync.adap.tv%2Fsync%3Ftype%3Dgif%26key%3Dtubemogul%26uid%3D%24%7BUSER_ID%7D', - SYNC_ENDPOINT4: 'https://match.adsrvr.org/track/cmf/generic?ttd_pid=adaptv&ttd_tpi=1', + SYNC_ENDPOINT3: 'https://match.adsrvr.org/track/cmf/generic?ttd_pid=adaptv&ttd_tpi=1', supportedMediaTypes: ['video'], /** * Determines whether or not the given bid request is valid. @@ -103,7 +102,8 @@ export const spec = { * @param {ServerResponse[]} serverResponses List of server's responses. * @return {UserSync[]} The user syncs which should be dropped. */ - getUserSyncs: function(syncOptions) { + getUserSyncs: function(syncOptions, responses, consentData) { + let { gdprApplies, consentString = '' } = consentData; if (syncOptions.pixelEnabled) { return [{ type: 'image', @@ -115,11 +115,11 @@ export const spec = { }, { type: 'image', - url: spec.SYNC_ENDPOINT3 + url: `https://sync-tm.everesttech.net/upi/pid/m7y5t93k?gdpr_qparam=${gdprApplies ? 1 : 0}&gdpr_consent_qparam=${consentString}&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0%26gdpr%3D{gdpr}%26gdpr_consent%3D{gdpr_consent}` }, { type: 'image', - url: spec.SYNC_ENDPOINT4 + url: spec.SYNC_ENDPOINT3 }]; } } diff --git a/test/spec/modules/oneVideoBidAdapter_spec.js b/test/spec/modules/oneVideoBidAdapter_spec.js index a87bff33f4b..b21eb69b3cf 100644 --- a/test/spec/modules/oneVideoBidAdapter_spec.js +++ b/test/spec/modules/oneVideoBidAdapter_spec.js @@ -402,5 +402,14 @@ describe('OneVideoBidAdapter', function () { expect(data.imp[0].video.pos).to.equal(position); expect(data.imp[0].video.mimes).to.equal(bidRequest.params.video.mimes); }); + describe('getUserSyncs', function () { + const GDPR_CONSENT_STRING = 'GDPR_CONSENT_STRING'; + + it('should get correct user sync when iframeEnabled', function () { + let pixel = spec.getUserSyncs({pixelEnabled: true}, {}, {gdprApplies: true, consentString: GDPR_CONSENT_STRING}) + expect(pixel[2].type).to.equal('image'); + expect(pixel[2].url).to.equal('https://sync-tm.everesttech.net/upi/pid/m7y5t93k?gdpr_qparam=1&gdpr_consent_qparam=' + GDPR_CONSENT_STRING + '&redir=https%3A%2F%2Fpixel.advertising.com%2Fups%2F55986%2Fsync%3Fuid%3D%24%7BUSER_ID%7D%26_origin%3D0%26gdpr%3D{gdpr}%26gdpr_consent%3D{gdpr_consent}'); + }); + }); }); });