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

Taboola bid adapter: initial release #8385

Closed
wants to merge 83 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
478dc6b
create taboola adapter
mikizi Feb 7, 2022
bb75997
create taboola adapter md
mikizi Feb 7, 2022
a8fe097
taboolaBidAdapter.js - small fixes
mikizi Feb 7, 2022
6314750
taboolaBidAdapter.js - small fixes
mikizi Feb 7, 2022
644ba0f
update the md
mikizi Feb 7, 2022
b09a481
update the Maintainer email
mikizi Feb 8, 2022
0f11f67
* update MD page
mikizi Feb 8, 2022
90b0258
* add privacy to the request builder
mikizi Feb 8, 2022
7b1001c
Merge branch 'master' of https://github.com/prebid/Prebid.js into add…
mikizi Feb 8, 2022
7562ed1
Merge branch 'master' of https://github.com/taboola/Prebid.js into ad…
mikizi Feb 9, 2022
de81396
* code refactoring + add more accurate way to get page url and referer
mikizi Feb 9, 2022
a1dfd88
* code refactoring + gte user id
mikizi Feb 10, 2022
600a9d0
* code refactoring + gte user id
mikizi Feb 13, 2022
7fb1379
* update end point url
mikizi Feb 15, 2022
0cf48ad
small fixes + update epi url
mikizi Feb 21, 2022
2e81b9b
Merge pull request #1 from taboola/add-taboola-bid-adapter
mikizi Apr 24, 2022
7f7a0bc
Merge branch 'master' of https://github.com/prebid/Prebid.js
mikizi May 8, 2022
e6e0235
remove the destruction from the bidResponse property
mikizi May 8, 2022
1dabc41
(update the unit tests) remove the destruction from the bidResponse p…
mikizi May 8, 2022
4e4ff4a
fix tests
mikizi May 9, 2022
9f97222
fix tests - run stubs on each test
mikizi May 9, 2022
40a0cf6
rerun because of another adapter flaky test
mikizi May 9, 2022
07a1508
rerun because of another adapter flaky test
mikizi May 9, 2022
6f73485
fix cors issue, switch between height, width position
mikizi May 10, 2022
c13e0c2
update badv, bcat to be based in the ortb2 to support prebid 7 new pr…
mikizi May 22, 2022
1a81f33
retry run circleci
mikizi May 22, 2022
425281f
retry run circleci
mikizi May 22, 2022
fe9ba64
Merge branch 'master' of https://github.com/prebid/Prebid.js
mikizi May 22, 2022
3196a74
pull from upstream
mikizi May 22, 2022
637c11f
update badv, bcat UT
mikizi May 22, 2022
7ae2995
rerun build
mikizi May 23, 2022
8b56406
rerun build
mikizi May 23, 2022
3ec5b3f
Merge branch 'master' of https://github.com/prebid/Prebid.js
mikizi May 24, 2022
06ecc38
Rename id to aoneId from dacId (#8453)
haruka-yamashita2 May 24, 2022
c434889
Akamai RTD: fixed bugs on rtd module and added the entropy values (#8…
visrivastava May 24, 2022
f11bcda
Zeta global ssp bid adapter: add shortname param (#8454)
asurovenko-zeta May 24, 2022
a6e3c44
Remove medianetRtdProvider tests (#8463)
dgirardi May 24, 2022
170f6fd
Revert "Akamai RTD: fixed bugs on rtd module and added the entropy va…
patmmccann May 24, 2022
e728f54
Prebid 6.26.0 release
prebidjs-release May 24, 2022
b01ec40
Increment version to 6.27.0-pre
prebidjs-release May 24, 2022
14ae8d5
Update fintezaAnalyticsAdapter_spec.js (#8467)
patmmccann May 24, 2022
b97a0ea
Hadron analytics adapter: fix cross-origin exception on init (#8472)
dgirardi May 25, 2022
ce82891
Pulling the URL check out from the logic. Whatever the user passes wi…
ftxmoJason May 25, 2022
e106682
Update conversant adapter to accept position from the AdUnit (#8477)
johnwier May 25, 2022
80430aa
NovatiqId User Module - Include IAB Vendor ID (#8479)
rajsidhunovatiq May 25, 2022
8aaf01b
Multiple modules: attempt to reduce test flakiness, improved logging …
dgirardi May 25, 2022
5882444
Update to move floors logic after placement.sizes are defined (#8476)
mmoschovas May 26, 2022
0ab7e82
Adloox Analytics/RTD: prefer gpid over pbadslot (#8455)
jimdigriz May 26, 2022
2f33e7d
Akamai RTD: fixed bugs on rtd module and added the entropy values (#8…
visrivastava May 26, 2022
f39d849
SOVRN Bid Adapter: refactor old test code (#8430)
cpabst May 26, 2022
7576a67
Tests: remove console.log (#8481)
asurovenko-zeta May 26, 2022
a7891db
Kobler adapter: remove outdated parameters, simplify testing (#8445)
acsbendi May 26, 2022
b898bba
NaveggId module: fixed regex used to get naveggId from LocalStorage (…
jvnnc May 26, 2022
599c827
support storageAllowed restriction on unit tests for prebid 7
mikizi May 26, 2022
37e9f2b
create taboola adapter
mikizi Feb 7, 2022
9e518ba
create taboola adapter md
mikizi Feb 7, 2022
3e2a910
taboolaBidAdapter.js - small fixes
mikizi Feb 7, 2022
2aa70e4
taboolaBidAdapter.js - small fixes
mikizi Feb 7, 2022
0ada596
update the md
mikizi Feb 7, 2022
8603f26
update the Maintainer email
mikizi Feb 8, 2022
e0a2675
* update MD page
mikizi Feb 8, 2022
4ac1cd4
* add privacy to the request builder
mikizi Feb 8, 2022
891fd1e
* code refactoring + add more accurate way to get page url and referer
mikizi Feb 9, 2022
1dd1f4f
* code refactoring + gte user id
mikizi Feb 10, 2022
b99902b
* code refactoring + gte user id
mikizi Feb 13, 2022
dd2c61f
* update end point url
mikizi Feb 15, 2022
4d00a14
small fixes + update epi url
mikizi Feb 21, 2022
8edfa53
remove the destruction from the bidResponse property
mikizi May 8, 2022
306c2f7
(update the unit tests) remove the destruction from the bidResponse p…
mikizi May 8, 2022
22cd757
fix tests
mikizi May 9, 2022
6963eb0
fix tests - run stubs on each test
mikizi May 9, 2022
1757041
rerun because of another adapter flaky test
mikizi May 9, 2022
9229d6b
rerun because of another adapter flaky test
mikizi May 9, 2022
0653add
fix cors issue, switch between height, width position
mikizi May 10, 2022
040b747
update badv, bcat to be based in the ortb2 to support prebid 7 new pr…
mikizi May 22, 2022
c99fbbb
retry run circleci
mikizi May 22, 2022
c39b6cf
retry run circleci
mikizi May 22, 2022
0cdb293
pull from upstream
mikizi May 22, 2022
1c71403
update badv, bcat UT
mikizi May 22, 2022
10acfe7
rerun build
mikizi May 23, 2022
c67302e
rerun build
mikizi May 23, 2022
0784363
support storageAllowed restriction on unit tests for prebid 7
mikizi May 26, 2022
ada62a8
Merge branch 'master' of https://github.com/taboola/Prebid.js
mikizi May 26, 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
8 changes: 5 additions & 3 deletions integrationExamples/gpt/akamaidap_segments_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
}
},
realTimeData: {
auctionDelay: 2000,
dataProviders: [
{
name: "dap",
Expand All @@ -76,9 +77,10 @@
apiHostname: "prebid.dap.akadns.net",
apiVersion: "x1",
domain: "prebid.org",
identityType: "dap-signature:1.0.0",
segtax: 503,
tokenTtl: 5,
identityType: "dap-signature:1.3.0",
segtax: 504,
dapFpUrl: 'https://dap-dist.akamaized.net/dapfingerprinting.js',
dapFpTimeout: 1500
}
}
]
Expand Down
1 change: 1 addition & 0 deletions modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
],
"rtdModule": [
"airgridRtdProvider",
"akamaiDapRtdProvider",
"browsiRtdProvider",
"dgkeywordRtdProvider",
"geoedgeRtdProvider",
Expand Down
14 changes: 9 additions & 5 deletions modules/adlooxAnalyticsAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ MACRO['pageurl'] = function(b, c) {
const refererInfo = getRefererInfo();
return (refererInfo.canonicalUrl || refererInfo.referer || '').substr(0, 300).split(/[?#]/)[0];
};
MACRO['pbadslot'] = function(b, c) {
MACRO['gpid'] = function(b, c) {
const adUnit = find(auctionManager.getAdUnits(), a => b.adUnitCode === a.code);
return deepAccess(adUnit, 'ortb2Imp.ext.data.pbadslot') || getGptSlotInfoForAdUnitCode(b.adUnitCode).gptSlot || b.adUnitCode;
return deepAccess(adUnit, 'ortb2Imp.ext.gpid') || deepAccess(adUnit, 'ortb2Imp.ext.data.pbadslot') || getGptSlotInfoForAdUnitCode(b.adUnitCode).gptSlot || b.adUnitCode;
};
MACRO['pbAdSlot'] = MACRO['pbadslot']; // legacy
MACRO['pbAdSlot'] = MACRO['pbadslot'] = MACRO['gpid']; // legacy

const PARAMS_DEFAULT = {
'id1': function(b) { return b.adUnitCode },
'id2': '%%pbadslot%%',
'id2': '%%gpid%%',
'id3': function(b) { return b.bidder },
'id4': function(b) { return b.adId },
'id5': function(b) { return b.dealId },
Expand Down Expand Up @@ -138,7 +138,11 @@ analyticsAdapter.enableAnalytics = function(config) {
toselector: config.options.toselector || function(bid) {
let code = getGptSlotInfoForAdUnitCode(bid.adUnitCode).divId || bid.adUnitCode;
// https://mathiasbynens.be/notes/css-escapes
code = code.replace(/^\d/, '\\3$& ');
try {
code = CSS.escape(code);
} catch (_) {
code = code.replace(/^\d/, '\\3$& ');
}
return `#${code}`
},
client: config.options.client,
Expand Down
6 changes: 3 additions & 3 deletions modules/adlooxAnalyticsAdapter.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ For example, you have a number of reporting breakdown slots available in the for
tagid: 0,
params: {
id1: function(b) { return b.adUnitCode }, // do not change when using the Adloox RTD Provider
id2: '%%pbadslot%%', // do not change when using the Adloox RTD Provider
id2: '%%gpid%%', // do not change when using the Adloox RTD Provider
id3: function(b) { return b.bidder },
id4: function(b) { return b.adId },
id5: function(b) { return b.dealId },
Expand All @@ -125,9 +125,9 @@ For example, you have a number of reporting breakdown slots available in the for

The following macros are available

* `%%pbadslot%%`: [Prebid Ad Slot](https://docs.prebid.org/features/pbAdSlot.html) returns [`AdUnit.code`](https://docs.prebid.org/features/pbAdSlot.html) if set otherwise returns [`AdUnit.code`](https://docs.prebid.org/dev-docs/adunit-reference.html#adunit)
* **`%%gpid%%` (alias `%%pbadslot%%`**): [Prebid Ad Slot](https://docs.prebid.org/features/pbAdSlot.html) returns [`AdUnit.code`](https://docs.prebid.org/features/pbAdSlot.html) if set otherwise returns [`AdUnit.code`](https://docs.prebid.org/dev-docs/adunit-reference.html#adunit)
* it is recommended you read the [Prebid Ad Slot section in the Adloox RTD Provider documentation](./adlooxRtdProvider.md#prebid-ad-slot)
* `%%pageurl%%`: [`canonicalUrl`](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-Page-URL) from the [`refererInfo` object](https://docs.prebid.org/dev-docs/bidder-adaptor.html#referrers) otherwise uses `referer`
* **`%%pageurl%%`**: [`canonicalUrl`](https://docs.prebid.org/dev-docs/publisher-api-reference/setConfig.html#setConfig-Page-URL) from the [`refererInfo` object](https://docs.prebid.org/dev-docs/bidder-adaptor.html#referrers) otherwise uses `referer`

### Functions

Expand Down
8 changes: 3 additions & 5 deletions modules/adlooxRtdProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,11 @@ function init(config, userConsent) {
function getBidRequestData(reqBidsConfigObj, callback, config, userConsent) {
// gptPreAuction runs *after* RTD so pbadslot may not be populated... (╯°□°)╯ ┻━┻
const adUnits = (reqBidsConfigObj.adUnits || getGlobal().adUnits).map(adUnit => {
let path = deepAccess(adUnit, 'ortb2Imp.ext.data.pbadslot');
if (!path) path = getGptSlotInfoForAdUnitCode(adUnit.code).gptSlot;
return {
path: path,
gpid: deepAccess(adUnit, 'ortb2Imp.ext.gpid') || deepAccess(adUnit, 'ortb2Imp.ext.data.pbadslot') || getGptSlotInfoForAdUnitCode(adUnit.code).gptSlot || adUnit.code,
unit: adUnit
};
}).filter(adUnit => !!adUnit.path);
}).filter(adUnit => !!adUnit.gpid);

let response = {};
function setSegments() {
Expand Down Expand Up @@ -315,7 +313,7 @@ function getBidRequestData(reqBidsConfigObj, callback, config, userConsent) {
}
const atfQueue = [];
adUnits.map((adUnit, i) => {
const ref = [ adUnit.path ];
const ref = [ adUnit.gpid ];
if (!config.params.slotinpath) ref.push(adUnit.unit.code);
args.push(['s', ref.join('\t')]);

Expand Down
4 changes: 2 additions & 2 deletions modules/adlooxRtdProvider.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ To use this, you *must* also integrate the [Adloox Analytics Adapter](./adlooxAn

You may optionally pass a subsection `params` in the `params` block to the Adloox RTD Provider, these will be passed through to the segment handler as is and as described by the integration guidelines.

**N.B.** If you pass `params` to the Adloox Analytics Adapter, `id1` (`AdUnit.code`) and `id2` (`%%pbadslot%%`) *must* describe a stable identifier otherwise no usable segments will be served and so they *must not* be changed; if `id1` for your inventory could contain a non-stable random number please consult with us before continuing
**N.B.** If you pass `params` to the Adloox Analytics Adapter, `id1` (`AdUnit.code`) and `id2` (`%%gpid%%`) *must* describe a stable identifier otherwise no usable segments will be served and so they *must not* be changed; if `id1` for your inventory could contain a non-stable random number please consult with us before continuing

Though our segment technology is fast (less than 10ms) the time it takes for the users device to connect to our service and fetch the segments may not be. For this reason we recommend setting `auctionDelay` no lower than 100ms and if possible you should explore using user-agent sourced information such as [NetworkInformation.{rtt,downlink,...}](https://developer.mozilla.org/en-US/docs/Web/API/NetworkInformation) to dynamically tune this for each user.

Expand All @@ -94,7 +94,7 @@ You may use one of two ways to do achieve this:
* for display inventory [using GPT](https://developers.google.com/publisher-tag/guides/get-started) you may configure Prebid.js to automatically use the [full ad unit path](https://developers.google.com/publisher-tag/reference#googletag.Slot_getAdUnitPath)
1. include the [`gptPreAuction` module](https://docs.prebid.org/dev-docs/modules/gpt-pre-auction.html)
1. wrap both `pbjs.setConfig({...})` and `pbjs.enableAnalytics({...})` with `googletag.cmd.push(function() { ... })`
* set `pbadslot` in the [first party data](https://docs.prebid.org/dev-docs/adunit-reference.html#first-party-data) variable `AdUnit.ortb2Imp.ext.data.pbadslot` for all your ad units
* set `gpid` (or `pbadslot`) in the [first party data](https://docs.prebid.org/dev-docs/adunit-reference.html#first-party-data) variable `AdUnit.ortb2Imp.ext.gpid` (or `AdUnit.ortb2Imp.ext.data.pbadslot`) for all your ad units

## Timeouts

Expand Down
Loading