From 15d051599e76fb7632e77de94be9e032e15845f2 Mon Sep 17 00:00:00 2001 From: polischukPix Date: Mon, 3 Oct 2022 11:50:46 -0400 Subject: [PATCH 1/5] - Redisigned User Sync; - Added GVLID; --- modules.json | 6 +++++ modules/pixfutureBidAdapter.js | 49 +++++++++++++++++++++++++++------- modules/pixfutureBidAdapter.md | 7 ++++- 3 files changed, 52 insertions(+), 10 deletions(-) create mode 100644 modules.json diff --git a/modules.json b/modules.json new file mode 100644 index 00000000000..21a50f46eb0 --- /dev/null +++ b/modules.json @@ -0,0 +1,6 @@ +[ + "pixfutureBidAdapter", + "appnexusBidAdapter", + "consentManagement", + "gdprEnforcement" +] \ No newline at end of file diff --git a/modules/pixfutureBidAdapter.js b/modules/pixfutureBidAdapter.js index 4c4935e93a4..20992695dd5 100644 --- a/modules/pixfutureBidAdapter.js +++ b/modules/pixfutureBidAdapter.js @@ -14,13 +14,16 @@ import { transformBidderParamKeywords } from '../src/utils.js'; import {auctionManager} from '../src/auctionManager.js'; -import {hasPurpose1Consent} from '../src/utils/gpdr.js'; const SOURCE = 'pbjs'; const storageManager = getStorageManager({bidderCode: 'pixfuture'}); const USER_PARAMS = ['age', 'externalUid', 'segments', 'gender', 'dnt', 'language']; +let pixID = ''; +const GVLID = 839; + export const spec = { code: 'pixfuture', + gvlid: GVLID, hostname: 'https://gosrv.pixfuture.com', getHostname() { @@ -41,6 +44,10 @@ export const spec = { const tags = validBidRequests.map(bidToTag); const hostname = this.getHostname(); return validBidRequests.map((bidRequest) => { + if (bidRequest.params.pix_id) { + pixID = bidRequest.params.pix_id + } + let referer = ''; if (bidderRequest && bidderRequest.refererInfo) { referer = bidderRequest.refererInfo.page || ''; @@ -123,7 +130,7 @@ export const spec = { const ret = { url: `${hostname}/pixservices`, method: 'POST', - options: {withCredentials: false}, + options: {withCredentials: true}, data: { v: $$PREBID_GLOBAL$$.version, pageUrl: referer, @@ -162,15 +169,39 @@ export const spec = { return bids; }, - getUserSyncs: function (syncOptions, bid, gdprConsent) { - var pixid = ''; - if (typeof bid[0] === 'undefined' || bid[0] === null) { pixid = '0'; } else { pixid = bid[0].body.pix_id; } - if (syncOptions.iframeEnabled && hasPurpose1Consent(gdprConsent)) { - return [{ + getUserSyncs: function (syncOptions, bid, gdprConsent, uspConsent) { + const syncs = []; + + let syncurl = 'pixid=' + pixID; + let gdpr = (gdprConsent && gdprConsent.gdprApplies) ? 1 : 0; + let consent = gdprConsent ? encodeURIComponent(gdprConsent.consentString || '') : ''; + + // Attaching GDPR Consent Params in UserSync url + syncurl += '&gdprconcent=' + gdpr + '&adsync=' + consent; + + // CCPA + if (uspConsent) { + syncurl += '&us_privacy=' + encodeURIComponent(uspConsent); + } + + // coppa compliance + if (config.getConfig('coppa') === true) { + syncurl += '&coppa=1'; + } + + if (syncOptions.iframeEnabled) { + syncs.push({ type: 'iframe', - url: 'https://gosrv.pixfuture.com/cookiesync?adsync=' + gdprConsent.consentString + '&pixid=' + pixid + '&gdprconcent=' + gdprConsent.gdprApplies - }]; + url: 'https://gosrv.pixfuture.com/cookiesync?f=b&' + syncurl + }); + } else { + syncs.push({ + type: 'image', + url: 'https://gosrv.pixfuture.com/cookiesync?f=i&' + syncurl + }); } + + return syncs; } }; diff --git a/modules/pixfutureBidAdapter.md b/modules/pixfutureBidAdapter.md index b7911d6c9bb..42b033c6883 100644 --- a/modules/pixfutureBidAdapter.md +++ b/modules/pixfutureBidAdapter.md @@ -1,5 +1,10 @@ +--- +gdpr_supported: true +usp_supported: true +coppa_supported: true +schain_supported: true +--- # Overview - ``` Module Name: PixFuture Bid Adapter Module Type: Bidder Adapter From 5da8c5de63959eb18476c0bf7a081f3253830680 Mon Sep 17 00:00:00 2001 From: Vitali Ioussoupov <84333122+pixfuture-media@users.noreply.github.com> Date: Wed, 5 Oct 2022 10:27:46 -0400 Subject: [PATCH 2/5] Delete modules.json --- modules.json | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 modules.json diff --git a/modules.json b/modules.json deleted file mode 100644 index 21a50f46eb0..00000000000 --- a/modules.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - "pixfutureBidAdapter", - "appnexusBidAdapter", - "consentManagement", - "gdprEnforcement" -] \ No newline at end of file From 41a678c49366db73e5c3ffabc78c45d4ee4ea432 Mon Sep 17 00:00:00 2001 From: polischukPix Date: Wed, 12 Oct 2022 09:28:29 -0400 Subject: [PATCH 3/5] MD file cleanup --- modules/pixfutureBidAdapter.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/modules/pixfutureBidAdapter.md b/modules/pixfutureBidAdapter.md index 42b033c6883..bfa0ec3475d 100644 --- a/modules/pixfutureBidAdapter.md +++ b/modules/pixfutureBidAdapter.md @@ -1,9 +1,3 @@ ---- -gdpr_supported: true -usp_supported: true -coppa_supported: true -schain_supported: true ---- # Overview ``` Module Name: PixFuture Bid Adapter From 763829d661c4d9548311ead45d011afa071b1918 Mon Sep 17 00:00:00 2001 From: polischukPix Date: Thu, 13 Oct 2022 09:06:53 -0400 Subject: [PATCH 4/5] MD file cleanup --- modules/pixfutureBidAdapter.md | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/pixfutureBidAdapter.md b/modules/pixfutureBidAdapter.md index bfa0ec3475d..b7911d6c9bb 100644 --- a/modules/pixfutureBidAdapter.md +++ b/modules/pixfutureBidAdapter.md @@ -1,4 +1,5 @@ # Overview + ``` Module Name: PixFuture Bid Adapter Module Type: Bidder Adapter From 77253cfd402d1c1ac3f384365f416c96047686ba Mon Sep 17 00:00:00 2001 From: Chris Huie Date: Thu, 13 Oct 2022 09:27:27 -0700 Subject: [PATCH 5/5] kick off cicrleci --- modules/pixfutureBidAdapter.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/pixfutureBidAdapter.js b/modules/pixfutureBidAdapter.js index 20992695dd5..41b1151e72a 100644 --- a/modules/pixfutureBidAdapter.js +++ b/modules/pixfutureBidAdapter.js @@ -1,8 +1,8 @@ -import {registerBidder} from '../src/adapters/bidderFactory.js'; -import {getStorageManager} from '../src/storageManager.js'; -import {BANNER} from '../src/mediaTypes.js'; -import {config} from '../src/config.js'; -import {find, includes} from '../src/polyfill.js'; +import { registerBidder } from '../src/adapters/bidderFactory.js'; +import { getStorageManager } from '../src/storageManager.js'; +import { BANNER } from '../src/mediaTypes.js'; +import { config } from '../src/config.js'; +import { find, includes } from '../src/polyfill.js'; import { convertCamelToUnderscore, deepAccess, @@ -13,7 +13,7 @@ import { isPlainObject, transformBidderParamKeywords } from '../src/utils.js'; -import {auctionManager} from '../src/auctionManager.js'; +import { auctionManager } from '../src/auctionManager.js'; const SOURCE = 'pbjs'; const storageManager = getStorageManager({bidderCode: 'pixfuture'});