prebid.js 6.1.0 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +1 -1
- package/README.md +1 -1
- package/browsers.json +13 -29
- package/gulpfile.js +87 -82
- package/integrationExamples/gpt/weboramaRtdProvider_example.html +23 -14
- package/karma.conf.maker.js +2 -2
- package/modules/33acrossBidAdapter.js +189 -102
- package/modules/adagioBidAdapter.js +1 -1
- package/modules/addefendBidAdapter.js +1 -0
- package/modules/adkernelBidAdapter.js +146 -61
- package/modules/adlooxAdServerVideo.js +2 -2
- package/modules/adlooxAnalyticsAdapter.js +4 -4
- package/modules/admanBidAdapter.js +1 -0
- package/modules/admixerBidAdapter.js +3 -2
- package/modules/adnuntiusBidAdapter.js +5 -2
- package/modules/adomikAnalyticsAdapter.js +6 -0
- package/modules/adplusBidAdapter.js +203 -0
- package/modules/adplusBidAdapter.md +39 -0
- package/modules/adxcgBidAdapter.js +311 -359
- package/modules/adxcgBidAdapter.md +22 -21
- package/modules/adyoulikeBidAdapter.js +20 -11
- package/modules/aniviewBidAdapter.js +1 -1
- package/modules/appnexusBidAdapter.js +19 -3
- package/modules/beachfrontBidAdapter.js +14 -17
- package/modules/beopBidAdapter.js +6 -4
- package/modules/bidViewability.js +3 -3
- package/modules/bidViewabilityIO.js +3 -3
- package/modules/bliinkBidAdapter.js +1 -1
- package/modules/colossussspBidAdapter.js +7 -0
- package/modules/compassBidAdapter.js +201 -0
- package/modules/compassBidAdapter.md +79 -0
- package/modules/consentManagement.js +7 -1
- package/modules/craftBidAdapter.js +5 -3
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/currency.js +2 -2
- package/modules/cwireBidAdapter.js +3 -0
- package/modules/dailyhuntBidAdapter.js +435 -0
- package/modules/dailyhuntBidAdapter.md +4 -0
- package/modules/dchain.js +149 -0
- package/modules/dchain.md +45 -0
- package/modules/docereeBidAdapter.js +10 -1
- package/modules/docereeBidAdapter.md +2 -0
- package/modules/dspxBidAdapter.js +1 -1
- package/modules/emx_digitalBidAdapter.js +9 -1
- package/modules/engageyaBidAdapter.js +1 -1
- package/modules/feedadBidAdapter.js +2 -2
- package/modules/feedadBidAdapter.md +4 -2
- package/modules/freewheel-sspBidAdapter.js +6 -0
- package/modules/futureads.md +48 -0
- package/modules/glimpseBidAdapter.js +16 -3
- package/modules/goldbachBidAdapter.js +1176 -0
- package/modules/goldbachBidAdapter.md +151 -0
- package/modules/gptPreAuction.js +55 -7
- package/modules/gridBidAdapter.js +4 -3
- package/modules/gumgumBidAdapter.js +7 -3
- package/modules/improvedigitalBidAdapter.js +19 -3
- package/modules/instreamTracking.js +4 -4
- package/modules/intersectionRtdProvider.js +114 -0
- package/modules/invibesBidAdapter.js +64 -14
- package/modules/invibesBidAdapter.md +2 -1
- package/modules/ipromBidAdapter.js +79 -0
- package/modules/ixBidAdapter.js +53 -18
- package/modules/kinessoIdSystem.js +1 -1
- package/modules/limelightDigitalBidAdapter.js +3 -1
- package/modules/livewrappedAnalyticsAdapter.js +3 -1
- package/modules/livewrappedBidAdapter.js +8 -2
- package/modules/loglyliftBidAdapter.js +79 -0
- package/modules/loglyliftBidAdapter.md +55 -0
- package/modules/lotamePanoramaIdSystem.js +80 -8
- package/modules/luponmediaBidAdapter.js +570 -0
- package/modules/mediasquareBidAdapter.js +1 -9
- package/modules/missenaBidAdapter.js +89 -0
- package/modules/nextMillenniumBidAdapter.js +37 -7
- package/modules/optimeraRtdProvider.js +8 -1
- package/modules/ozoneBidAdapter.js +21 -64
- package/modules/prebidServerBidAdapter/index.js +16 -12
- package/modules/pubgeniusBidAdapter.js +1 -1
- package/modules/pubmaticBidAdapter.js +3 -3
- package/modules/pubxaiAnalyticsAdapter.js +17 -0
- package/modules/relaidoBidAdapter.js +86 -65
- package/modules/richaudienceBidAdapter.js +2 -3
- package/modules/rtdModule/index.js +48 -18
- package/modules/rubiconBidAdapter.js +31 -19
- package/modules/sharedIdSystem.js +27 -1
- package/modules/smaatoBidAdapter.js +4 -1
- package/modules/smartxBidAdapter.js +17 -1
- package/modules/tappxBidAdapter.js +3 -1
- package/modules/targetVideoBidAdapter.js +187 -0
- package/modules/targetVideoBidAdapter.md +34 -0
- package/modules/telariaBidAdapter.js +2 -2
- package/modules/trustxBidAdapter.js +8 -16
- package/modules/undertoneBidAdapter.js +8 -1
- package/modules/userId/index.js +27 -2
- package/modules/ventes.md +71 -0
- package/modules/ventesBidAdapter.js +104 -64
- package/modules/ventesBidAdapter.md +0 -1
- package/modules/vidoomyBidAdapter.js +16 -10
- package/modules/visxBidAdapter.js +19 -2
- package/modules/visxBidAdapter.md +4 -6
- package/modules/weboramaRtdProvider.js +288 -73
- package/modules/weboramaRtdProvider.md +27 -10
- package/modules/yahoosspBidAdapter.js +5 -1
- package/modules/yahoosspBidAdapter.md +1 -1
- package/modules/yieldmoBidAdapter.js +23 -5
- package/modules/yieldoneBidAdapter.js +115 -11
- package/modules/zetaSspBidAdapter.md +33 -1
- package/modules/zeta_global_sspAnalyticsAdapter.js +97 -0
- package/modules/zeta_global_sspAnalyticsAdapter.md +24 -0
- package/modules/zeta_global_sspBidAdapter.js +22 -1
- package/package.json +1 -1
- package/plugins/pbjsGlobals.js +28 -1
- package/src/auction.js +5 -4
- package/src/config.js +27 -3
- package/src/prebid.js +3 -2
- package/src/targeting.js +24 -3
- package/src/utils.js +53 -8
- package/test/helpers/prebidGlobal.js +1 -0
- package/test/spec/config_spec.js +279 -0
- package/test/spec/integration/faker/googletag.js +6 -0
- package/test/spec/modules/33acrossBidAdapter_spec.js +300 -78
- package/test/spec/modules/adlooxAnalyticsAdapter_spec.js +6 -6
- package/test/spec/modules/adnuntiusBidAdapter_spec.js +35 -0
- package/test/spec/modules/adomikAnalyticsAdapter_spec.js +6 -0
- package/test/spec/modules/adplusBidAdapter_spec.js +213 -0
- package/test/spec/modules/adxcgBidAdapter_spec.js +820 -571
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +75 -0
- package/test/spec/modules/appnexusBidAdapter_spec.js +49 -1
- package/test/spec/modules/beachfrontBidAdapter_spec.js +65 -1
- package/test/spec/modules/beopBidAdapter_spec.js +1 -1
- package/test/spec/modules/bidViewabilityIO_spec.js +2 -2
- package/test/spec/modules/bidViewability_spec.js +4 -4
- package/test/spec/modules/colossussspBidAdapter_spec.js +9 -0
- package/test/spec/modules/compassBidAdapter_spec.js +397 -0
- package/test/spec/modules/consentManagement_spec.js +20 -0
- package/test/spec/modules/cwireBidAdapter_spec.js +10 -8
- package/test/spec/modules/dailyhuntBidAdapter_spec.js +404 -0
- package/test/spec/modules/dchain_spec.js +329 -0
- package/test/spec/modules/docereeBidAdapter_spec.js +9 -1
- package/test/spec/modules/emx_digitalBidAdapter_spec.js +10 -0
- package/test/spec/modules/feedadBidAdapter_spec.js +15 -0
- package/test/spec/modules/freewheel-sspBidAdapter_spec.js +19 -0
- package/test/spec/modules/goldbachBidAdapter_spec.js +1359 -0
- package/test/spec/modules/gptPreAuction_spec.js +177 -2
- package/test/spec/modules/gumgumBidAdapter_spec.js +6 -0
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +3 -1
- package/test/spec/modules/intersectionRtdProvider_spec.js +141 -0
- package/test/spec/modules/invibesBidAdapter_spec.js +148 -4
- package/test/spec/modules/ipromBidAdapter_spec.js +195 -0
- package/test/spec/modules/ixBidAdapter_spec.js +112 -62
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +84 -23
- package/test/spec/modules/livewrappedAnalyticsAdapter_spec.js +22 -0
- package/test/spec/modules/livewrappedBidAdapter_spec.js +31 -0
- package/test/spec/modules/loglyliftBidAdapter_spec.js +172 -0
- package/test/spec/modules/lotamePanoramaIdSystem_spec.js +227 -0
- package/test/spec/modules/luponmediaBidAdapter_spec.js +412 -0
- package/test/spec/modules/mediasquareBidAdapter_spec.js +4 -4
- package/test/spec/modules/missenaBidAdapter_spec.js +134 -0
- package/test/spec/modules/nextMillenniumBidAdapter_spec.js +26 -1
- package/test/spec/modules/optimeraRtdProvider_spec.js +14 -1
- package/test/spec/modules/ozoneBidAdapter_spec.js +43 -31
- package/test/spec/modules/prebidServerBidAdapter_spec.js +43 -0
- package/test/spec/modules/pubgeniusBidAdapter_spec.js +3 -3
- package/test/spec/modules/pubmaticBidAdapter_spec.js +1 -1
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +11 -0
- package/test/spec/modules/realTimeDataModule_spec.js +135 -49
- package/test/spec/modules/relaidoBidAdapter_spec.js +71 -63
- package/test/spec/modules/richaudienceBidAdapter_spec.js +2 -2
- package/test/spec/modules/rubiconBidAdapter_spec.js +65 -9
- package/test/spec/modules/sharedIdSystem_spec.js +52 -6
- package/test/spec/modules/smaatoBidAdapter_spec.js +31 -0
- package/test/spec/modules/smartxBidAdapter_spec.js +9 -0
- package/test/spec/modules/tappxBidAdapter_spec.js +4 -0
- package/test/spec/modules/targetVideoBidAdapter_spec.js +96 -0
- package/test/spec/modules/userId_spec.js +51 -0
- package/test/spec/modules/visxBidAdapter_spec.js +120 -4
- package/test/spec/modules/weboramaRtdProvider_spec.js +408 -214
- package/test/spec/modules/yahoosspBidAdapter_spec.js +28 -1
- package/test/spec/modules/yieldoneBidAdapter_spec.js +299 -53
- package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +427 -0
- package/test/spec/modules/zeta_global_sspBidAdapter_spec.js +33 -1
- package/test/spec/unit/core/targeting_spec.js +116 -0
- package/test/spec/utils_spec.js +38 -0
- package/test/test_deps.js +3 -0
- package/test/test_index.js +1 -3
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import includes from 'core-js-pure/features/array/includes.js';
|
|
2
|
+
import { config } from '../src/config.js';
|
|
3
|
+
import { getHook } from '../src/hook.js';
|
|
4
|
+
import { _each, isStr, isArray, isPlainObject, hasOwn, deepClone, deepAccess, logWarn, logError } from '../src/utils.js';
|
|
5
|
+
|
|
6
|
+
const shouldBeAString = ' should be a string';
|
|
7
|
+
const shouldBeAnObject = ' should be an object';
|
|
8
|
+
const shouldBeAnArray = ' should be an Array';
|
|
9
|
+
const shouldBeValid = ' is not a valid dchain property';
|
|
10
|
+
const MODE = {
|
|
11
|
+
STRICT: 'strict',
|
|
12
|
+
RELAXED: 'relaxed',
|
|
13
|
+
OFF: 'off'
|
|
14
|
+
};
|
|
15
|
+
const MODES = []; // an array of modes
|
|
16
|
+
_each(MODE, mode => MODES.push(mode));
|
|
17
|
+
|
|
18
|
+
export function checkDchainSyntax(bid, mode) {
|
|
19
|
+
let dchainObj = deepClone(bid.meta.dchain);
|
|
20
|
+
let failPrefix = 'Detected something wrong in bid.meta.dchain object for bid:';
|
|
21
|
+
let failMsg = '';
|
|
22
|
+
const dchainPropList = ['ver', 'complete', 'nodes', 'ext'];
|
|
23
|
+
|
|
24
|
+
function appendFailMsg(msg) {
|
|
25
|
+
failMsg += '\n' + msg;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function printFailMsg() {
|
|
29
|
+
if (mode === MODE.STRICT) {
|
|
30
|
+
logError(failPrefix, bid, '\n', dchainObj, failMsg);
|
|
31
|
+
} else {
|
|
32
|
+
logWarn(failPrefix, bid, `\n`, dchainObj, failMsg);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
let dchainProps = Object.keys(dchainObj);
|
|
37
|
+
dchainProps.forEach(prop => {
|
|
38
|
+
if (!includes(dchainPropList, prop)) {
|
|
39
|
+
appendFailMsg(`dchain.${prop}` + shouldBeValid);
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
if (dchainObj.complete !== 0 && dchainObj.complete !== 1) {
|
|
44
|
+
appendFailMsg(`dchain.complete should be 0 or 1`);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (!isStr(dchainObj.ver)) {
|
|
48
|
+
appendFailMsg(`dchain.ver` + shouldBeAString);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (hasOwn(dchainObj, 'ext')) {
|
|
52
|
+
if (!isPlainObject(dchainObj.ext)) {
|
|
53
|
+
appendFailMsg(`dchain.ext` + shouldBeAnObject);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!isArray(dchainObj.nodes)) {
|
|
58
|
+
appendFailMsg(`dchain.nodes` + shouldBeAnArray);
|
|
59
|
+
printFailMsg();
|
|
60
|
+
if (mode === MODE.STRICT) return false;
|
|
61
|
+
} else {
|
|
62
|
+
const nodesPropList = ['asi', 'bsid', 'rid', 'name', 'domain', 'ext'];
|
|
63
|
+
dchainObj.nodes.forEach((node, index) => {
|
|
64
|
+
if (!isPlainObject(node)) {
|
|
65
|
+
appendFailMsg(`dchain.nodes[${index}]` + shouldBeAnObject);
|
|
66
|
+
} else {
|
|
67
|
+
let nodeProps = Object.keys(node);
|
|
68
|
+
nodeProps.forEach(prop => {
|
|
69
|
+
if (!includes(nodesPropList, prop)) {
|
|
70
|
+
appendFailMsg(`dchain.nodes[${index}].${prop}` + shouldBeValid);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (prop === 'ext') {
|
|
74
|
+
if (!isPlainObject(node.ext)) {
|
|
75
|
+
appendFailMsg(`dchain.nodes[${index}].ext` + shouldBeAnObject);
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
if (!isStr(node[prop])) {
|
|
79
|
+
appendFailMsg(`dchain.nodes[${index}].${prop}` + shouldBeAString);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (failMsg.length > 0) {
|
|
88
|
+
printFailMsg();
|
|
89
|
+
if (mode === MODE.STRICT) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
return true;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function isValidDchain(bid) {
|
|
97
|
+
let mode = MODE.STRICT;
|
|
98
|
+
const dchainConfig = config.getConfig('dchain');
|
|
99
|
+
|
|
100
|
+
if (dchainConfig && isStr(dchainConfig.validation) && MODES.indexOf(dchainConfig.validation) != -1) {
|
|
101
|
+
mode = dchainConfig.validation;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (mode === MODE.OFF) {
|
|
105
|
+
return true;
|
|
106
|
+
} else {
|
|
107
|
+
return checkDchainSyntax(bid, mode);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function addBidResponseHook(fn, adUnitCode, bid) {
|
|
112
|
+
const basicDchain = {
|
|
113
|
+
ver: '1.0',
|
|
114
|
+
complete: 0,
|
|
115
|
+
nodes: []
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
if (deepAccess(bid, 'meta.networkId') && deepAccess(bid, 'meta.networkName')) {
|
|
119
|
+
basicDchain.nodes.push({ name: bid.meta.networkName, bsid: bid.meta.networkId.toString() });
|
|
120
|
+
}
|
|
121
|
+
basicDchain.nodes.push({ name: bid.bidderCode });
|
|
122
|
+
|
|
123
|
+
let bidDchain = deepAccess(bid, 'meta.dchain');
|
|
124
|
+
if (bidDchain && isPlainObject(bidDchain)) {
|
|
125
|
+
let result = isValidDchain(bid);
|
|
126
|
+
|
|
127
|
+
if (result) {
|
|
128
|
+
// extra check in-case mode is OFF and there is a setup issue
|
|
129
|
+
if (isArray(bidDchain.nodes)) {
|
|
130
|
+
bid.meta.dchain.nodes.push({ asi: bid.bidderCode });
|
|
131
|
+
} else {
|
|
132
|
+
logWarn('bid.meta.dchain.nodes did not exist or was not an array; did not append prebid dchain.', bid);
|
|
133
|
+
}
|
|
134
|
+
} else {
|
|
135
|
+
// remove invalid dchain
|
|
136
|
+
delete bid.meta.dchain;
|
|
137
|
+
}
|
|
138
|
+
} else {
|
|
139
|
+
bid.meta.dchain = basicDchain;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
fn(adUnitCode, bid);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function init() {
|
|
146
|
+
getHook('addBidResponse').before(addBidResponseHook, 35);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
init();
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# dchain module
|
|
2
|
+
|
|
3
|
+
Refer:
|
|
4
|
+
- https://iabtechlab.com/buyers-json-demand-chain/
|
|
5
|
+
|
|
6
|
+
## Sample code for dchain setConfig and dchain object
|
|
7
|
+
```
|
|
8
|
+
pbjs.setConfig({
|
|
9
|
+
"dchain": {
|
|
10
|
+
"validation": "strict"
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
bid.meta.dchain: {
|
|
17
|
+
"complete": 0,
|
|
18
|
+
"ver": "1.0",
|
|
19
|
+
"ext": {...},
|
|
20
|
+
"nodes": [{
|
|
21
|
+
"asi": "abc",
|
|
22
|
+
"bsid": "123",
|
|
23
|
+
"rid": "d4e5f6",
|
|
24
|
+
"name": "xyz",
|
|
25
|
+
"domain": "mno",
|
|
26
|
+
"ext": {...}
|
|
27
|
+
}, ...]
|
|
28
|
+
}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
The dchain module is not enabled by default as it may not be necessary for all publishers.
|
|
33
|
+
If required, dchain module can be included as following
|
|
34
|
+
```
|
|
35
|
+
$ gulp build --modules=dchain,pubmaticBidAdapter,openxBidAdapter,rubiconBidAdapter,sovrnBidAdapter
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The dchain module will validate a bidder's dchain object (if it was defined). Bidders should assign their dchain object into `bid.meta` field. If the dchain object is valid, it will remain in the bid object for later use.
|
|
39
|
+
|
|
40
|
+
If it was not defined, the dchain will create a default dchain object for prebid.
|
|
41
|
+
|
|
42
|
+
## Validation modes
|
|
43
|
+
- ```strict```: It is the default validation mode. In this mode, dchain object will not be accpeted from adapters if it is invalid. Errors are thrown for invalid dchain object.
|
|
44
|
+
- ```relaxed```: In this mode, errors are thrown for an invalid dchain object but the invalid dchain object is still accepted from adapters.
|
|
45
|
+
- ```off```: In this mode, no validations are performed and dchain object is accepted as is from adapters.
|
|
@@ -14,6 +14,13 @@ export const spec = {
|
|
|
14
14
|
const { placementId } = bid.params;
|
|
15
15
|
return !!placementId
|
|
16
16
|
},
|
|
17
|
+
isGdprConsentPresent: (bid) => {
|
|
18
|
+
const { gdpr, gdprConsent } = bid.params;
|
|
19
|
+
if (gdpr == '1') {
|
|
20
|
+
return !!gdprConsent
|
|
21
|
+
}
|
|
22
|
+
return true
|
|
23
|
+
},
|
|
17
24
|
buildRequests: (validBidRequests) => {
|
|
18
25
|
const serverRequests = [];
|
|
19
26
|
const { data } = config.getConfig('doceree.user')
|
|
@@ -21,7 +28,7 @@ export const spec = {
|
|
|
21
28
|
const encodedUserInfo = window.btoa(encodeURIComponent(JSON.stringify(data)))
|
|
22
29
|
|
|
23
30
|
validBidRequests.forEach(function(validBidRequest) {
|
|
24
|
-
const { publisherUrl, placementId } = validBidRequest.params;
|
|
31
|
+
const { publisherUrl, placementId, gdpr, gdprConsent } = validBidRequest.params;
|
|
25
32
|
const url = publisherUrl || page
|
|
26
33
|
let queryString = '';
|
|
27
34
|
queryString = tryAppendQueryString(queryString, 'id', placementId);
|
|
@@ -32,6 +39,8 @@ export const spec = {
|
|
|
32
39
|
queryString = tryAppendQueryString(queryString, 'prebidjs', true);
|
|
33
40
|
queryString = tryAppendQueryString(queryString, 'token', token);
|
|
34
41
|
queryString = tryAppendQueryString(queryString, 'requestId', validBidRequest.bidId);
|
|
42
|
+
queryString = tryAppendQueryString(queryString, 'gdpr', gdpr);
|
|
43
|
+
queryString = tryAppendQueryString(queryString, 'gdpr_consent', gdprConsent);
|
|
35
44
|
|
|
36
45
|
serverRequests.push({
|
|
37
46
|
method: 'GET',
|
|
@@ -25,6 +25,8 @@ var adUnits = [
|
|
|
25
25
|
params: {
|
|
26
26
|
placementId: 'DOC_7jm9j5eqkl0xvc5w', //required
|
|
27
27
|
publisherUrl: document.URL || window.location.href, //optional
|
|
28
|
+
gdpr: '1', //optional
|
|
29
|
+
gdprConsent:'CPQfU1jPQfU1jG0AAAENAwCAAAAAAAAAAAAAAAAAAAAA.IGLtV_T9fb2vj-_Z99_tkeYwf95y3p-wzhheMs-8NyZeH_B4Wv2MyvBX4JiQKGRgksjLBAQdtHGlcTQgBwIlViTLMYk2MjzNKJrJEilsbO2dYGD9Pn8HT3ZCY70-vv__7v3ff_3g', //optional
|
|
28
30
|
}
|
|
29
31
|
}
|
|
30
32
|
]
|
|
@@ -257,10 +257,18 @@ export const spec = {
|
|
|
257
257
|
tagid,
|
|
258
258
|
secure
|
|
259
259
|
};
|
|
260
|
+
|
|
261
|
+
// adding gpid support
|
|
262
|
+
let gpid = deepAccess(bid, 'ortb2Imp.ext.data.adserver.adslot');
|
|
263
|
+
if (!gpid) {
|
|
264
|
+
gpid = deepAccess(bid, 'ortb2Imp.ext.data.pbadslot');
|
|
265
|
+
}
|
|
266
|
+
if (gpid) {
|
|
267
|
+
data.ext = {gpid: gpid.toString()};
|
|
268
|
+
}
|
|
260
269
|
let typeSpecifics = isVideo ? { video: emxAdapter.buildVideo(bid) } : { banner: emxAdapter.buildBanner(bid) };
|
|
261
270
|
let bidfloorObj = bidfloor > 0 ? { bidfloor, bidfloorcur: DEFAULT_CUR } : {};
|
|
262
271
|
let emxBid = Object.assign(data, typeSpecifics, bidfloorObj);
|
|
263
|
-
|
|
264
272
|
emxImps.push(emxBid);
|
|
265
273
|
});
|
|
266
274
|
|
|
@@ -8,7 +8,7 @@ const BIDDER_CODE = 'engageya';
|
|
|
8
8
|
const ENDPOINT_URL = 'https://recs.engageya.com/rec-api/getrecs.json';
|
|
9
9
|
const ENDPOINT_METHOD = 'GET';
|
|
10
10
|
const SUPPORTED_SIZES = [
|
|
11
|
-
[100, 75], [236, 202], [100, 100], [130, 130], [200, 200], [250, 250], [300, 272], [300, 250], [300, 230], [300, 214], [300, 187], [300, 166], [300, 150], [300, 133], [300, 120], [400, 200], [300, 200], [250, 377], [620, 410], [207, 311], [310, 166], [310, 333], [190, 106], [228, 132], [300, 174], [80, 60], [600, 500], [600, 600], [1080, 610], [1080, 610], [624, 350], [650, 1168], [1080, 1920], [300, 374]
|
|
11
|
+
[100, 75], [236, 202], [100, 100], [130, 130], [200, 200], [250, 250], [300, 272], [300, 250], [300, 230], [300, 214], [300, 187], [300, 166], [300, 150], [300, 133], [300, 120], [400, 200], [300, 200], [250, 377], [620, 410], [207, 311], [310, 166], [310, 333], [190, 106], [228, 132], [300, 174], [80, 60], [600, 500], [600, 600], [1080, 610], [1080, 610], [624, 350], [650, 1168], [1080, 1920], [300, 374], [336, 280]
|
|
12
12
|
];
|
|
13
13
|
|
|
14
14
|
function getPageUrl(bidRequest, bidderRequest) {
|
|
@@ -176,13 +176,13 @@ function isMediaTypesEmpty(mediaTypes) {
|
|
|
176
176
|
* @return {FeedAdApiBidRequest}
|
|
177
177
|
*/
|
|
178
178
|
function createApiBidRParams(request) {
|
|
179
|
-
return {
|
|
179
|
+
return Object.assign({}, request.params, {
|
|
180
180
|
ad_type: 0,
|
|
181
181
|
client_token: request.params.clientToken,
|
|
182
182
|
placement_id: request.params.placementId,
|
|
183
183
|
sdk_version: `prebid_${VERSION}`,
|
|
184
184
|
app_hybrid: false,
|
|
185
|
-
};
|
|
185
|
+
});
|
|
186
186
|
}
|
|
187
187
|
|
|
188
188
|
/**
|
|
@@ -26,6 +26,7 @@ Prebid.JS adapter that connects to the FeedAd demand sources.
|
|
|
26
26
|
params: {
|
|
27
27
|
clientToken: 'your-client-token' // see below for more info
|
|
28
28
|
placementId: 'your-placement-id' // see below for more info
|
|
29
|
+
decoration: 'decoration parameters' // optional, see below for info
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
]
|
|
@@ -35,7 +36,8 @@ Prebid.JS adapter that connects to the FeedAd demand sources.
|
|
|
35
36
|
|
|
36
37
|
# Required Parameters
|
|
37
38
|
|
|
38
|
-
| Parameter
|
|
39
|
-
|
|
39
|
+
| Parameter | Description |
|
|
40
|
+
|---------------| ----------- |
|
|
40
41
|
| `clientToken` | Your FeedAd web client token. You can view your client token inside the FeedAd admin panel. |
|
|
41
42
|
| `placementId` | You can choose placement IDs yourself. A placement ID should be named after the ad position inside your product. For example, if you want to display an ad inside a list of news articles, you could name it "ad-news-overview".<br> A placement ID may consist of lowercase `a-z`, `0-9`, `-` and `_`. You do not have to manually create the placement IDs before using them. Just specify them within the code, and they will appear in the FeedAd admin panel after the first request. <br> [Learn more](/concept/feed_ad/index.html) about Placement IDs and how they are grouped to play the same Creative. |
|
|
43
|
+
| `decoration` | Optional. If you want to apply a [decoration](https://docs.feedad.com/web/feed_ad/#decorations) to the ad.
|
|
@@ -312,6 +312,12 @@ export const spec = {
|
|
|
312
312
|
requestParams._fw_us_privacy = bidderRequest.uspConsent;
|
|
313
313
|
}
|
|
314
314
|
|
|
315
|
+
// Add schain object
|
|
316
|
+
var schain = currentBidRequest.schain;
|
|
317
|
+
if (schain) {
|
|
318
|
+
requestParams.schain = schain;
|
|
319
|
+
}
|
|
320
|
+
|
|
315
321
|
var vastParams = currentBidRequest.params.vastUrlParams;
|
|
316
322
|
if (typeof vastParams === 'object') {
|
|
317
323
|
for (var key in vastParams) {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Overview
|
|
2
|
+
Module Name: Future Ads Bidder Adapter
|
|
3
|
+
Module Type: Bidder Adapter
|
|
4
|
+
Maintainer: contact@futureads.io
|
|
5
|
+
# Description
|
|
6
|
+
Connects to Future Ads demand source to fetch bids.
|
|
7
|
+
Banner and Video formats are supported.
|
|
8
|
+
Please use ```futureads``` as the bidder code.
|
|
9
|
+
# Test Parameters
|
|
10
|
+
```
|
|
11
|
+
var adUnits = [
|
|
12
|
+
{
|
|
13
|
+
code: 'desktop-banner-ad-div',
|
|
14
|
+
sizes: [[300, 250]], // a display size
|
|
15
|
+
bids: [
|
|
16
|
+
{
|
|
17
|
+
bidder: "futureads",
|
|
18
|
+
params: {
|
|
19
|
+
zone: '2eb6bd58-865c-47ce-af7f-a918108c3fd2'
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},{
|
|
24
|
+
code: 'mobile-banner-ad-div',
|
|
25
|
+
sizes: [[300, 50]], // a mobile size
|
|
26
|
+
bids: [
|
|
27
|
+
{
|
|
28
|
+
bidder: "futureads",
|
|
29
|
+
params: {
|
|
30
|
+
zone: '62211486-c50b-4356-9f0f-411778d31fcc'
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
},{
|
|
35
|
+
code: 'video-ad',
|
|
36
|
+
sizes: [[300, 50]],
|
|
37
|
+
mediaType: 'video',
|
|
38
|
+
bids: [
|
|
39
|
+
{
|
|
40
|
+
bidder: "futureads",
|
|
41
|
+
params: {
|
|
42
|
+
zone: 'ebeb1e79-8cb4-4473-b2d0-2e24b7ff47fd'
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
```
|
|
@@ -138,11 +138,17 @@ function getReferer(bidderRequest) {
|
|
|
138
138
|
function getGdprConsentChoice(bidderRequest) {
|
|
139
139
|
const hasGdprConsent =
|
|
140
140
|
hasValue(bidderRequest) &&
|
|
141
|
-
hasValue(bidderRequest.gdprConsent)
|
|
142
|
-
hasStringValue(bidderRequest.gdprConsent.consentString)
|
|
141
|
+
hasValue(bidderRequest.gdprConsent)
|
|
143
142
|
|
|
144
143
|
if (hasGdprConsent) {
|
|
145
|
-
|
|
144
|
+
const gdprConsent = bidderRequest.gdprConsent
|
|
145
|
+
const hasGdprApplies = hasBooleanValue(gdprConsent.gdprApplies)
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
consentString: gdprConsent.consentString || '',
|
|
149
|
+
vendorData: gdprConsent.vendorData || {},
|
|
150
|
+
gdprApplies: hasGdprApplies ? gdprConsent.gdprApplies : true,
|
|
151
|
+
}
|
|
146
152
|
}
|
|
147
153
|
|
|
148
154
|
return {
|
|
@@ -177,6 +183,13 @@ function hasValue(value) {
|
|
|
177
183
|
)
|
|
178
184
|
}
|
|
179
185
|
|
|
186
|
+
function hasBooleanValue(value) {
|
|
187
|
+
return (
|
|
188
|
+
hasValue(value) &&
|
|
189
|
+
typeof value === 'boolean'
|
|
190
|
+
)
|
|
191
|
+
}
|
|
192
|
+
|
|
180
193
|
function hasStringValue(value) {
|
|
181
194
|
return (
|
|
182
195
|
hasValue(value) &&
|