prebid.js 6.3.0 → 6.7.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/gulpfile.js +87 -74
- package/integrationExamples/gpt/amp/creative.html +11 -33
- package/karma.conf.maker.js +1 -1
- package/modules/.submodules.json +2 -1
- package/modules/adbookpspBidAdapter.js +27 -10
- package/modules/adhashBidAdapter.js +3 -3
- package/modules/adkernelBidAdapter.js +148 -62
- package/modules/adlooxAdServerVideo.js +2 -2
- package/modules/adlooxAnalyticsAdapter.js +4 -4
- package/modules/admanBidAdapter.js +10 -4
- package/modules/adomikAnalyticsAdapter.js +27 -9
- package/modules/adqueryIdSystem.js +103 -0
- package/modules/adqueryIdSystem.md +35 -0
- package/modules/adyoulikeBidAdapter.js +13 -9
- package/modules/aniviewBidAdapter.js +1 -1
- package/modules/beopBidAdapter.js +1 -1
- package/modules/bidViewability.js +3 -3
- package/modules/bidViewabilityIO.js +3 -3
- package/modules/bliinkBidAdapter.js +3 -2
- package/modules/colossussspBidAdapter.js +12 -8
- package/modules/colossussspBidAdapter.md +15 -1
- package/modules/compassBidAdapter.js +208 -0
- package/modules/compassBidAdapter.md +79 -0
- package/modules/consentManagement.js +7 -1
- package/modules/consumableBidAdapter.md +1 -1
- package/modules/criteoBidAdapter.js +1 -1
- package/modules/criteoIdSystem.js +29 -7
- package/modules/currency.js +2 -2
- package/modules/dailyhuntBidAdapter.js +435 -0
- package/modules/dailyhuntBidAdapter.md +4 -0
- package/modules/docereeBidAdapter.js +10 -1
- package/modules/docereeBidAdapter.md +2 -0
- package/modules/engageyaBidAdapter.js +1 -1
- package/modules/feedadBidAdapter.js +2 -2
- package/modules/feedadBidAdapter.md +4 -2
- package/modules/glimpseBidAdapter.js +66 -44
- package/modules/gnetBidAdapter.js +3 -3
- package/modules/gnetBidAdapter.md +4 -4
- package/modules/gptPreAuction.js +55 -7
- package/modules/gridBidAdapter.js +4 -3
- package/modules/gumgumBidAdapter.js +4 -4
- package/modules/idImportLibrary.js +45 -8
- package/modules/idImportLibrary.md +4 -0
- package/modules/improvedigitalBidAdapter.js +42 -4
- package/modules/instreamTracking.js +4 -4
- package/modules/invibesBidAdapter.js +49 -5
- package/modules/invibesBidAdapter.md +2 -1
- package/modules/ixBidAdapter.js +53 -18
- package/modules/jwplayerRtdProvider.js +71 -6
- package/modules/jwplayerRtdProvider.md +27 -11
- package/modules/kargoBidAdapter.js +2 -2
- package/modules/limelightDigitalBidAdapter.js +2 -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/nextMillenniumBidAdapter.js +11 -7
- package/modules/oguryBidAdapter.js +9 -2
- package/modules/onetagBidAdapter.js +4 -2
- package/modules/optimeraRtdProvider.js +8 -1
- package/modules/ozoneBidAdapter.js +21 -64
- package/modules/pilotxBidAdapter.js +147 -0
- package/modules/pilotxBidAdapter.md +50 -0
- package/modules/proxistoreBidAdapter.js +0 -2
- package/modules/pubgeniusBidAdapter.js +1 -1
- package/modules/pubmaticAnalyticsAdapter.js +16 -0
- package/modules/pubxaiAnalyticsAdapter.js +17 -0
- package/modules/richaudienceBidAdapter.js +3 -2
- package/modules/riseBidAdapter.js +1 -1
- package/modules/rtbhouseBidAdapter.js +14 -4
- package/modules/rtdModule/index.js +14 -15
- package/modules/rubiconAnalyticsAdapter.js +3 -2
- package/modules/rubiconBidAdapter.js +21 -11
- package/modules/seedingAllianceBidAdapter.js +3 -3
- package/modules/sharethroughBidAdapter.js +12 -17
- package/modules/showheroes-bsBidAdapter.js +13 -2
- package/modules/synacormediaBidAdapter.js +31 -10
- package/modules/tappxBidAdapter.js +8 -5
- package/modules/teadsBidAdapter.js +1 -2
- package/modules/telariaBidAdapter.js +2 -2
- package/modules/trustxBidAdapter.js +8 -16
- package/modules/userId/eids.js +7 -1
- package/modules/userId/userId.md +8 -0
- package/modules/viewability.js +177 -0
- package/modules/viewability.md +87 -0
- package/modules/welectBidAdapter.js +106 -0
- package/modules/yieldmoBidAdapter.js +23 -5
- package/modules/zeta_global_sspAnalyticsAdapter.js +97 -0
- package/modules/zeta_global_sspAnalyticsAdapter.md +24 -0
- package/package.json +1 -1
- package/src/auction.js +2 -2
- package/src/config.js +27 -3
- package/src/hook.js +5 -1
- package/src/prebid.js +20 -4
- package/src/secureCreatives.js +3 -2
- package/src/utils.js +12 -1
- package/test/helpers/prebidGlobal.js +1 -0
- package/test/spec/config_spec.js +279 -0
- package/test/spec/modules/adbookpspBidAdapter_spec.js +17 -3
- package/test/spec/modules/adhashBidAdapter_spec.js +2 -2
- package/test/spec/modules/adlooxAnalyticsAdapter_spec.js +6 -6
- package/test/spec/modules/admanBidAdapter_spec.js +2 -2
- package/test/spec/modules/adomikAnalyticsAdapter_spec.js +9 -1
- package/test/spec/modules/adqueryIdSystem_spec.js +74 -0
- package/test/spec/modules/adyoulikeBidAdapter_spec.js +49 -0
- 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/bliinkBidAdapter_spec.js +2 -0
- package/test/spec/modules/colossussspBidAdapter_spec.js +5 -2
- package/test/spec/modules/compassBidAdapter_spec.js +398 -0
- package/test/spec/modules/consentManagement_spec.js +20 -0
- package/test/spec/modules/criteoIdSystem_spec.js +6 -3
- package/test/spec/modules/dailyhuntBidAdapter_spec.js +404 -0
- package/test/spec/modules/docereeBidAdapter_spec.js +9 -1
- package/test/spec/modules/eids_spec.js +15 -0
- package/test/spec/modules/feedadBidAdapter_spec.js +15 -0
- package/test/spec/modules/glimpseBidAdapter_spec.js +0 -18
- package/test/spec/modules/gnetBidAdapter_spec.js +6 -6
- package/test/spec/modules/gptPreAuction_spec.js +177 -2
- package/test/spec/modules/idImportLibrary_spec.js +197 -10
- package/test/spec/modules/improvedigitalBidAdapter_spec.js +45 -1
- package/test/spec/modules/invibesBidAdapter_spec.js +119 -0
- package/test/spec/modules/ixBidAdapter_spec.js +112 -62
- package/test/spec/modules/jwplayerRtdProvider_spec.js +195 -2
- package/test/spec/modules/kargoBidAdapter_spec.js +1 -1
- package/test/spec/modules/limelightDigitalBidAdapter_spec.js +75 -17
- 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/nextMillenniumBidAdapter_spec.js +9 -2
- package/test/spec/modules/oguryBidAdapter_spec.js +10 -2
- package/test/spec/modules/optimeraRtdProvider_spec.js +14 -1
- package/test/spec/modules/ozoneBidAdapter_spec.js +43 -31
- package/test/spec/modules/pilotxBidAdapter_spec.js +244 -0
- package/test/spec/modules/pubgeniusBidAdapter_spec.js +3 -3
- package/test/spec/modules/pubmaticAnalyticsAdapter_spec.js +13 -1
- package/test/spec/modules/pubxaiAnalyticsAdapter_spec.js +11 -0
- package/test/spec/modules/realTimeDataModule_spec.js +67 -5
- package/test/spec/modules/richaudienceBidAdapter_spec.js +40 -0
- package/test/spec/modules/riseBidAdapter_spec.js +1 -1
- package/test/spec/modules/rtbhouseBidAdapter_spec.js +20 -0
- package/test/spec/modules/rubiconAnalyticsAdapter_spec.js +30 -0
- package/test/spec/modules/rubiconBidAdapter_spec.js +48 -9
- package/test/spec/modules/sharethroughBidAdapter_spec.js +91 -6
- package/test/spec/modules/showheroes-bsBidAdapter_spec.js +2 -0
- package/test/spec/modules/synacormediaBidAdapter_spec.js +70 -0
- package/test/spec/modules/tappxBidAdapter_spec.js +0 -19
- package/test/spec/modules/teadsBidAdapter_spec.js +14 -59
- package/test/spec/modules/userId_spec.js +68 -19
- package/test/spec/modules/viewability_spec.js +280 -0
- package/test/spec/modules/welectBidAdapter_spec.js +211 -0
- package/test/spec/modules/zeta_global_sspAnalyticsAdapter_spec.js +427 -0
- package/test/spec/unit/pbjs_api_spec.js +3 -1
- package/test/test_deps.js +3 -0
- package/test/test_index.js +1 -3
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { registerVideoSupport } from '../src/adServerManager.js';
|
|
10
10
|
import { command as analyticsCommand, COMMAND } from './adlooxAnalyticsAdapter.js';
|
|
11
11
|
import { ajax } from '../src/ajax.js';
|
|
12
|
-
import
|
|
12
|
+
import CONSTANTS from '../src/constants.json';
|
|
13
13
|
import { targeting } from '../src/targeting.js';
|
|
14
14
|
import { logInfo, isFn, logError, isPlainObject, isStr, isBoolean, deepSetValue, deepClone, timestamp, logWarn } from '../src/utils.js';
|
|
15
15
|
|
|
@@ -74,7 +74,7 @@ function track(options, callback) {
|
|
|
74
74
|
bid.ext.adloox.video.adserver = false;
|
|
75
75
|
|
|
76
76
|
analyticsCommand(COMMAND.TRACK, {
|
|
77
|
-
eventType: EVENTS.BID_WON,
|
|
77
|
+
eventType: CONSTANTS.EVENTS.BID_WON,
|
|
78
78
|
args: bid
|
|
79
79
|
});
|
|
80
80
|
}
|
|
@@ -9,7 +9,7 @@ import adapter from '../src/AnalyticsAdapter.js';
|
|
|
9
9
|
import { loadExternalScript } from '../src/adloader.js';
|
|
10
10
|
import { auctionManager } from '../src/auctionManager.js';
|
|
11
11
|
import { AUCTION_COMPLETED } from '../src/auction.js';
|
|
12
|
-
import
|
|
12
|
+
import CONSTANTS from '../src/constants.json';
|
|
13
13
|
import find from 'core-js-pure/features/array/find.js';
|
|
14
14
|
import {
|
|
15
15
|
deepAccess, logInfo, isPlainObject, logError, isStr, isNumber, getGptSlotInfoForAdUnitCode,
|
|
@@ -199,9 +199,9 @@ analyticsAdapter.url = function(url, args, bid) {
|
|
|
199
199
|
return url + a2qs(args);
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
analyticsAdapter[`handle_${EVENTS.AUCTION_END}`] = function(auctionDetails) {
|
|
202
|
+
analyticsAdapter[`handle_${CONSTANTS.EVENTS.AUCTION_END}`] = function(auctionDetails) {
|
|
203
203
|
if (!(auctionDetails.auctionStatus == AUCTION_COMPLETED && auctionDetails.bidsReceived.length > 0)) return;
|
|
204
|
-
analyticsAdapter[`handle_${EVENTS.AUCTION_END}`] = NOOP;
|
|
204
|
+
analyticsAdapter[`handle_${CONSTANTS.EVENTS.AUCTION_END}`] = NOOP;
|
|
205
205
|
|
|
206
206
|
logMessage(MODULE, 'preloading verification JS');
|
|
207
207
|
|
|
@@ -214,7 +214,7 @@ analyticsAdapter[`handle_${EVENTS.AUCTION_END}`] = function(auctionDetails) {
|
|
|
214
214
|
insertElement(link);
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
analyticsAdapter[`handle_${EVENTS.BID_WON}`] = function(bid) {
|
|
217
|
+
analyticsAdapter[`handle_${CONSTANTS.EVENTS.BID_WON}`] = function(bid) {
|
|
218
218
|
if (deepAccess(bid, 'ext.adloox.video.adserver')) {
|
|
219
219
|
logMessage(MODULE, `measuring '${bid.mediaType}' ad unit code '${bid.adUnitCode}' via Ad Server module`);
|
|
220
220
|
return;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import {registerBidder} from '../src/adapters/bidderFactory.js';
|
|
2
2
|
import { BANNER, NATIVE, VIDEO } from '../src/mediaTypes.js';
|
|
3
3
|
import { isFn, deepAccess, logMessage } from '../src/utils.js';
|
|
4
|
+
import {config} from '../src/config.js';
|
|
4
5
|
|
|
5
6
|
const BIDDER_CODE = 'adman';
|
|
6
7
|
const AD_URL = 'https://pub.admanmedia.com/?c=o&m=multi';
|
|
7
|
-
const URL_SYNC = 'https://pub.admanmedia.com
|
|
8
|
+
const URL_SYNC = 'https://pub.admanmedia.com';
|
|
8
9
|
|
|
9
10
|
function isBidResponseValid(bid) {
|
|
10
11
|
if (!bid.requestId || !bid.cpm || !bid.creativeId ||
|
|
@@ -152,19 +153,24 @@ export const spec = {
|
|
|
152
153
|
},
|
|
153
154
|
|
|
154
155
|
getUserSyncs: (syncOptions, serverResponses, gdprConsent, uspConsent) => {
|
|
155
|
-
let
|
|
156
|
+
let syncType = syncOptions.iframeEnabled ? 'iframe' : 'image';
|
|
157
|
+
let syncUrl = URL_SYNC + `/${syncType}?pbjs=1`;
|
|
156
158
|
if (gdprConsent && gdprConsent.consentString) {
|
|
157
159
|
if (typeof gdprConsent.gdprApplies === 'boolean') {
|
|
158
160
|
syncUrl += `&gdpr=${Number(gdprConsent.gdprApplies)}&gdpr_consent=${gdprConsent.consentString}`;
|
|
159
161
|
} else {
|
|
160
|
-
syncUrl += `&gdpr
|
|
162
|
+
syncUrl += `&gdpr=0&gdpr_consent=${gdprConsent.consentString}`;
|
|
161
163
|
}
|
|
162
164
|
}
|
|
163
165
|
if (uspConsent && uspConsent.consentString) {
|
|
164
166
|
syncUrl += `&ccpa_consent=${uspConsent.consentString}`;
|
|
165
167
|
}
|
|
168
|
+
|
|
169
|
+
const coppa = config.getConfig('coppa') ? 1 : 0;
|
|
170
|
+
syncUrl += `&coppa=${coppa}`;
|
|
171
|
+
|
|
166
172
|
return [{
|
|
167
|
-
type:
|
|
173
|
+
type: syncType,
|
|
168
174
|
url: syncUrl
|
|
169
175
|
}];
|
|
170
176
|
}
|
|
@@ -14,6 +14,8 @@ const bidWon = CONSTANTS.EVENTS.BID_WON;
|
|
|
14
14
|
const bidTimeout = CONSTANTS.EVENTS.BID_TIMEOUT;
|
|
15
15
|
const ua = navigator.userAgent;
|
|
16
16
|
|
|
17
|
+
var _sampled = true;
|
|
18
|
+
|
|
17
19
|
let adomikAdapter = Object.assign(adapter({}),
|
|
18
20
|
{
|
|
19
21
|
// Track every event needed
|
|
@@ -76,9 +78,12 @@ adomikAdapter.sendTypedEvent = function() {
|
|
|
76
78
|
const groupedTypedEvents = adomikAdapter.buildTypedEvents();
|
|
77
79
|
|
|
78
80
|
const bulkEvents = {
|
|
81
|
+
testId: adomikAdapter.currentContext.testId,
|
|
82
|
+
testValue: adomikAdapter.currentContext.testValue,
|
|
79
83
|
uid: adomikAdapter.currentContext.uid,
|
|
80
84
|
ahbaid: adomikAdapter.currentContext.id,
|
|
81
85
|
hostname: window.location.hostname,
|
|
86
|
+
sampling: adomikAdapter.currentContext.sampling,
|
|
82
87
|
eventsByPlacementCode: groupedTypedEvents.map(function(typedEventsByType) {
|
|
83
88
|
let sizes = [];
|
|
84
89
|
const eventKeys = ['request', 'response', 'winner'];
|
|
@@ -126,6 +131,8 @@ adomikAdapter.sendTypedEvent = function() {
|
|
|
126
131
|
};
|
|
127
132
|
|
|
128
133
|
adomikAdapter.sendWonEvent = function (wonEvent) {
|
|
134
|
+
let keyValues = { testId: adomikAdapter.currentContext.testId, testValue: adomikAdapter.currentContext.testValue }
|
|
135
|
+
wonEvent = {...wonEvent, ...keyValues}
|
|
129
136
|
const stringWonEvent = JSON.stringify(wonEvent)
|
|
130
137
|
logInfo('Won event sent to adomik prebid analytic ' + stringWonEvent);
|
|
131
138
|
|
|
@@ -199,17 +206,28 @@ adomikAdapter.adapterEnableAnalytics = adomikAdapter.enableAnalytics;
|
|
|
199
206
|
|
|
200
207
|
adomikAdapter.enableAnalytics = function (config) {
|
|
201
208
|
adomikAdapter.currentContext = {};
|
|
202
|
-
|
|
203
209
|
const initOptions = config.options;
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
|
|
211
|
+
_sampled = typeof config === 'undefined' ||
|
|
212
|
+
typeof config.sampling === 'undefined' ||
|
|
213
|
+
Math.random() < parseFloat(config.sampling);
|
|
214
|
+
|
|
215
|
+
if (_sampled) {
|
|
216
|
+
if (initOptions) {
|
|
217
|
+
adomikAdapter.currentContext = {
|
|
218
|
+
uid: initOptions.id,
|
|
219
|
+
url: initOptions.url,
|
|
220
|
+
testId: initOptions.testId,
|
|
221
|
+
testValue: initOptions.testValue,
|
|
222
|
+
id: '',
|
|
223
|
+
timeouted: false,
|
|
224
|
+
sampling: config.sampling
|
|
225
|
+
}
|
|
226
|
+
logInfo('Adomik Analytics enabled with config', initOptions);
|
|
227
|
+
adomikAdapter.adapterEnableAnalytics(config);
|
|
210
228
|
}
|
|
211
|
-
|
|
212
|
-
|
|
229
|
+
} else {
|
|
230
|
+
logInfo('Adomik Analytics ignored for sampling', config.sampling);
|
|
213
231
|
}
|
|
214
232
|
};
|
|
215
233
|
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This module adds Adquery QID to the User ID module
|
|
3
|
+
* The {@link module:modules/userId} module is required
|
|
4
|
+
* @module modules/adqueryIdSystem
|
|
5
|
+
* @requires module:modules/userId
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
import {ajax} from '../src/ajax.js';
|
|
9
|
+
import {getStorageManager} from '../src/storageManager.js';
|
|
10
|
+
import {submodule} from '../src/hook.js';
|
|
11
|
+
import * as utils from '../src/utils.js';
|
|
12
|
+
|
|
13
|
+
const MODULE_NAME = 'qid';
|
|
14
|
+
const AU_GVLID = 902;
|
|
15
|
+
|
|
16
|
+
export const storage = getStorageManager(AU_GVLID, 'qid');
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Param or default.
|
|
20
|
+
* @param {String} param
|
|
21
|
+
* @param {String} defaultVal
|
|
22
|
+
*/
|
|
23
|
+
function paramOrDefault(param, defaultVal, arg) {
|
|
24
|
+
if (utils.isFn(param)) {
|
|
25
|
+
return param(arg);
|
|
26
|
+
} else if (utils.isStr(param)) {
|
|
27
|
+
return param;
|
|
28
|
+
}
|
|
29
|
+
return defaultVal;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** @type {Submodule} */
|
|
33
|
+
export const adqueryIdSubmodule = {
|
|
34
|
+
/**
|
|
35
|
+
* used to link submodule with config
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
name: MODULE_NAME,
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* IAB TCF Vendor ID
|
|
42
|
+
* @type {string}
|
|
43
|
+
*/
|
|
44
|
+
gvlid: AU_GVLID,
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* decode the stored id value for passing to bid requests
|
|
48
|
+
* @function
|
|
49
|
+
* @param {{value:string}} value
|
|
50
|
+
* @returns {{qid:Object}}
|
|
51
|
+
*/
|
|
52
|
+
decode(value) {
|
|
53
|
+
let qid = storage.getDataFromLocalStorage('qid');
|
|
54
|
+
if (utils.isStr(qid)) {
|
|
55
|
+
return {qid: qid};
|
|
56
|
+
}
|
|
57
|
+
return (value && typeof value['qid'] === 'string') ? { 'qid': value['qid'] } : undefined;
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* performs action to obtain id and return a value in the callback's response argument
|
|
61
|
+
* @function
|
|
62
|
+
* @param {SubmoduleConfig} [config]
|
|
63
|
+
* @returns {IdResponse|undefined}
|
|
64
|
+
*/
|
|
65
|
+
getId(config) {
|
|
66
|
+
if (!utils.isPlainObject(config.params)) {
|
|
67
|
+
config.params = {};
|
|
68
|
+
}
|
|
69
|
+
const url = paramOrDefault(config.params.url,
|
|
70
|
+
`https://bidder.adquery.io/prebid/qid`,
|
|
71
|
+
config.params.urlArg);
|
|
72
|
+
|
|
73
|
+
const resp = function (callback) {
|
|
74
|
+
let qid = storage.getDataFromLocalStorage('qid');
|
|
75
|
+
if (utils.isStr(qid)) {
|
|
76
|
+
const responseObj = {qid: qid};
|
|
77
|
+
callback(responseObj);
|
|
78
|
+
} else {
|
|
79
|
+
const callbacks = {
|
|
80
|
+
success: response => {
|
|
81
|
+
let responseObj;
|
|
82
|
+
if (response) {
|
|
83
|
+
try {
|
|
84
|
+
responseObj = JSON.parse(response);
|
|
85
|
+
} catch (error) {
|
|
86
|
+
utils.logError(error);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
callback(responseObj);
|
|
90
|
+
},
|
|
91
|
+
error: error => {
|
|
92
|
+
utils.logError(`${MODULE_NAME}: ID fetch encountered an error`, error);
|
|
93
|
+
callback();
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
ajax(url, callbacks, undefined, {method: 'GET'});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
return {callback: resp};
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
submodule('userId', adqueryIdSubmodule);
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Adquery QID
|
|
2
|
+
|
|
3
|
+
Adquery QID Module. For assistance setting up your module please contact us at [prebid@adquery.io](prebid@adquery.io).
|
|
4
|
+
|
|
5
|
+
### Prebid Params
|
|
6
|
+
|
|
7
|
+
Individual params may be set for the Adquery ID Submodule. At least one identifier must be set in the params.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
pbjs.setConfig({
|
|
11
|
+
usersync: {
|
|
12
|
+
userIds: [{
|
|
13
|
+
name: 'qid',
|
|
14
|
+
storage: {
|
|
15
|
+
name: 'qid',
|
|
16
|
+
type: 'html5'
|
|
17
|
+
}
|
|
18
|
+
}]
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
```
|
|
22
|
+
## Parameter Descriptions for the `usersync` Configuration Section
|
|
23
|
+
The below parameters apply only to the Adquery User ID Module integration.
|
|
24
|
+
|
|
25
|
+
| Param under usersync.userIds[] | Scope | Type | Description | Example |
|
|
26
|
+
| --- | --- | --- | --- | --- |
|
|
27
|
+
| name | Required | String | ID value for the Adquery ID module - `"qid"` | `"qid"` |
|
|
28
|
+
| storage | Required | Object | The publisher must specify the local storage in which to store the results of the call to get the user ID. | |
|
|
29
|
+
| storage.type | Required | String | This is where the results of the user ID will be stored. The recommended method is `localStorage` by specifying `html5`. | `"html5"` |
|
|
30
|
+
| storage.name | Required | String | The name of the html5 local storage where the user ID will be stored. | `"qid"` |
|
|
31
|
+
| storage.expires | Optional | Integer | How long (in days) the user ID information will be stored. | `365` |
|
|
32
|
+
| value | Optional | Object | Used only if the page has a separate mechanism for storing the Adquery ID. The value is an object containing the values to be sent to the adapters. In this scenario, no URL is called and nothing is added to local storage | `{"qid": "2abf9f001fcd81241b67"}` |
|
|
33
|
+
| params | Optional | Object | Used to store params for the id system |
|
|
34
|
+
| params.url | Optional | String | Set an alternate GET url for qid with this parameter |
|
|
35
|
+
| params.urlArg | Optional | Object | Optional url parameter for params.url |
|
|
@@ -180,11 +180,13 @@ function getCanonicalUrl() {
|
|
|
180
180
|
|
|
181
181
|
/* Get mediatype from bidRequest */
|
|
182
182
|
function getMediatype(bidRequest) {
|
|
183
|
+
if (deepAccess(bidRequest, 'mediaTypes.banner')) {
|
|
184
|
+
return BANNER;
|
|
185
|
+
}
|
|
183
186
|
if (deepAccess(bidRequest, 'mediaTypes.video')) {
|
|
184
187
|
return VIDEO;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
} else if (deepAccess(bidRequest, 'mediaTypes.native')) {
|
|
188
|
+
}
|
|
189
|
+
if (deepAccess(bidRequest, 'mediaTypes.native')) {
|
|
188
190
|
return NATIVE;
|
|
189
191
|
}
|
|
190
192
|
}
|
|
@@ -345,7 +347,7 @@ function getTrackers(eventsArray, jsTrackers) {
|
|
|
345
347
|
|
|
346
348
|
function getVideoAd(response) {
|
|
347
349
|
var adJson = {};
|
|
348
|
-
if (typeof response.Ad === 'string') {
|
|
350
|
+
if (typeof response.Ad === 'string' && response.Ad.indexOf('\/\*PREBID\*\/') > 0) {
|
|
349
351
|
adJson = JSON.parse(response.Ad.match(/\/\*PREBID\*\/(.*)\/\*PREBID\*\//)[1]);
|
|
350
352
|
return deepAccess(adJson, 'Content.MainVideo.Vast');
|
|
351
353
|
}
|
|
@@ -478,13 +480,15 @@ function createBid(response, bidRequests) {
|
|
|
478
480
|
meta: response.Meta || { advertiserDomains: [] }
|
|
479
481
|
};
|
|
480
482
|
|
|
481
|
-
|
|
483
|
+
// retreive video response if present
|
|
484
|
+
const vast64 = response.Vast || getVideoAd(response);
|
|
485
|
+
if (vast64) {
|
|
486
|
+
bid.vastXml = window.atob(vast64);
|
|
487
|
+
bid.mediaType = 'video';
|
|
488
|
+
} else if (request.Native) {
|
|
489
|
+
// format Native response if Native was requested
|
|
482
490
|
bid.native = getNativeAssets(response, request.Native);
|
|
483
491
|
bid.mediaType = 'native';
|
|
484
|
-
} else if (request && request.Video) {
|
|
485
|
-
const vast64 = response.Vast || getVideoAd(response);
|
|
486
|
-
bid.vastXml = vast64 ? window.atob(vast64) : '';
|
|
487
|
-
bid.mediaType = 'video';
|
|
488
492
|
} else {
|
|
489
493
|
bid.width = response.Width;
|
|
490
494
|
bid.height = response.Height;
|
|
@@ -309,7 +309,7 @@ function getUserSyncs(syncOptions, serverResponses) {
|
|
|
309
309
|
export const spec = {
|
|
310
310
|
code: BIDDER_CODE,
|
|
311
311
|
gvlid: GVLID,
|
|
312
|
-
aliases: ['avantisvideo', 'selectmediavideo', 'vidcrunch', 'openwebvideo'],
|
|
312
|
+
aliases: ['avantisvideo', 'selectmediavideo', 'vidcrunch', 'openwebvideo', 'didnavideo'],
|
|
313
313
|
supportedMediaTypes: [VIDEO, BANNER],
|
|
314
314
|
isBidRequestValid,
|
|
315
315
|
buildRequests,
|
|
@@ -36,7 +36,7 @@ export const spec = {
|
|
|
36
36
|
*/
|
|
37
37
|
buildRequests: function(validBidRequests, bidderRequest) {
|
|
38
38
|
const slots = validBidRequests.map(beOpRequestSlotsMaker);
|
|
39
|
-
let pageUrl = deepAccess(bidderRequest, 'refererInfo.canonicalUrl') || config.getConfig('pageUrl')
|
|
39
|
+
let pageUrl = deepAccess(window, 'location.href') || deepAccess(bidderRequest, 'refererInfo.canonicalUrl') || config.getConfig('pageUrl');
|
|
40
40
|
let fpd = config.getLegacyFpd(config.getConfig('ortb2'));
|
|
41
41
|
let gdpr = bidderRequest.gdprConsent;
|
|
42
42
|
let firstSlot = slots[0];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { config } from '../src/config.js';
|
|
6
6
|
import * as events from '../src/events.js';
|
|
7
|
-
import
|
|
7
|
+
import CONSTANTS from '../src/constants.json';
|
|
8
8
|
import { logWarn, isFn, triggerPixel } from '../src/utils.js';
|
|
9
9
|
import { getGlobal } from '../src/prebidGlobal.js';
|
|
10
10
|
import adapterManager, { gdprDataHandler, uspDataHandler } from '../src/adapterManager.js';
|
|
@@ -70,12 +70,12 @@ export let impressionViewableHandler = (globalModuleConfig, slot, event) => {
|
|
|
70
70
|
// trigger respective bidder's onBidViewable handler
|
|
71
71
|
adapterManager.callBidViewableBidder(respectiveBid.bidder, respectiveBid);
|
|
72
72
|
// emit the BID_VIEWABLE event with bid details, this event can be consumed by bidders and analytics pixels
|
|
73
|
-
events.emit(EVENTS.BID_VIEWABLE, respectiveBid);
|
|
73
|
+
events.emit(CONSTANTS.EVENTS.BID_VIEWABLE, respectiveBid);
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
export let init = () => {
|
|
78
|
-
events.on(EVENTS.AUCTION_INIT, () => {
|
|
78
|
+
events.on(CONSTANTS.EVENTS.AUCTION_INIT, () => {
|
|
79
79
|
// read the config for the module
|
|
80
80
|
const globalModuleConfig = config.getConfig(MODULE_NAME) || {};
|
|
81
81
|
// do nothing if module-config.enabled is not set to true
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { logMessage } from '../src/utils.js';
|
|
2
2
|
import { config } from '../src/config.js';
|
|
3
3
|
import * as events from '../src/events.js';
|
|
4
|
-
import
|
|
4
|
+
import CONSTANTS from '../src/constants.json';
|
|
5
5
|
|
|
6
6
|
const MODULE_NAME = 'bidViewabilityIO';
|
|
7
7
|
const CONFIG_ENABLED = 'enabled';
|
|
@@ -42,7 +42,7 @@ export let getViewableOptions = (bid) => {
|
|
|
42
42
|
export let markViewed = (bid, entry, observer) => {
|
|
43
43
|
return () => {
|
|
44
44
|
observer.unobserve(entry.target);
|
|
45
|
-
events.emit(EVENTS.BID_VIEWABLE, bid);
|
|
45
|
+
events.emit(CONSTANTS.EVENTS.BID_VIEWABLE, bid);
|
|
46
46
|
_logMessage(`id: ${entry.target.getAttribute('id')} code: ${bid.adUnitCode} was viewed`);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -77,7 +77,7 @@ export let init = () => {
|
|
|
77
77
|
if (conf[MODULE_NAME][CONFIG_ENABLED] && CLIENT_SUPPORTS_IO) {
|
|
78
78
|
// if the module is enabled and the browser supports Intersection Observer,
|
|
79
79
|
// then listen to AD_RENDER_SUCCEEDED to setup IO's for supported mediaTypes
|
|
80
|
-
events.on(EVENTS.AD_RENDER_SUCCEEDED, ({doc, bid, id}) => {
|
|
80
|
+
events.on(CONSTANTS.EVENTS.AD_RENDER_SUCCEEDED, ({doc, bid, id}) => {
|
|
81
81
|
if (isSupportedMediaType(bid)) {
|
|
82
82
|
let viewable = new IntersectionObserver(viewCallbackFactory(bid), getViewableOptions(bid));
|
|
83
83
|
let element = document.getElementById(bid.adUnitCode);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// eslint-disable-next-line prebid/validate-imports
|
|
2
2
|
// eslint-disable-next-line prebid/validate-imports
|
|
3
|
-
import {registerBidder} from 'src/adapters/bidderFactory.js'
|
|
4
|
-
|
|
3
|
+
import {registerBidder} from '../src/adapters/bidderFactory.js'
|
|
5
4
|
export const BIDDER_CODE = 'bliink'
|
|
6
5
|
export const BLIINK_ENDPOINT_ENGINE = 'https://engine.bliink.io/delivery'
|
|
7
6
|
export const BLIINK_ENDPOINT_ENGINE_VAST = 'https://engine.bliink.io/vast'
|
|
@@ -174,6 +173,8 @@ export const buildRequests = (_, bidderRequest) => {
|
|
|
174
173
|
pageUrl: bidderRequest.refererInfo.referer,
|
|
175
174
|
pageDescription: getMetaValue(META_DESCRIPTION),
|
|
176
175
|
keywords: getKeywords().join(','),
|
|
176
|
+
gdpr: false,
|
|
177
|
+
gdpr_consent: '',
|
|
177
178
|
pageTitle: document.title,
|
|
178
179
|
}
|
|
179
180
|
|
|
@@ -47,7 +47,10 @@ export const spec = {
|
|
|
47
47
|
* @return boolean True if this is a valid bid, and false otherwise.
|
|
48
48
|
*/
|
|
49
49
|
isBidRequestValid: (bid) => {
|
|
50
|
-
|
|
50
|
+
const validPlacamentId = bid.params && !isNaN(bid.params.placement_id);
|
|
51
|
+
const validGroupId = bid.params && !isNaN(bid.params.group_id);
|
|
52
|
+
|
|
53
|
+
return Boolean(bid.bidId && (validPlacamentId || validGroupId));
|
|
51
54
|
},
|
|
52
55
|
|
|
53
56
|
/**
|
|
@@ -61,13 +64,13 @@ export const spec = {
|
|
|
61
64
|
const location = winTop.location;
|
|
62
65
|
let placements = [];
|
|
63
66
|
let request = {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
deviceWidth: winTop.screen.width,
|
|
68
|
+
deviceHeight: winTop.screen.height,
|
|
69
|
+
language: (navigator && navigator.language) ? navigator.language : '',
|
|
70
|
+
secure: location.protocol === 'https:' ? 1 : 0,
|
|
71
|
+
host: location.host,
|
|
72
|
+
page: location.pathname,
|
|
73
|
+
placements: placements,
|
|
71
74
|
};
|
|
72
75
|
|
|
73
76
|
if (bidderRequest) {
|
|
@@ -85,6 +88,7 @@ export const spec = {
|
|
|
85
88
|
let traff = bid.params.traffic || BANNER
|
|
86
89
|
let placement = {
|
|
87
90
|
placementId: bid.params.placement_id,
|
|
91
|
+
groupId: bid.params.group_id,
|
|
88
92
|
bidId: bid.bidId,
|
|
89
93
|
sizes: bid.mediaTypes[traff].sizes,
|
|
90
94
|
traffic: traff,
|
|
@@ -26,5 +26,19 @@ Module that connects to Colossus SSP demand sources
|
|
|
26
26
|
traffic: 'banner'
|
|
27
27
|
}
|
|
28
28
|
}]
|
|
29
|
-
|
|
29
|
+
}, {
|
|
30
|
+
code: 'placementid_1',
|
|
31
|
+
mediaTypes: {
|
|
32
|
+
banner: {
|
|
33
|
+
sizes: [[300, 250], [300,600]]
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
bids: [{
|
|
37
|
+
bidder: 'colossusssp',
|
|
38
|
+
params: {
|
|
39
|
+
group_id: 0,
|
|
40
|
+
traffic: 'banner'
|
|
41
|
+
}
|
|
42
|
+
}]
|
|
43
|
+
}];
|
|
30
44
|
```
|