Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge master #3

Merged
merged 44 commits into from
May 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
876172b
domain change (#8318)
stsepelin Apr 26, 2022
801c2d7
nexx360 Bid Adapter : gvlid added and params updated with bidfloor an…
gchicoye Apr 26, 2022
d953eaa
Evolution Bid Adapter: add id5id (#8324)
e-volution-tech Apr 26, 2022
5504cda
MobfoxPB Adapter: update adapter to comply with Prebid 5 changes (#8297)
mobfxoHB Apr 28, 2022
e1f3239
Prebid 6.22.0 release
prebidjs-release Apr 28, 2022
061eb3c
Increment version to 6.23.0-pre
prebidjs-release Apr 28, 2022
d90b454
tmax & addtl consent improvements (#8346)
jbartek25 Apr 29, 2022
b728298
Jixie Bid adapter: support more userids (#8314)
jxdeveloper1 Apr 29, 2022
0095646
Criteo : get rid of getLegacyFpd call (#8344)
leonardlabat Apr 29, 2022
75b8f20
Triplelift Bid Adapter: Updating Prebid floors logic and unit test co…
patrickloughrey Apr 29, 2022
f8c8fca
33Across user id sub-module: initial release (#8335)
carlosfelix May 2, 2022
506b070
Adagio Bid Adapter: Price floor support improvements (#8355)
osazos May 2, 2022
880b089
Prebid Server Adapter: add native asset id parameter (#8317)
jsnellbaker May 2, 2022
49118b8
AdYouLike Bidder: clean on video ad treatment (#8352)
guiann May 3, 2022
0a5fc05
Automatad Bid Adapter: make placementId param optional (#8269)
May 3, 2022
21e73bb
Aseal Bid Adapter: add session id & update request payload (#8231)
May 3, 2022
0561d2a
removed PubNX bid adaptor (#8353)
prebid-pubnx May 3, 2022
ceaa4ba
JwPlayer RTD Module: Support cids (#8349)
karimMourra May 3, 2022
32f4a5c
Insticator Bid adapter: added support for additional attributes (#8342)
EugeneVigonny May 3, 2022
68a3c4e
Sovrn Bid Adapter: Enforce required video parameters (#8276)
cpabst May 4, 2022
e1169ec
Livewrapped adapter: Original ortb2 config was unintentionally modifi…
bjorn-lw May 4, 2022
d632468
MimuteMedia - Add support for Banner (#8292)
noamtzu May 4, 2022
97ae929
UserID module: fix bug with userID init sometimes getting stuck in an…
dgirardi May 4, 2022
645abee
Adf adapter: add coppa signal support (#8375)
Pupis May 5, 2022
2697d17
bizzclickAdapter refactiring, remove privacy settings duplication (#8…
BizzClick May 5, 2022
ce156c7
Bid Richemedia adapter : use a 1x1 creative (#8327)
yki-t May 6, 2022
2840e3e
Prebid 6.23.0 release
prebidjs-release May 6, 2022
8e903db
Increment version to 6.24.0-pre
prebidjs-release May 6, 2022
1a2ed86
Adman Bid Adapter: add support for idx UserID(#8370)
SmartyAdman May 6, 2022
0f87f02
Prebid core: do not enforce adapters' mediaType support for PBS bids …
dgirardi May 6, 2022
a47650b
Sovrn Bid Adapter: handle multiple seatbids in response (#8378)
cpabst May 9, 2022
028843d
Alkimi Bid Adapter: add new bid adapter (#8326)
pro-nsk May 9, 2022
7f0a56b
talkads Bid Adapter: update params access in case of different ad ser…
natexo-technical-team May 9, 2022
6dbad9a
BidWatch Analytics Adapter: add new analytics adapter (#8302)
matthieularere-msq May 10, 2022
c66840c
Native ads: change asset param (#8371)
jbartek25 May 10, 2022
bcfb127
TPMN Bidder Adapter: write id in first party domain; force syncs wit…
tpmn-admin May 10, 2022
a322c34
Jixie Bid Adapter: send device info (#8397)
jxdeveloper1 May 10, 2022
87b7dc8
LKQD Bid Adapter: remove device ip bug (#8400)
david-carver May 10, 2022
8a4fd44
cpex Id System: initial release (#8364)
EskelCz May 10, 2022
04fefef
UserID module: graceful handling of exceptions from ID submodules (#8…
dgirardi May 10, 2022
2651c7b
removing floor field from bid request when not defined (#8398)
mbouallagui May 10, 2022
b74cd10
passing floors signal to PBS (#8392)
robertrmartinez May 10, 2022
9b22db3
add adunit floor min price floors (#8396)
robertrmartinez May 10, 2022
14c9bc7
AirGrid RTD module: Support for xandr / appnexus auction level keywo…
ydennisy May 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions integrationExamples/gpt/userId_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"301": true, // zeotapIdPlus
"91": true, // criteo
"737": true, // amxId
"58": true, // 33acrossId
}
}
}
Expand Down Expand Up @@ -128,6 +129,17 @@
"expires": 30
}
},
{
"name": "33acrossId",
"params": {
"pid": '0'
},
"storage": {
"type": 'html5',
"name": '33acrossId',
"expires": 90
}
},
{
"name": "intentIqId",
"params": {
Expand Down
3 changes: 3 additions & 0 deletions modules/.submodules.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"userId": [
"33acrossIdSystem",
"admixerIdSystem",
"adtelligentIdSystem",
"akamaiDAPIdSystem",
"amxIdSystem",
"britepoolIdSystem",
"connectIdSystem",
"cpexIdSystem",
"criteoIdSystem",
"dacIdSystem",
"deepintentDpesIdSystem",
Expand Down Expand Up @@ -48,6 +50,7 @@
"dfpAdServerVideo"
],
"rtdModule": [
"airgridRtdProvider",
"browsiRtdProvider",
"dgkeywordRtdProvider",
"geoedgeRtdProvider",
Expand Down
115 changes: 115 additions & 0 deletions modules/33acrossIdSystem.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
/**
* This module adds 33acrossId to the User ID module
* The {@link module:modules/userId} module is required
* @module modules/33acrossIdSystem
* @requires module:modules/userId
*/

import { logMessage, logError } from '../src/utils.js';
import { ajaxBuilder } from '../src/ajax.js';
import { submodule } from '../src/hook.js';
import { uspDataHandler } from '../src/adapterManager.js';

const MODULE_NAME = '33acrossId';
const API_URL = 'https://lexicon.33across.com/v1/envelope';
const AJAX_TIMEOUT = 10000;

function getEnvelope(response) {
if (!response.succeeded) {
logError(`${MODULE_NAME}: Unsuccessful response`);

return;
}

if (!response.data.envelope) {
logMessage(`${MODULE_NAME}: No envelope was received`);

return;
}

return response.data.envelope;
}

function calculateQueryStringParams(pid, gdprConsentData) {
const uspString = uspDataHandler.getConsentData();
const gdprApplies = Boolean(gdprConsentData?.gdprApplies);
const params = {
pid,
gdpr: Number(gdprApplies),
};

if (uspString) {
params.us_privacy = uspString;
}

if (gdprApplies) {
params.gdpr_consent = gdprConsentData.consentString || '';
}

return params;
}

/** @type {Submodule} */
export const thirthyThreeAcrossIdSubmodule = {
/**
* used to link submodule with config
* @type {string}
*/
name: MODULE_NAME,

gvlid: 58,

/**
* decode the stored id value for passing to bid requests
* @function
* @param {string} id
* @returns {{'33acrossId':{ envelope: string}}}
*/
decode(id) {
return {
[MODULE_NAME]: {
envelope: id
}
};
},

/**
* performs action to obtain id and return a value in the callback's response argument
* @function
* @param {SubmoduleConfig} [config]
* @returns {IdResponse|undefined}
*/
getId({ params = { } }, gdprConsentData) {
if (typeof params.pid !== 'string') {
logError(`${MODULE_NAME}: Submodule requires a partner ID to be defined`);

return;
}

const { pid, apiUrl = API_URL } = params;

return {
callback(cb) {
ajaxBuilder(AJAX_TIMEOUT)(apiUrl, {
success(response) {
let envelope;

try {
envelope = getEnvelope(JSON.parse(response))
} catch (err) {
logError(`${MODULE_NAME}: ID reading error:`, err);
}
cb(envelope);
},
error(err) {
logError(`${MODULE_NAME}: ID error response`, err);

cb();
}
}, calculateQueryStringParams(pid, gdprConsentData), { method: 'GET', withCredentials: true });
}
};
}
};

submodule('userId', thirthyThreeAcrossIdSubmodule);
53 changes: 53 additions & 0 deletions modules/33acrossIdSystem.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 33ACROSS ID

For help adding this submodule, please contact [PrebidUIM@33across.com](PrebidUIM@33across.com).

### Prebid Configuration

You can configure this submodule in your `userSync.userIds[]` configuration:

```javascript
pbjs.setConfig({
userSync: {
userIds: [
{
name: "33acrossId",
storage: {
name: "33acrossId",
type: "html5",
expires: 90,
refreshInSeconds: 8*3600
},
params: {
pid: "0010b00002GYU4eBAH",
},
},
],
},
});
```

| Parameters under `userSync.userIds[]` | Scope | Type | Description | Example |
| ---| --- | --- | --- | --- |
| name | Required | String | Name for the 33Across ID submodule | `"33acrossId"` | |
| storage | Required | Object | Configures how to cache User IDs locally in the browser | See [storage settings](#storage-settings) |
| params | Required | Object | Parameters for 33Across ID submodule | See [params](#params) |

### Storage Settings

The following settings are available for the `storage` property in the `userSync.userIds[]` object:

| Param name | Scope | Type | Description | Example |
| --- | --- | --- | --- | --- |
| name | Required | String| Name of the cookie or HTML5 local storage where the user ID will be stored | `"33acrossId"` |
| type | Required | String | `"html5"` (preferred) or `"cookie"` | `"html5"` |
| expires | Strongly Recommended | Number | How long (in days) the user ID information will be stored. 33Across recommends `90`. | `90` |
| refreshInSeconds | Strongly Recommended | Number | The interval (in seconds) for refreshing the user ID. 33Across recommends no more than 8 hours between refreshes. | `8*3600` |

### Params

The following settings are available in the `params` property in `userSync.userIds[]` object:

| Param name | Scope | Type | Description | Example |
| --- | --- | --- | --- | --- |
| pid | Required | String | Partner ID provided by 33Across | `"0010b00002GYU4eBAH"` |
50 changes: 45 additions & 5 deletions modules/adagioBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {createEidsArray} from './userId/eids.js';
import {BANNER, NATIVE, VIDEO} from '../src/mediaTypes.js';
import {Renderer} from '../src/Renderer.js';
import {OUTSTREAM} from '../src/video.js';
import { getGlobal } from '../src/prebidGlobal.js';

const BIDDER_CODE = 'adagio';
const LOG_PREFIX = 'Adagio:';
Expand All @@ -46,7 +47,6 @@ const MAX_SESS_DURATION = 30 * 60 * 1000;
const ADAGIO_PUBKEY = 'AL16XT44Sfp+8SHVF1UdC7hydPSMVLMhsYknKDdwqq+0ToDSJrP0+Qh0ki9JJI2uYm/6VEYo8TJED9WfMkiJ4vf02CW3RvSWwc35bif2SK1L8Nn/GfFYr/2/GG/Rm0vUsv+vBHky6nuuYls20Og0HDhMgaOlXoQ/cxMuiy5QSktp';
const ADAGIO_PUBKEY_E = 65537;
const CURRENCY = 'USD';
const DEFAULT_FLOOR = 0.1;

// This provide a whitelist and a basic validation
// of OpenRTB 2.5 options used by the Adagio SSP.
Expand Down Expand Up @@ -589,13 +589,13 @@ function _getFloors(bidRequest) {
const info = bidRequest.getFloor({
currency: CURRENCY,
mediaType,
size: []
size
});

floors.push(cleanObj({
mt: mediaType,
s: isArray(size) ? `${size[0]}x${size[1]}` : undefined,
f: (!isNaN(info.floor) && info.currency === CURRENCY) ? info.floor : DEFAULT_FLOOR
f: (!isNaN(info.floor) && info.currency === CURRENCY) ? info.floor : undefined
}));
}

Expand Down Expand Up @@ -869,7 +869,9 @@ function storeRequestInAdagioNS(bidRequest) {
}],
auctionId: bidRequest.auctionId,
pageviewId: internal.getPageviewId(),
printNumber
printNumber,
localPbjs: '$$PREBID_GLOBAL$$',
localPbjsRef: getGlobal()
});

// (legacy) Store internal adUnit information
Expand Down Expand Up @@ -937,7 +939,45 @@ export const spec = {
});

// Handle priceFloors module
bidRequest.floors = _getFloors(bidRequest);
const computedFloors = _getFloors(bidRequest);
if (isArray(computedFloors) && computedFloors.length) {
bidRequest.floors = computedFloors

if (deepAccess(bidRequest, 'mediaTypes.banner')) {
const bannerObj = bidRequest.mediaTypes.banner

const computeNewSizeArray = (sizeArr = []) => {
const size = { size: sizeArr, floor: null }
const bannerFloors = bidRequest.floors.filter(floor => floor.mt === BANNER)
const BannerSizeFloor = bannerFloors.find(floor => floor.s === sizeArr.join('x'))
size.floor = (bannerFloors) ? (BannerSizeFloor) ? BannerSizeFloor.f : bannerFloors[0].f : null
return size
}

// `bannerSizes`, internal property name
bidRequest.mediaTypes.banner.bannerSizes = (isArray(bannerObj.sizes[0]))
? bannerObj.sizes.map(sizeArr => {
return computeNewSizeArray(sizeArr)
})
: computeNewSizeArray(bannerObj.sizes)
}

if (deepAccess(bidRequest, 'mediaTypes.video')) {
const videoObj = bidRequest.mediaTypes.video
const videoFloors = bidRequest.floors.filter(floor => floor.mt === VIDEO);
const playerSize = (videoObj.playerSize && isArray(videoObj.playerSize[0])) ? videoObj.playerSize[0] : videoObj.playerSize
const videoSizeFloor = (playerSize) ? videoFloors.find(floor => floor.s === playerSize.join('x')) : undefined

bidRequest.mediaTypes.video.floor = (videoFloors) ? videoSizeFloor ? videoSizeFloor.f : videoFloors[0].f : null
}

if (deepAccess(bidRequest, 'mediaTypes.native')) {
const nativeFloors = bidRequest.floors.filter(floor => floor.mt === NATIVE);
if (nativeFloors.length) {
bidRequest.mediaTypes.native.floor = nativeFloors[0].f
}
}
}

if (deepAccess(bidRequest, 'mediaTypes.video')) {
_buildVideoBidRequest(bidRequest);
Expand Down
5 changes: 5 additions & 0 deletions modules/adfBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,11 @@ export const spec = {
request.is_debug = !!test;
request.test = 1;
}

if (config.getConfig('coppa')) {
deepSetValue(request, 'regs.coppa', 1);
}

if (deepAccess(bidderRequest, 'gdprConsent.gdprApplies') !== undefined) {
deepSetValue(request, 'user.ext.consent', bidderRequest.gdprConsent.consentString);
deepSetValue(request, 'regs.ext.gdpr', bidderRequest.gdprConsent.gdprApplies & 1);
Expand Down
1 change: 1 addition & 0 deletions modules/admanBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ export const spec = {
if (bid.userId) {
getUserId(placement.eids, bid.userId.uid2 && bid.userId.uid2.id, 'uidapi.com');
getUserId(placement.eids, bid.userId.lotamePanoramaId, 'lotame.com');
getUserId(placement.eids, bid.userId.idx, 'idx.lat');
}
if (traff === VIDEO) {
placement.playerSize = bid.mediaTypes[VIDEO].playerSize;
Expand Down
10 changes: 1 addition & 9 deletions modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,6 @@ function getTrackers(eventsArray, jsTrackers) {
return result;
}

function getVideoAd(response) {
var adJson = {};
if (typeof response.Ad === 'string' && response.Ad.indexOf('\/\*PREBID\*\/') > 0) {
adJson = JSON.parse(response.Ad.match(/\/\*PREBID\*\/(.*)\/\*PREBID\*\//)[1]);
return deepAccess(adJson, 'Content.MainVideo.Vast');
}
}

function getNativeAssets(response, nativeConfig) {
if (typeof response.Native === 'object') {
return response.Native;
Expand Down Expand Up @@ -486,7 +478,7 @@ function createBid(response, bidRequests) {
};

// retreive video response if present
const vast64 = response.Vast || getVideoAd(response);
const vast64 = response.Vast;
if (vast64) {
bid.width = response.Width;
bid.height = response.Height;
Expand Down
Loading