From c2f5030a3247d11cbcd4daceb535952490a88363 Mon Sep 17 00:00:00 2001 From: "dev adxcg.com" <31470944+adxcgcom@users.noreply.github.com> Date: Tue, 14 May 2019 12:57:00 +0000 Subject: [PATCH 1/7] adxcgBidAdapter - added pubcid --- modules/adxcgBidAdapter.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index 23808fa3be7..0a706441c5a 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -159,6 +159,12 @@ export const spec = { beaconParams.prebidBidIds = prebidBidIds.join(',') beaconParams.bidfloors = bidfloors.join(',') + if ((validBidRequests[0].userId && validBidRequests[0].userId.pubcid)) { + beaconParams.pubcid = validBidRequests[0].userId.pubcid; + } else if (validBidRequests[0].crumbs && validBidRequests[0].crumbs.pubcid) { + beaconParams.pubcid = bids[0].crumbs.pubcid; + } + let adxcgRequestUrl = url.format({ protocol: secure ? 'https' : 'http', hostname: secure ? 'hbps.adxcg.net' : 'hbp.adxcg.net', From 10cffbdae73cb86487f96406fb9730cd21bc7c1d Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Wed, 15 May 2019 15:35:31 +0000 Subject: [PATCH 2/7] mini fix --- modules/adxcgBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index 0a706441c5a..6253908b58e 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -162,7 +162,7 @@ export const spec = { if ((validBidRequests[0].userId && validBidRequests[0].userId.pubcid)) { beaconParams.pubcid = validBidRequests[0].userId.pubcid; } else if (validBidRequests[0].crumbs && validBidRequests[0].crumbs.pubcid) { - beaconParams.pubcid = bids[0].crumbs.pubcid; + beaconParams.pubcid = validBidRequests[0].crumbs.pubcid; } let adxcgRequestUrl = url.format({ From b626fdfde0d77ee3c1ad550964ee32321ee04f40 Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Fri, 17 May 2019 17:40:34 +0000 Subject: [PATCH 3/7] Update adxcgBidAdapter Added minimal change to restart CI process --- modules/adxcgBidAdapter.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index 6253908b58e..d6cf72ed2c4 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -11,6 +11,7 @@ import includes from 'core-js/library/fn/array/includes' * updated for gdpr compliance on 2018.05.22 -requires gdpr compliance module * updated to pass aditional auction and impression level parameters. added pass for video targeting parameters * updated to fix native support for image width/height and icon 2019.03.17 + * updated pubcid 2019.05.13 */ const BIDDER_CODE = 'adxcg' From 47cf6e1a64a9a6605ef3af5ae1056a023df5f5cb Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Tue, 28 May 2019 11:22:40 +0000 Subject: [PATCH 4/7] added passing tdid, updated pubcid --- modules/adxcgBidAdapter.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index d6cf72ed2c4..28e7d1874eb 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -160,10 +160,12 @@ export const spec = { beaconParams.prebidBidIds = prebidBidIds.join(',') beaconParams.bidfloors = bidfloors.join(',') - if ((validBidRequests[0].userId && validBidRequests[0].userId.pubcid)) { + if (utils.isStr(utils.deepAccess(validBidRequests, '0.userId.pubcid'))) { beaconParams.pubcid = validBidRequests[0].userId.pubcid; - } else if (validBidRequests[0].crumbs && validBidRequests[0].crumbs.pubcid) { - beaconParams.pubcid = validBidRequests[0].crumbs.pubcid; + } + + if (utils.isStr(utils.deepAccess(validBidRequests, '0.userId.tdid'))) { + beaconParams.tdid = validBidRequests[0].userId.tdid; } let adxcgRequestUrl = url.format({ From 1b11d894cb97674627bf7acf45d5fcb05c04375f Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Tue, 28 May 2019 21:43:30 +0000 Subject: [PATCH 5/7] unit test for userid support - pubcid, tdid --- test/spec/modules/adxcgBidAdapter_spec.js | 50 +++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/test/spec/modules/adxcgBidAdapter_spec.js b/test/spec/modules/adxcgBidAdapter_spec.js index 0277e0ab964..5bac9523b18 100644 --- a/test/spec/modules/adxcgBidAdapter_spec.js +++ b/test/spec/modules/adxcgBidAdapter_spec.js @@ -133,6 +133,56 @@ describe('AdxcgAdapter', function () { }) }) + describe('userid pubcid should be passed to querystring', function () { + let bid = [{ + 'bidder': 'adxcg', + 'params': { + 'adzoneid': '1' + }, + 'adUnitCode': 'adunit-code', + 'sizes': [[300, 250], [640, 360], [1, 1]], + 'bidId': '84ab500420319d', + 'bidderRequestId': '7101db09af0db2', + 'auctionId': '1d1a030790a475', + }] + + let bidderRequests = {}; + + bid[0].userId = {'pubcid': 'pubcidabcd'}; + + it('should send pubcid if available', function () { + let request = spec.buildRequests(bid, bidderRequests) + let parsedRequestUrl = url.parse(request.url) + let query = parsedRequestUrl.search + expect(query.pubcid).to.equal('pubcidabcd') + }) + }) + + describe('userid tdid should be passed to querystring', function () { + let bid = [{ + 'bidder': 'adxcg', + 'params': { + 'adzoneid': '1' + }, + 'adUnitCode': 'adunit-code', + 'sizes': [[300, 250], [640, 360], [1, 1]], + 'bidId': '84ab500420319d', + 'bidderRequestId': '7101db09af0db2', + 'auctionId': '1d1a030790a475', + }] + + let bidderRequests = {}; + + bid[0].userId = {'tdid': 'tdidabcd'}; + + it('should send pubcid if available', function () { + let request = spec.buildRequests(bid, bidderRequests) + let parsedRequestUrl = url.parse(request.url) + let query = parsedRequestUrl.search + expect(query.tdid).to.equal('tdidabcd'); + }) + }) + describe('response handler', function () { let BIDDER_REQUEST = { 'bidder': 'adxcg', From aa1cf512138cf65ef9174cfb081b31e04cd567d2 Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Tue, 28 May 2019 21:49:57 +0000 Subject: [PATCH 6/7] Update adxcgBidAdapter.js just to restart CircleCI --- modules/adxcgBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index 28e7d1874eb..879d60b16e2 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -11,7 +11,7 @@ import includes from 'core-js/library/fn/array/includes' * updated for gdpr compliance on 2018.05.22 -requires gdpr compliance module * updated to pass aditional auction and impression level parameters. added pass for video targeting parameters * updated to fix native support for image width/height and icon 2019.03.17 - * updated pubcid 2019.05.13 + * updated pubcid 2019.05.28 */ const BIDDER_CODE = 'adxcg' From 8356c6a3c7e25f5f78b7489b083b0169502bf926 Mon Sep 17 00:00:00 2001 From: adxcgcom <31470944+adxcgcom@users.noreply.github.com> Date: Wed, 29 May 2019 06:08:39 +0000 Subject: [PATCH 7/7] Update adxcgBidAdapter.js just to restart CircleCI --- modules/adxcgBidAdapter.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/adxcgBidAdapter.js b/modules/adxcgBidAdapter.js index 879d60b16e2..34b5ea25fb0 100644 --- a/modules/adxcgBidAdapter.js +++ b/modules/adxcgBidAdapter.js @@ -11,7 +11,7 @@ import includes from 'core-js/library/fn/array/includes' * updated for gdpr compliance on 2018.05.22 -requires gdpr compliance module * updated to pass aditional auction and impression level parameters. added pass for video targeting parameters * updated to fix native support for image width/height and icon 2019.03.17 - * updated pubcid 2019.05.28 + * updated support for userid - pubcid,ttid 2019.05.28 */ const BIDDER_CODE = 'adxcg'