Skip to content

Commit

Permalink
feat/sync with official repo (#52)
Browse files Browse the repository at this point in the history
* Increment version to 6.26.0-pre

* Ogury Bid Adapter: Add device infos with size in bidrequest (prebid#8416)

* Add device infos with size in bidrequest

* trigger rebuild on CI to fix tests

* restore sinon stubbed methods after all tests

* restore stub correctly at end of tests

* trigger rebuild on CI to fix tests

* Video Heroes Bid Adapter: add new bid adapter (prebid#8310)

* added Brave bidder adapter with test and docs 

Commit has standard bidder adapter 2 new files adapter js, adapter md

* added test spec file witch covered code least 80 %

* adding videoHeroes bidder adapter

* added videoHeroes test spec

* Update braveBidAdapter.js

* Update braveBidAdapter.js

* Update videoheroesBidAdapter.md

* upd import of utils lib to load only certain fnc

* cpex Id module: Remove window reference (prebid#8440)

* Remove window reference

* Changed version to string

* Jixie Bid Adapter: add schain (prebid#8439)

* Adapter does not seem capable of supporting advertiserDomains prebid#6650
added response comment and some trivial code.

* removed a blank line at the end of file
added a space behind the // in comments

* in response to comment from reviewer. add the aspect of advertiserdomain in unit tests

* added the code to get the keywords from the meta tags if available.

* jixie sending schain info to jixie backend

* support of schain info sent to jixie endpoint, fixing some indentation complaints from auto build check

* Gravito User Id submodule: initial release (prebid#8414)

* gravitompId user module for integrating gravito first party cookie with prebid js

* fixed eslint issues raised by circleci

* fixed trailing spaces error raised by circleci

* Rename id to aoneId from dacId (prebid#8453)

* Akamai RTD: fixed bugs on rtd module and added the entropy values (prebid#8284)

* Fixed bugs on rtd module and added the entropy values required by Akamai DAP

* Fixed the timeout issue in build browserstack tests

* Fixing review comments

* Fixing review comments - using storage manager for managing localStorage

* Fixing review comments - using loadExternalScript method to load the script

* Fixed unit test case

* Fixing review comments - Added consent handling

* Zeta global ssp bid adapter: add shortname param (prebid#8454)

* zeta_global_sspBidAdapter shortname was added

* remove the trash

Co-authored-by: Surovenko Alexey <[email protected]>

* Remove medianetRtdProvider tests (prebid#8463)

* Revert "Akamai RTD: fixed bugs on rtd module and added the entropy values (prebid#8284)" (prebid#8464)

This reverts commit c434889.

* Prebid 6.26.0 release

* Increment version to 6.27.0-pre

* Update fintezaAnalyticsAdapter_spec.js (prebid#8467)

* Hadron analytics adapter: fix cross-origin exception on init (prebid#8472)

* Pulling the URL check out from the logic. Whatever the user passes will be used (prebid#8473)

Co-authored-by: Jason Lydon <[email protected]>

* Update conversant adapter to accept position from the AdUnit (prebid#8477)

* NovatiqId User Module - Include IAB Vendor ID (prebid#8479)

* Novatiq snowflake userId submodule

Novatiq snowflake userId submodule initial release

* change request updates

added novatiq info /modules/userId/userId.md
added novatiq info /modules/userId/eids.md
added novatiq eids /modules/userId/eids.js
added novatiq module in /modules/.submodules.json
removed unnecessary value from getId response

* Update novatiqIdSystem_spec.js

removed unnecessary srcid value

* Update novatiqIdSystem.md

Novatiq ID System: updated novatiq snowflake ID description

* use the sharedId if available and configured

* updated docs

* test changes

* defensive code not required

* Use the prebid storage manager instead of using native functions

* doc changes

* trailing spaces

* Allow configuration of the sync URL and to allow callbacks for specific custom partner integrations

* update documentation

* attempt to fix firefox test timeout

* include the AIB Vendor Id

Co-authored-by: novatiq <[email protected]>

* Multiple modules: attempt to reduce test flakiness, improved logging for XHR mock race conditions (prebid#8466)

* Datablocks bid adapter: do not send metrics during tests

* Log contents of XHR mock on test failure

* Disable ajax for analytics adapters during tests

* Do not assume that test setup did not fail

* Update to move floors logic after placement.sizes are defined (prebid#8476)

* Adloox Analytics/RTD: prefer gpid over pbadslot (prebid#8455)

* Adloox Analytics: use CSS.escape when possible

* Adloox Analytics/RTD: support GPID

* Akamai RTD: fixed bugs on rtd module and added the entropy values (prebid#8470)

* Fixed bugs on rtd module and added the entropy values required by Akamai DAP

* Fixed the timeout issue in build browserstack tests

* Fixing review comments

* Fixing review comments - using storage manager for managing localStorage

* Fixing review comments - using loadExternalScript method to load the script

* Fixed unit test case

* Fixing review comments - Added consent handling

* SOVRN Bid Adapter: refactor old test code (prebid#8430)

* feat: [EX-3265] format tests for prebid.js adapter

* feat: [EX-3265] add tests for video media type

* feat: [EX-3265] fix test for interpretResponse

* feat: [EX-3265] fix test for interpretResponse

* feat: [EX-3265] fix test for interpretResponse

Co-authored-by: Maxim Pakhomov <[email protected]>
Co-authored-by: Maxim Pakhomov <[email protected]>

* Tests: remove console.log (prebid#8481)

Co-authored-by: Surovenko Alexey <[email protected]>

* Kobler adapter: remove outdated parameters, simplify testing (prebid#8445)

* Removed position parameter.

* Removed zip parameter.

* Removed placementId parameter and make sizes required instead.

* Updated price-related macros.

* Fixed error when params is not provided.

* Removed last occurrence of placementId.

* Read currency.adServerCurrency as publisherCurrency.

* Use DEV endpoint for testing.

* Use config.pageUrl when test is set to true.

* Added more details about page URL.

* `config.pageUrl`.

* Added a comment explaining why pageUrl is considered only when testing.

* Fixed double quotes in tests.

* NaveggId module: fixed regex used to get naveggId from LocalStorage (prebid#8441)

* fixed regex used to get naveggId from LocalStorage

* added unit tests

Co-authored-by: Jose <[email protected]>

* Taboola bid adapter: initial release (prebid#8483)

* create taboola adapter

* create taboola adapter md

* taboolaBidAdapter.js - small fixes
taboolaBidAdapter_spec.js - new UT

* taboolaBidAdapter.js - small fixes
taboolaBidAdapter_spec.js - new UT

* update the md

* update the Maintainer email

* * update MD page
* refactor code for better readability
* small fix in UT

* * add privacy to the request builder
* add relevant Ut
* small fixes in UT

* * code refactoring + add more accurate way to get page url and referer
* add relevant Ut
* small fixes in md

* * code refactoring + gte user id
* add relevant Ut
* small fixes

* * code refactoring + gte user id
* add relevant Ut
* small fixes

* * update end point url
* update UT
* Update banner End point structure

* small fixes + update epi url

* remove the destruction from the bidResponse property

* (update the unit tests) remove the destruction from the bidResponse property

* fix tests

* fix tests - run stubs on each test

* rerun because of another adapter flaky test

* rerun because of another adapter flaky test

* fix cors issue, switch between height, width position

* update badv, bcat to be based in the ortb2 to support prebid 7 new protocols + update Ut

* retry run circleci

* retry run circleci

* pull from upstream
update md (placement + pub )

* update badv, bcat UT

* rerun build

* rerun build

* support storageAllowed restriction on unit tests for prebid 7

* add it also to the aftereach

* add it also to the aftereach

* Prebid 6.27.0 release

* Increment version to 6.28.0-pre

* Ftrack Id Module: replace native appendChild with Prebid's loadExternalScript (prebid#8432)

* JDB-533: replacing appendChild in the ftrack prebid module

* JDB-533: working on switching over to AJAX/CDN

* JDB-533: removing some commented out code

* JDB-533: removing redundant conditions

Co-authored-by: Jason Lydon <[email protected]>

* IncrementX Bid Adapter: Initial Release (prebid#8316)

* IncrementX Bid Adapter: vertoz adapter renamed to IncrementX

* IncrementX Bid Adapter: vertoz adapter renamed to IncrementX
- document updated

* IncrementX Bid Adapter: vertoz adapter renamed to IncrementX
- vertozBidAdapter.md removed

Co-authored-by: Mohit Patil <[email protected]>

* added tests for medianet rtd without loading js (prebid#8485)

Co-authored-by: monis.q <[email protected]>

* Adyoulike Bidder Adapter - schain support (prebid#8486)

* add schain data to the bid request

* add unit test with schain data

* ZetaGlobalSsp BidAdapter: shortname to url (prebid#8471)

* ZetaGlobalSsp bid adapter: shortname param into url param

* fix tests

Co-authored-by: Surovenko Alexey <[email protected]>

* Akamai RTD Module: Fixed randomly failing test cases and updated the variable names (prebid#8487)

* Fixed the randomly failing test cases and updated the variable names

* Improving code quality

* Adriver ID system: fix spurious test failure (prebid#8489)

* Inskin bid adapter: use loadExternalScript utility instead of appendChild() to insert the ad tag (prebid#8490)

* TheMediaGrid: support bid.ortb2.site.content.id (prebid#8492)

* Added TheMediaGridNM Bid Adapter

* Updated required params for TheMediaGridNM Bid Adapter

* Update TheMediGridNM Bid Adapter

* Fix tests for TheMediaGridNM Bid Adapter

* Fixes after review for TheMediaGridNM Bid Adapter

* Add support of multi-format in TheMediaGrid Bid Adapter

* Update sync url for grid and gridNM Bid Adapters

* TheMediaGrid Bid Adapter: added keywords adUnit parameter

* Update TheMediaGrid Bid Adapter to support keywords from config

* Implement new request format for TheMediaGrid Bid Adapter

* Fix jwpseg params for TheMediaGrid Bid Adapter

* Update unit tests for The Media Grid Bid Adapter

* Fix typo in TheMediaGrid Bid Adapter

* Added test for jwTargeting in TheMediaGrid Bid Adapter

* The new request format was made by default in TheMediaGrid Bid Adapter

* Update userId format in ad request for TheMediaGrid Bid Adapter

* Added bidFloor parameter for TheMediaGrid Bid Adapter

* Fix for review TheMediaGrid Bid Adapter

* Support floorModule in TheMediaGrid Bid Adapter

* Fix empty bidfloor for TheMediaGrid Bid Adapter

* Some change to restart autotests

* Fix userIds format for TheMediaGrid Bid Adapter

* Remove digitrust userId from TheMediaGrid Bid Adapter

* Protocols was added in video section in ad request for TheMediaGrid Bid Adapter

* TheMediaGrid: fix trouble with alias using

* TheMediaGridNM: fix trouble with alias

* TheMediaGrid Bid Adapter: added support of PBAdSlot module

* TheMediaGrid Bid Adapter: fix typo

* GridNM Bid Adapter: use absent in params data from mediaTypes

* GridNM Bid Adapter: fix md file + add advertiserDomains support

* TheMediaGrid and gridNM Bid Adapter: minor netRevenue fixes

* gridNM Bid Adapter updates after review

* TheMediaGrid Bid Adapter: fix keywords workflow

* fix testing and kick off lgtm again

* TheMediaGrid: added ext.bidder.grid.demandSource processing

* TheMediaGrid: added user.id from fpd cookie

* TheMediaGrid: control cookie setting via bidder config

* TheMediaGrid: use localStorage instead cookie

* TheMediaGridNM Bid Adapter: update adapter to use /hbjson endpoint

* TheMediaGridNM: fix unnecessary conditions

* TheMediaGrid: fix bug with nurl field in response

* TheMediaGrid: update test

* TheMediaGridNM: fix possible bug with nurl

* TheMediaGrid: added alias as playwire

* TheMediaGrid: added alias as adlivetech

* TheMediaGrid: fix sync url workflow

* TrustX: fix sync url worflow + remove old syncurl

* TheMediaGrid: added instl support

* TheMediaGrid: fix test for instl

* TheMediaGrid: update md file

* TheMediaGrid: reformat segments for permutive rtd module

* TrustX: send all ortb2.user.data in user.data

* TheMediaGrid: remove permutive segments reformating

* TrustX: remove permutive segments reformating

* TheMediaGrid & TrustX: fix typo

* TheMediaGrid: support bid.ortb2.site.content

* TheMediaGrid Bid Adapter: support bid.ortb2.site.content.id

Co-authored-by: Chris Huie <[email protected]>

* Fix for prebid#8421 (prebid#8493)

* Sending no decode whole url options to true, to avoid errors while decoding publisher url (prebid#8497)

* Automatad Bid Adapter: changes to ajax request options for bid requests (prebid#8444)

* changes for ajax request options for automatad bid request

* add test for isCredentials changes

* Various Magnite Adapters: GVL ID update (prebid#8501)

* Magnite adapters still require legacy GVL IDs

* CTV update

* Adf adapter: avoid preflight request (prebid#8498)

* Hadron RTD module: use internal methods (prebid#8496)

* following prebid team's advise

* adding to adloader.js

* removing generic import

* using internal methods for loading external scripts in medianetRtdProvider (prebid#8506)

Co-authored-by: monis.q <[email protected]>

* Criteo - Update Publisher Tag version referenced by prebid adapter (prebid#8491)

* Kargo Bid Adapter: onTimeout Support (prebid#8449)

* Kargo Bid Adapter: Use currency from Bid Response

* Kargo Bid Adapter: Fix failed test

* Kargo Bid Adapter: adding media type to bid response, supporting vastXml response (prebid#8426)

* kargo adapter - adding mediaType to bid response, conditionally set vastXml field

* kargo adapter - updating tests

* Kargo Bid Adapter: onTimeout Support (#6)

* Adding additional param

* Adding response time function

* Remove debug

* Updating response time log to be set by bid response

* Adding screen width/height to request

* Test fix

* Test fix

* Removing interpretResponse signaling

* Simplifying send data function

Co-authored-by: Wei Wong <[email protected]>
Co-authored-by: Andy Rusiecki <[email protected]>

* Prebid 6.28.0 release

* Increment version to 6.29.0-pre

* CAPT-74: Pass ext section of each bid for prebid slot ID and GPID (prebid#8509)

Co-authored-by: Timothy M. Ace <[email protected]>

* Insticator Bid adapter: Adds Support for Video (prebid#8452)

* feat: added support for video

* feat: added support for mimes

* feat: added mimes check to video validation

* Gdpr Enforcement module and sharedId/pubCommonId modules: vendor consent should not be enforced for first-party-id modules (prebid#8448)

* Fixed issue with gdprEnforcement module and sharedId/pubCommonId modules: vendor consent should not be enforced for first-party-id modules

* addressed review comments

* addressed review comments

* added test to ensure device access is not allowed for vendorless modules in case purpose 1 consent isn't given

* fixed issue with missing moduleType param

Co-authored-by: Serhii Holdun <[email protected]>

* fix: set config for ci

Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: Jonathan Nadarajah <[email protected]>
Co-authored-by: Sacha <[email protected]>
Co-authored-by: David Spohr <[email protected]>
Co-authored-by: jxdeveloper1 <[email protected]>
Co-authored-by: rahulgravito <[email protected]>
Co-authored-by: haruka-yamashita2 <[email protected]>
Co-authored-by: Vikas Srivastava <[email protected]>
Co-authored-by: asurovenko-zeta <[email protected]>
Co-authored-by: Surovenko Alexey <[email protected]>
Co-authored-by: Demetrio Girardi <[email protected]>
Co-authored-by: Patrick McCann <[email protected]>
Co-authored-by: Jason Lydon <[email protected]>
Co-authored-by: Jason Lydon <[email protected]>
Co-authored-by: johnwier <[email protected]>
Co-authored-by: rajsidhunovatiq <[email protected]>
Co-authored-by: novatiq <[email protected]>
Co-authored-by: mmoschovas <[email protected]>
Co-authored-by: Alexander Clouter <[email protected]>
Co-authored-by: Chris Pabst <[email protected]>
Co-authored-by: Maxim Pakhomov <[email protected]>
Co-authored-by: Maxim Pakhomov <[email protected]>
Co-authored-by: Bendegúz Ács <[email protected]>
Co-authored-by: José Venâncio <[email protected]>
Co-authored-by: Jose <[email protected]>
Co-authored-by: mikiz <[email protected]>
Co-authored-by: Prebid-Team <[email protected]>
Co-authored-by: Mohit Patil <[email protected]>
Co-authored-by: Monis Qadri <[email protected]>
Co-authored-by: monis.q <[email protected]>
Co-authored-by: guiann <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: TheMediaGrid <[email protected]>
Co-authored-by: Chris Huie <[email protected]>
Co-authored-by: Paris Holley <[email protected]>
Co-authored-by: shubham.si <[email protected]>
Co-authored-by: Kanchika - Automatad <[email protected]>
Co-authored-by: bretg <[email protected]>
Co-authored-by: Jurij Sinickij <[email protected]>
Co-authored-by: joseluis laso <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: Jeremy Sadwith <[email protected]>
Co-authored-by: Wei Wong <[email protected]>
Co-authored-by: Andy Rusiecki <[email protected]>
Co-authored-by: Timothy Ace <[email protected]>
Co-authored-by: Timothy M. Ace <[email protected]>
Co-authored-by: Serhii Holdun <[email protected]>
Co-authored-by: Serhii Holdun <[email protected]>
  • Loading branch information
Show file tree
Hide file tree
Showing 88 changed files with 4,206 additions and 1,040 deletions.
128 changes: 63 additions & 65 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,83 +5,81 @@

aliases:
- &environment
docker:
# specify the version you desire here
- image: circleci/node:12.16.1-browsers
resource_class: xlarge
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/Prebid.js
docker:
# specify the version you desire here
- image: circleci/node:12.16.1
resource_class: xlarge
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
working_directory: ~/Prebid.js

- &restore_dep_cache
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- &save_dep_cache
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

- &install
name: Install gulp cli
command: sudo npm install -g gulp-cli
name: Install gulp cli
command: sudo npm install -g gulp-cli

- &run_unit_test
name: BrowserStack testing
command: gulp test --browserstack --nolintfix

- &run_endtoend_test
name: BrowserStack End to end testing
command: gulp e2e-test

# Download and run BrowserStack local
- &setup_browserstack
name : Download BrowserStack Local binary and start it.
command : |
# Download the browserstack binary file
wget "https://www.browserstack.com/browserstack-local/BrowserStackLocal-linux-x64.zip"
# Unzip it
unzip BrowserStackLocal-linux-x64.zip
# Run the file with user's access key
./BrowserStackLocal ${BROWSERSTACK_ACCESS_KEY} &
- &unit_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm ci
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
- run: *run_unit_test

- &endtoend_test_steps
- checkout
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run: *setup_browserstack
- run: *run_endtoend_test

version: 2
version: 2.1
orbs:
aws-s3: circleci/[email protected]
jobs:
build:
<<: *environment
steps: *unit_test_steps

e2etest:
steps:
- checkout
- run: echo "export UPLOAD_DEST='s3://embedproduction/files/instbid-$(git describe --tags).js'" >> "$BASH_ENV"
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run:
name: Build Prebid.js
command: gulp build --modules=modules.json
- aws-s3/copy:
from: build/dist/prebid.js
to: '"$UPLOAD_DEST"'
arguments: --cache-control 'max-age=86400'
build_v6:
<<: *environment
steps: *endtoend_test_steps
steps:
- checkout
- run: echo "export UPLOAD_DEST='s3://embedproduction/files/instbid-$(git describe --tags).js'" >> "$BASH_ENV"
- restore_cache: *restore_dep_cache
- run: npm install
- save_cache: *save_dep_cache
- run: *install
- run:
name: Build Prebid.js version 6
command: gulp build --modules=modules.json
- aws-s3/copy:
from: build/dist/prebid.js
to: '"$UPLOAD_DEST"'
arguments: --cache-control 'max-age=86400'

workflows:
version: 2
commit:
build:
jobs:
- build

experimental:
pipelines: true
- build:
context: org-aws
filters:
branches:
only:
- master
- build_v6:
context: org-aws
filters:
branches:
only:
- /prebid6-.*/
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,
dapEntropyUrl: 'https://dap-dist.akamaized.net/dapentropy.js',
dapEntropyTimeout: 1500
}
}
]
Expand Down
3 changes: 3 additions & 0 deletions integrationExamples/gpt/userId_example.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@
},
{
"name": "dacId"
},
{
"name": "gravitompId"
}
],
"syncDelay": 5000,
Expand Down
4 changes: 3 additions & 1 deletion modules/.submodules.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@
"unifiedIdSystem",
"verizonMediaIdSystem",
"zeotapIdPlusIdSystem",
"adqueryIdSystem"
"adqueryIdSystem",
"gravitoIdSystem"
],
"adpod": [
"freeWheelAdserverVideo",
"dfpAdServerVideo"
],
"rtdModule": [
"airgridRtdProvider",
"akamaiDapRtdProvider",
"browsiRtdProvider",
"dgkeywordRtdProvider",
"geoedgeRtdProvider",
Expand Down
3 changes: 0 additions & 3 deletions modules/adfBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ export const spec = {
method: 'POST',
url: 'https://' + adxDomain + '/adx/openrtb',
data: JSON.stringify(request),
options: {
contentType: 'application/json'
},
bids: validBidRequests
};
},
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 @@ -108,7 +108,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 @@ -127,9 +127,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
3 changes: 3 additions & 0 deletions modules/adyoulikeBidAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export const spec = {
if (typeof bidReq.getFloor === 'function') {
accumulator[bidReq.bidId].Pricing = getFloor(bidReq, size, mediatype);
}
if (bidReq.schain) {
accumulator[bidReq.bidId].SChain = bidReq.schain;
}
if (mediatype === NATIVE) {
let nativeReq = bidReq.mediaTypes.native;
if (nativeReq.type === 'image') {
Expand Down
Loading

0 comments on commit e7f5869

Please sign in to comment.