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

Update to Prebid.js v8.32.0 #57

Merged
merged 121 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
121 commits
Select commit Hold shift + click to select a range
ec42b13
Increment version to 8.27.0-pre
prebidjs-release Nov 30, 2023
2de3f87
Flipp Bid Adapter: update constant NETWORK_ID (#10781)
mike-lei Dec 1, 2023
16133c5
identityLinkIdSystem - liveramp - bug fix setting tcf consent string …
mamatic Dec 1, 2023
faec1bb
Add GVLID to vox adapter (#10784)
hybrid-ai Dec 1, 2023
fe2f35e
LiveIntent UserId module: Add support for sovrn id (#10783)
3link Dec 1, 2023
4f057b1
Unruly Bid Adapter : include Prebid.js version in request (#10773)
bhainesnexxen Dec 1, 2023
cbf1e15
MgidX Bid Adapter: refactor request.gdpr object generating (#10782)
xmgiddev Dec 2, 2023
7be0a10
NextMillennium Bid Adapter: support for GPP consent string, `site.pag…
mhlm Dec 4, 2023
4f3826a
Replace openx.com with openx.net (#10786)
3link Dec 4, 2023
27b57ab
Rise Bid Adapter : support currency (#10790)
YakirLavi Dec 5, 2023
645b562
MinuteMedia Bid Adapter : support currency (#10791)
YakirLavi Dec 5, 2023
55ba111
Core: Add eventString to error executing handler message (#10797)
pclinger Dec 5, 2023
f818b8f
Adagio Bid Adapter: remove useless adrequest fields (#10794)
osazos Dec 5, 2023
9a65d49
VIS.X: add response time tracking on bidWon event (#10772)
vfedoseev Dec 5, 2023
264efa7
ViantOrtb Bid Adapter : update endpoint url (#10801)
tkrishnaviant Dec 6, 2023
bf909ea
Teads Bid Adapter: add new window features to request (#10796)
github-saad-elmahfoudi Dec 6, 2023
0de4a09
Sparteo Bid Adapter : handle vastUrl for video context (#10805)
geoffray-viously Dec 7, 2023
864dc02
deal support added (#10802)
mustafakemal16 Dec 7, 2023
d0747e4
Mediago Bid Adapter : add cookieSync and gdpr (#10724)
BaronJHYu Dec 7, 2023
cb82c47
Sovrn Bid Adapter : send coppa signal (#10729)
ikagotso Dec 7, 2023
4fe6292
Adnuntius Bid Adapter : forces gdpr=1 flag if consent is required (#1…
mikael-lundin Dec 7, 2023
8ab882f
GeoEdge RTD module: collect CPM and curency from the winning bid (#10…
GeoEdge-r-and-d Dec 7, 2023
c6a13ca
userId: fix bug where pubProvidedId UIDs are duplicated (#10795)
dgirardi Dec 7, 2023
37b7e05
Prebid 8.27.0 release
prebidjs-release Dec 7, 2023
7f815d2
Increment version to 8.28.0-pre
prebidjs-release Dec 7, 2023
32ff256
Support UID 2.0 pgamssp module (#10771)
PGAMSSP Dec 7, 2023
b47a38b
ADSS-1756-pass-gpid-to-video-requests (#10809)
john-ivan Dec 8, 2023
260269d
Browsi RTD : fix for targeting (#10814)
omerDotan Dec 11, 2023
2493f98
nextMillennium Bid Adapter : add pbjs version and support for user.ei…
mhlm Dec 11, 2023
eecdc2e
Update deepintentBidAdapter.js (#10818)
patmmccann Dec 11, 2023
222b442
GC-158 When accessing the TCF it is pulling from the wrong location, …
southern-growthcode Dec 11, 2023
3ec81e6
Adagio Analytics Adapter: listen to AUCTION_END (#10798)
osazos Dec 11, 2023
6275c00
PubMaticAnalyticAdapter : Added new fields related to floors (fetch s…
kapil-tuptewar Dec 11, 2023
048f735
Pubmatic Analytics Adapter : skip duplicate data for pubmatic bids in…
pm-priyanka-deshmane Dec 12, 2023
947a487
support ad unit name (#10825)
gwi-mmuths Dec 12, 2023
5dbbf1b
PBjs Core : new event fired before add bid response (#10685)
matthieularere-msq Dec 12, 2023
85817e7
Revert "Pubmatic Analytics Adapter : skip duplicate data for pubmatic…
patmmccann Dec 12, 2023
fd35856
Revert "support ad unit name (#10825)" (#10831)
ChrisHuie Dec 12, 2023
1c4bc7a
Invibes Bid Adapter : infinite scroll tcf (#10764)
gabrielIvbs Dec 12, 2023
2e07896
Mediago Bid Adapter : switch domain name (#10833)
BaronJHYu Dec 13, 2023
75cb166
Bizzclick Bid Adapter : update adapter, used ortbConverter lib (#10828)
BizzClick Dec 13, 2023
dc530cf
PubMatic Bid Adapter : passing a unique wiid to pubmatic ssp and logg…
pm-azhar-mulla Dec 13, 2023
a631892
Criteo Bid Adapter: Add support for app.publisher.id in bid request (…
vraybaud Dec 14, 2023
3e57af3
providing visibility in case of adapter timeout and bidError (#10807)
barRubi Dec 14, 2023
f58a0a3
Prebid 8.28.0 release
prebidjs-release Dec 14, 2023
2732783
Increment version to 8.29.0-pre
prebidjs-release Dec 14, 2023
5292b63
Adding support for video.plcmt (#10841)
desidiver Dec 15, 2023
a90d6c8
Bump github/codeql-action from 2 to 3 (#10856)
dependabot[bot] Dec 18, 2023
5f8ff5f
HadronId Module: implementing user consent in backend calls (#10845)
jlaso Dec 18, 2023
9a0f012
Eids Docs : add missing EID examples (#10844)
3link Dec 18, 2023
332a7d2
Admixer Bid Adaper: add admixerwl alias (#10859)
AdmixerTech Dec 19, 2023
cd787eb
AdagioAnalyticsAdapter: fix function param check (#10860)
osazos Dec 19, 2023
0b59d4d
NoBid Analytics Adapter: support for counting blocked requests for th…
redaguermas Dec 20, 2023
a5c2e06
consentManagementGpp: fix handling of CMP errors (#10811)
dgirardi Dec 20, 2023
104f53f
Taboola Bid Adapter: implement Iframe user sync (#10789)
ahmadlob Dec 20, 2023
2548949
AMX bid adapter: fix timeout handler, bump version (#10744)
nickjacob Dec 20, 2023
2b8aacb
Ucfunnel Bid Adapter: add format support (#10862)
jackhsiehucf Dec 20, 2023
3c632ca
R2B2 Bid Adapter: Initial release (#10702)
alexalukr2b2 Dec 21, 2023
f5e1988
Core: fix headers in ortbConverter readme (#10874)
someden Dec 27, 2023
c6b45c4
SparteoBidAdapter: Add UserSync (#10822)
geoffray-viously Dec 27, 2023
f625c1e
Yandex Bid Adapter: Add rtt (roud trip time) tracking via nurl (#10846)
korobkov-k Dec 27, 2023
ed48e34
AdMatic Bid Adapter : consent management features added (#10813)
fatihkaya84 Dec 27, 2023
9ec2092
Taboola Bid Adapter: Cookie Look Up Logic Fix (#10873)
ahmadlob Dec 27, 2023
984abfa
ZetaGlobalSsp Bid Adapter : support topics module (#10803)
asurovenko-zeta Dec 27, 2023
325cd3c
Adnuntius Bid Adapter: bugfix for storageFunction (#10869)
mikael-lundin Dec 28, 2023
bdbbf09
Prebid 8.29.0 release
prebidjs-release Dec 28, 2023
46784ab
Increment version to 8.30.0-pre
prebidjs-release Dec 28, 2023
cc49968
Yandex Bid Adapter: add support for topicsFpdModule (#10875)
someden Dec 31, 2023
ff27673
Yandex Bid Adapter: add jsdoc (#10884)
someden Dec 31, 2023
233695d
DxKulture Bid Adapter : user syncs improvements (#10738)
kmdevops Jan 2, 2024
04a7659
Mygaru Id System: Initial release (#10848)
GeneGenie Jan 2, 2024
ed05478
Update viantOrtbBidAdapter_spec.js (#10888)
tkrishnaviant Jan 3, 2024
665c894
Stv Bid Adapter: added user id support, adaptation of schain support …
theo-stv Jan 3, 2024
185e97f
Missena Bid Adapter: allow per page capping (#10863)
pdamoc Jan 3, 2024
49904a0
LiveIntent ID Module: Update live-connect version (#10894)
wi101 Jan 3, 2024
136f0bb
Do not require API for video requests (#10895)
robertrmartinez Jan 3, 2024
7a09d81
Price Floors: Failure to Account for 'data.skipRate' (#10872)
bbaresic Jan 4, 2024
aa21bfd
Prebid 8.30.0 release
prebidjs-release Jan 4, 2024
714acd3
Increment version to 8.31.0-pre
prebidjs-release Jan 4, 2024
866be6e
1.Added safechecks for s2s metadapter case 2.Skipped firing client si…
kapil-tuptewar Jan 4, 2024
60e7e96
Discovery Bid Adapter: update buyerId, add ssppid & pmguid, add getUs…
ecoeco163 Jan 4, 2024
cdbe68c
ID5 User Id module - pass gpp string and sid in getId request (#10899)
abazylewicz-id5 Jan 5, 2024
7f2763d
Adnuntius Bid Adapter : bugfix void au ids (#10890)
antosarho Jan 5, 2024
3e6b546
GreenbidsAnalyticsAdapter and GreenbidsRtdProvider: Rework greenbids …
jbogp Jan 5, 2024
d390f6c
Core: add eslint-plugin-jsdoc (#10893)
someden Jan 6, 2024
759c52d
Pangle Bid Adapter : add multi format support (#10909)
pangle-fe Jan 8, 2024
6689373
Criteo bid adapter: remove checks on video context and placement (#10…
dzhang-criteo Jan 8, 2024
b6d7b0a
Discovery Bid Adapter : add title, description, keywords (#10900)
lhxx121 Jan 9, 2024
cf1f150
Ampliffy Bid Adapter: initial commit (#10883)
vicenteampliffy Jan 9, 2024
b93416b
Utils.js (Warning in Integration Tests): add back getWindowFromDocume…
ChrisHuie Jan 9, 2024
2b25ec4
Rubicon: remove transformBidParams function (#10919)
bretg Jan 9, 2024
621cedc
Bump follow-redirects from 1.15.2 to 1.15.4 (#10922)
dependabot[bot] Jan 10, 2024
cdcfe15
Support cdep (#10921)
jefftmahoney Jan 10, 2024
74f6bce
Adkernel Bid Adapter: multiformat imp splitting (#10918)
ckbo3hrk Jan 10, 2024
c94eb4e
Geodge RTD module: update preload mechanism (#10911)
GeoEdge-r-and-d Jan 11, 2024
28ba8bc
Add option for no signal bidders (#10867)
apukh-magnite Jan 11, 2024
a491505
Criteo bid adapter: add device object to backend request (#10926)
dzhang-criteo Jan 11, 2024
1c5d925
Geolocation RTD provider: make module 'vendorless' for the purposes o…
dgirardi Jan 11, 2024
c3401f9
LiveConnect Bid Adapter : add prebid version to liveConnect (#10920)
wi101 Jan 11, 2024
000a0ad
Insticator Bid Adaptor : add support for playerSize, plcmt, vastXML, …
shubhamc-ins Jan 11, 2024
c2d4a88
Seedtag Bid Adapter : add geom to bidRequest (#10906)
ybootin Jan 11, 2024
1837f79
add dsp_genieeBidAdapter (#10834)
kiyoshi0205 Jan 11, 2024
07f4809
Contxtful RTD Provider: Initial Release (#10550)
sebastienrufiange Jan 11, 2024
b8c6918
Prebid 8.31.0 release
prebidjs-release Jan 11, 2024
759d5ac
Increment version to 8.32.0-pre
prebidjs-release Jan 11, 2024
672b535
Ad2iction Bid Adapter: initial release (#10877)
charlie0228 Jan 12, 2024
c7f4d18
LiveIntent UserId module: Make process and process.env optional (#10905)
3link Jan 12, 2024
19a3281
Smartadserver Bid Adapter: support additional video parameters (#10815)
krzysztofequativ Jan 12, 2024
869edc7
Core: fix jsdoc errors (#10941)
someden Jan 14, 2024
8069abd
Richaudience Bid Adapter : add function onTimeout (#10891)
richaudience Jan 15, 2024
aed0f06
PubMatic Bid Adapter : add support to read and pass badv to adserver …
pm-azhar-mulla Jan 15, 2024
dc80cff
Taboola Bid Adapter : refactor using ortb conversion library (#10910)
barRubi Jan 16, 2024
37aba0a
[Fledge] Add support for seller signals per imp (#10948)
afewcc Jan 16, 2024
5bf8083
Adman Bid Adapter : add GVLID (#10949)
SmartyAdman Jan 16, 2024
d6c39f5
Unicorn Bid Adapter : support id5 (#10947)
faithnh Jan 16, 2024
a63e748
Yahoo SSP Bid Adapter : update maintainer email address (#10954)
DeepthiNeeladri Jan 17, 2024
2e4b98e
EUID Id Module : add support for client side token generation (#10885)
ssundahlTTD Jan 17, 2024
34e6192
add alias support to riseBidAdapter (#10956)
lasloche Jan 17, 2024
faec96e
Richaudience Bid Adapter): change url tracking (#10963)
richaudience Jan 18, 2024
953e387
Prebid 8.32.0 release
prebidjs-release Jan 18, 2024
2a5c68e
Merge tag '8.32.0' into update-prebid-8.32.0
toshi17 Jan 23, 2024
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
35 changes: 33 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,25 @@ module.exports = {
node: {
moduleDirectory: ['node_modules', './']
}
},
'jsdoc': {
mode: 'typescript',
tagNamePreference: {
'tag constructor': 'constructor',
extends: 'extends',
method: 'method',
return: 'return',
}
}
},
extends: 'standard',
extends: [
'standard',
'plugin:jsdoc/recommended'
],
plugins: [
'prebid',
'import'
'import',
'jsdoc'
],
globals: {
'BROWSERSTACK_USERNAME': false,
Expand Down Expand Up @@ -46,6 +59,24 @@ module.exports = {
'no-undef': 2,
'no-useless-escape': 'off',
'no-console': 'error',
'jsdoc/check-types': 'off',
'jsdoc/newline-after-description': 'off',
'jsdoc/require-jsdoc': 'off',
'jsdoc/require-param': 'off',
'jsdoc/require-param-description': 'off',
'jsdoc/require-param-name': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/require-property': 'off',
'jsdoc/require-property-description': 'off',
'jsdoc/require-property-name': 'off',
'jsdoc/require-property-type': 'off',
'jsdoc/require-returns': 'off',
'jsdoc/require-returns-check': 'off',
'jsdoc/require-returns-description': 'off',
'jsdoc/require-returns-type': 'off',
'jsdoc/require-yields': 'off',
'jsdoc/require-yields-check': 'off',
'jsdoc/tag-lines': 'off'
},
overrides: Object.keys(allowedModules).map((key) => ({
files: key + '/**/*.js',
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
Expand All @@ -57,7 +57,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
Expand All @@ -70,4 +70,4 @@ jobs:
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
91 changes: 91 additions & 0 deletions integrationExamples/gpt/contxtfulRtdProvider_example.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<html>

<head>
<script src="http://localhost:9999/build/dev/prebid.js" async></script>
<script async src="https://www.googletagservices.com/tag/js/gpt.js"></script>
<script async>
const FAILSAFE_TIMEOUT = 8000;
const PREBID_TIMEOUT = 5000;

const bidders = [
{
bidder: 'appnexus',
params: {
placementId: 13144370
}
}
];

var adUnits = [
{
code: 'div-gpt-ad-1460505748561-0',
mediaTypes: {
banner: {
sizes: [[300, 250], [300, 600]],
}
},
bids: bidders,
}
];


var pbjs = pbjs || {};
pbjs.que = pbjs.que || [];
var googletag = googletag || {};
googletag.cmd = googletag.cmd || [];
googletag.cmd.push(function () {
googletag.pubads().disableInitialLoad();
googletag.defineSlot('/19968336/header-bid-tag-0', [[300, 250], [300, 600]], 'div-gpt-ad-1460505748561-0').addService(googletag.pubads());
googletag.pubads().enableSingleRequest();
googletag.enableServices();
});

pbjs.que.push(function () {
pbjs.setConfig({
debug: true,
realTimeData: {
auctionDelay: 100,
dataProviders: [
{
name: "contxtful",
waitForIt: true,
params: {
version: "Contact [email protected] for the API version",
customer: "Contact [email protected] for the customer ID"
}
}
]
}
});
pbjs.addAdUnits(adUnits);
pbjs.requestBids({
bidsBackHandler: sendAdserverRequest,
timeout: PREBID_TIMEOUT
});
});

function sendAdserverRequest() {
if (pbjs.adserverRequestSent) return;
pbjs.adserverRequestSent = true;
googletag.cmd.push(function () {
pbjs.que.push(function () {
pbjs.setTargetingForGPTAsync();
googletag.pubads().refresh();
});
});
}

setTimeout(function () {
sendAdserverRequest();
}, FAILSAFE_TIMEOUT);

</script>
</head>

<body>
<h2>Contxtful RTD Provider</h2>
<div id='div-gpt-ad-1460505748561-0'></div>
</div>
</body>

</html>
48 changes: 24 additions & 24 deletions libraries/cmp/cmpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,46 +4,46 @@ import {GreedyPromise} from '../../src/utils/promise.js';
* @typedef {function} CMPClient
*
* @param {{}} params CMP parameters. Currently this is a subset of {command, callback, parameter, version}.
* @param {bool} once if true, discard cross-frame event listeners once a reply message is received.
* @param {boolean} once if true, discard cross-frame event listeners once a reply message is received.
* @returns {Promise<*>} a promise to the API's "result" - see the `mode` argument to `cmpClient` on how that's determined.
* @property {boolean} isDirect true if the CMP is directly accessible (no postMessage required)
* @property {() => void} close close the client; currently, this just stops listening for cross-frame messages.
*/

export const MODE_MIXED = 0;
export const MODE_RETURN = 1;
export const MODE_CALLBACK = 2;

/**
* Returns a client function that can interface with a CMP regardless of where it's located.
*
* @param apiName name of the CMP api, e.g. "__gpp"
* @param apiVersion? CMP API version
* @param apiArgs? names of the arguments taken by the api function, in order.
* @param callbackArgs? names of the cross-frame response payload properties that should be passed as callback arguments, in order
* @param mode? controls the callbacks passed to the underlying API, and how the promises returned by the client are resolved.
* @param {object} obj
* @param obj.apiName name of the CMP api, e.g. "__gpp"
* @param [obj.apiVersion] CMP API version
* @param [obj.apiArgs] names of the arguments taken by the api function, in order.
* @param [obj.callbackArgs] names of the cross-frame response payload properties that should be passed as callback arguments, in order
* @param [obj.mode] controls the callbacks passed to the underlying API, and how the promises returned by the client are resolved.
*
* The client behaves differently when it's provided a `callback` argument vs when it's not - for short, let's name these
* cases "subscriptions" and "one-shot calls" respectively:
* The client behaves differently when it's provided a `callback` argument vs when it's not - for short, let's name these
* cases "subscriptions" and "one-shot calls" respectively:
*
* With `mode: MODE_MIXED` (the default), promises returned on subscriptions are resolved to undefined when the callback
* is first run (that is, the promise resolves when the CMP replies, but what it replies with is discarded and
* left for the callback to deal with). For one-shot calls, the returned promise is resolved to the API's
* return value when it's directly accessible, or with the result from the first (and, presumably, the only)
* cross-frame reply when it's not;
* With `mode: MODE_MIXED` (the default), promises returned on subscriptions are resolved to undefined when the callback
* is first run (that is, the promise resolves when the CMP replies, but what it replies with is discarded and
* left for the callback to deal with). For one-shot calls, the returned promise is resolved to the API's
* return value when it's directly accessible, or with the result from the first (and, presumably, the only)
* cross-frame reply when it's not;
*
* With `mode: MODE_RETURN`, the returned promise always resolves to the API's return value - which is taken to be undefined
* when cross-frame;
* With `mode: MODE_RETURN`, the returned promise always resolves to the API's return value - which is taken to be undefined
* when cross-frame;
*
* With `mode: MODE_CALLBACK`, the underlying API is expected to never directly return anything significant; instead,
* it should always accept a callback and - for one-shot calls - invoke it only once with the result. The client will
* automatically generate an appropriate callback for one-shot calls and use the result it's given to resolve
* the returned promise. Subscriptions are treated in the same way as MODE_MIXED.
* With `mode: MODE_CALLBACK`, the underlying API is expected to never directly return anything significant; instead,
* it should always accept a callback and - for one-shot calls - invoke it only once with the result. The client will
* automatically generate an appropriate callback for one-shot calls and use the result it's given to resolve
* the returned promise. Subscriptions are treated in the same way as MODE_MIXED.
*
* @param win
* @returns {CMPClient} CMP invocation function (or null if no CMP was found).
*/

export const MODE_MIXED = 0;
export const MODE_RETURN = 1;
export const MODE_CALLBACK = 2;

export function cmpClient(
{
apiName,
Expand Down
9 changes: 4 additions & 5 deletions libraries/ortbConverter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ However, there are two restrictions (to avoid them, use the [other customization
)
```

<a id="fine-customization" />
### Fine grained customization - imp, request, bidResponse, response
### <a id="fine-customization" /> Fine grained customization - imp, request, bidResponse, response

When invoked, `toORTB({bidRequests, bidderRequest})` first loops through each request in `bidRequests`, converting them into ORTB `imp` objects.
It then packages them into a single ORTB request, adding other parameters that are not imp-specific (such as for example `request.tmax`).
Expand All @@ -91,7 +90,7 @@ a single return value.

You can customize each of these steps using the `ortbConverter` arguments `imp`, `request`, `bidResponse` and `response`:

### <a id="imp" />Customizing imps: `imp(buildImp, bidRequest, context)`
### <a id="imp" /> Customizing imps: `imp(buildImp, bidRequest, context)`

Invoked once for each input `bidRequest`; should return the ORTB `imp` object to include in the request.
The arguments are:
Expand All @@ -101,7 +100,7 @@ The arguments are:
- `context`: a [context object](#context) that contains at least:
- `bidderRequest`: the `bidderRequest` argument passed to `toORTB`.

#### <a id="params" />Example: attaching custom bid params
#### <a id="params" /> Example: attaching custom bid params

```javascript
const converter = ortbConverter({
Expand Down Expand Up @@ -351,7 +350,7 @@ const converter = ortbConverter({
- the `context` argument of `ortbConverter`: e.g. `ortbConverter({context: {ttl: 30}})`. This will set `context.ttl = 30` globally for the converter.
- the `context` argument of `toORTB`: e.g. `converter.toORTB({bidRequests, bidderRequest, context: {ttl: 30}})`. This will set `context.ttl = 30` only for this request.

### <a id="special-context"/> Special `context` properties
### <a id="special-context" /> Special `context` properties

For ease of use, the conversion logic gives special meaning to some context properties:

Expand Down
3 changes: 2 additions & 1 deletion modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"adqueryIdSystem",
"gravitoIdSystem",
"freepassIdSystem",
"operaadsIdSystem"
"operaadsIdSystem",
"mygaruIdSystem"
],
"adpod": [
"freeWheelAdserverVideo",
Expand Down
59 changes: 59 additions & 0 deletions modules/ad2ictionBidAdapter.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { BANNER } from '../src/mediaTypes.js';
import { getStorageManager } from '../src/storageManager.js';

export const BIDDER_CODE = 'ad2iction';
export const SUPPORTED_AD_TYPES = [BANNER];
export const API_ENDPOINT = 'https://ads.ad2iction.com/html/prebid/';
export const API_VERSION_NUMBER = 3;
export const COOKIE_NAME = 'ad2udid';

export const storage = getStorageManager({ bidderCode: BIDDER_CODE });

export const spec = {
code: BIDDER_CODE,
aliases: ['ad2'],
supportedMediaTypes: SUPPORTED_AD_TYPES,
isBidRequestValid: (bid) => {
return !!bid.params.id && typeof bid.params.id === 'string';
},
buildRequests: (validBidRequests, bidderRequest) => {
const ids = validBidRequests.map((bid) => {
return { bannerId: bid.params.id, bidId: bid.bidId };
});

const options = {
contentType: 'application/json',
withCredentials: false,
};

const udid = storage.cookiesAreEnabled() && storage.getCookie(COOKIE_NAME);

const data = {
ids: JSON.stringify(ids),
ortb2: bidderRequest.ortb2,
refererInfo: bidderRequest.refererInfo,
v: API_VERSION_NUMBER,
udid: udid || '',
_: Math.round(new Date().getTime()),
};

return {
method: 'POST',
url: API_ENDPOINT,
data,
options,
};
},
interpretResponse: (serverResponse, bidRequest) => {
if (!Array.isArray(serverResponse.body)) {
return [];
}

const bidResponses = serverResponse.body;

return bidResponses;
},
};

registerBidder(spec);
30 changes: 30 additions & 0 deletions modules/ad2ictionBidAdapter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Overview

**Module Name**: Ad2iction Bidder Adapter
**Module Type**: Bidder Adapter
**Maintainer**: [email protected]

# Description

The Ad2iction Bidding adapter requires setup before beginning. Please contact us on https://www.ad2iction.com.

# Sample Ad Unit Config
```
var adUnits = [
// Banner adUnit
{
code: 'banner-div',
mediaTypes: {
banner: {
sizes: [[300, 250], [336, 280]]
}
},
bids: [{
bidder: 'ad2iction',
params: {
id: 'accepted-uuid'
}
}]
}
];
```
Loading