NextMillenium Bid Adapter: Remove ortb2 referrerInfo#8868
NextMillenium Bid Adapter: Remove ortb2 referrerInfo#8868patmmccann merged 5 commits intoprebid:masterfrom
Conversation
modules/nextMillenniumBidAdapter.js
Outdated
| function getSiteObj() { | ||
| const refInfo = (getRefererInfo && getRefererInfo()) || {} | ||
|
|
||
| const page = refInfo.page || refInfo.location || getWindowTop().location.href |
There was a problem hiding this comment.
I believe this would throw an error if Prebid is inside an iframe. the first two would be null and the third would throw.
Also, if page is missing, location will also be missing. page is canonicalUrl || location. Unless you want a fallback for the iframe case, you should be able to just copy over page, ref, and domain.
The assumption made for refererInfo is that it's better to get no data rather than bad data, so if there's no good candidate for the top level URL, both page and domain will be null. If you prefer to fallback to the inner frame's URL it seems odd to do it for domain but not page as you have here.
There was a problem hiding this comment.
Got it,
I'll update with no fallbacks then.
Thanks!
There was a problem hiding this comment.
Keep in mind also that the 2nd argument to buildRequests (bidderRequest) has the refererInfo object already. If you pick data from there it will be easier to mock from your tests; your last update broke them because during tests there is no referrer.
There was a problem hiding this comment.
I just removed that test case, as I have domain so I think it's fine,
Before it used to be under device, that's why I had 2...
* Readme: remove dead dev dependency and maintenance badges (#8849) * Readme: remove dead dev dependency badge and issue * Remove maintainability and add back issues * Prebid 7.11.0 release * Increment version to 7.12.0-pre * Adriver Bid and Id Modules: buyerid bug fix (#8768) * initial commit * adriver id submodule add * add id system tests, fix adriver bid adapter tests * adriver: fix buyerid * remarks fixing * removal of excess * delete custom parameter * bug fixes * handle native response privacy link (#8838) Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Criteo Bid Adapter - Add support for banner+native multiformat ad unit (#8842) Previously, the use of a native adunit was exclusive with the banner type. * Ras Bid Adapter: support for SlotSequence parameter (#8792) * add rasbidadapter pos param * Read pos off the adunit * rename conflicting pos parameter for clarity * Improve Digital adapter: refactor code to align with latest RAZR creative tags (#8827) * IX Bid Adapter: Native OpenRTB Request Support (#8853) * fix native click trackers to only fire on click * fix unit tests for ix * remove version for native requests * remove unnecessary request conversion Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Update Sonobi adapter with GVLID (#8860) * dgkeyword RTD provider: fix tests causing ID5 test failures (#8862) * Id5 id configurable fetch flow (#8784) Co-authored-by: Paweł Kowalski <pkowalski@id5.io> * NextMillenium Bid Adapter: Remove ortb2 referrerInfo (#8868) * remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> * adserver.js : remove unused code (#8855) * Displayio Bid Adapter: custom render; fix eids payload (#8847) * Custom render; call pubmatic get user id function is removed * use refererInfo; remove call createEidsArray * VidCrunch LLC bidder (#8872) Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com>
* Create codeql-analysis.yml * Update codeql-analysis.yml * Update instream.html * Update emx_digitalBidAdapter_spec.js * Update index.js * Update index.js * Update index.js * Merge master (#8873) * Readme: remove dead dev dependency and maintenance badges (#8849) * Readme: remove dead dev dependency badge and issue * Remove maintainability and add back issues * Prebid 7.11.0 release * Increment version to 7.12.0-pre * Adriver Bid and Id Modules: buyerid bug fix (#8768) * initial commit * adriver id submodule add * add id system tests, fix adriver bid adapter tests * adriver: fix buyerid * remarks fixing * removal of excess * delete custom parameter * bug fixes * handle native response privacy link (#8838) Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Criteo Bid Adapter - Add support for banner+native multiformat ad unit (#8842) Previously, the use of a native adunit was exclusive with the banner type. * Ras Bid Adapter: support for SlotSequence parameter (#8792) * add rasbidadapter pos param * Read pos off the adunit * rename conflicting pos parameter for clarity * Improve Digital adapter: refactor code to align with latest RAZR creative tags (#8827) * IX Bid Adapter: Native OpenRTB Request Support (#8853) * fix native click trackers to only fire on click * fix unit tests for ix * remove version for native requests * remove unnecessary request conversion Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Update Sonobi adapter with GVLID (#8860) * dgkeyword RTD provider: fix tests causing ID5 test failures (#8862) * Id5 id configurable fetch flow (#8784) Co-authored-by: Paweł Kowalski <pkowalski@id5.io> * NextMillenium Bid Adapter: Remove ortb2 referrerInfo (#8868) * remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> * adserver.js : remove unused code (#8855) * Displayio Bid Adapter: custom render; fix eids payload (#8847) * Custom render; call pubmatic get user id function is removed * use refererInfo; remove call createEidsArray * VidCrunch LLC bidder (#8872) Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com> * Revert "Merge master (#8873)" (#8911) This reverts commit 07c5369. * Update code scan config * Update viewability * Sanitize JSON for adgeneration Co-authored-by: Patrick McCann <patmmccann@gmail.com> Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com>
* remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local>
* Create codeql-analysis.yml * Update codeql-analysis.yml * Update instream.html * Update emx_digitalBidAdapter_spec.js * Update index.js * Update index.js * Update index.js * Merge master (prebid#8873) * Readme: remove dead dev dependency and maintenance badges (prebid#8849) * Readme: remove dead dev dependency badge and issue * Remove maintainability and add back issues * Prebid 7.11.0 release * Increment version to 7.12.0-pre * Adriver Bid and Id Modules: buyerid bug fix (prebid#8768) * initial commit * adriver id submodule add * add id system tests, fix adriver bid adapter tests * adriver: fix buyerid * remarks fixing * removal of excess * delete custom parameter * bug fixes * handle native response privacy link (prebid#8838) Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Criteo Bid Adapter - Add support for banner+native multiformat ad unit (prebid#8842) Previously, the use of a native adunit was exclusive with the banner type. * Ras Bid Adapter: support for SlotSequence parameter (prebid#8792) * add rasbidadapter pos param * Read pos off the adunit * rename conflicting pos parameter for clarity * Improve Digital adapter: refactor code to align with latest RAZR creative tags (prebid#8827) * IX Bid Adapter: Native OpenRTB Request Support (prebid#8853) * fix native click trackers to only fire on click * fix unit tests for ix * remove version for native requests * remove unnecessary request conversion Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Update Sonobi adapter with GVLID (prebid#8860) * dgkeyword RTD provider: fix tests causing ID5 test failures (prebid#8862) * Id5 id configurable fetch flow (prebid#8784) Co-authored-by: Paweł Kowalski <pkowalski@id5.io> * NextMillenium Bid Adapter: Remove ortb2 referrerInfo (prebid#8868) * remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> * adserver.js : remove unused code (prebid#8855) * Displayio Bid Adapter: custom render; fix eids payload (prebid#8847) * Custom render; call pubmatic get user id function is removed * use refererInfo; remove call createEidsArray * VidCrunch LLC bidder (prebid#8872) Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com> * Revert "Merge master (prebid#8873)" (prebid#8911) This reverts commit 07c5369. * Update code scan config * Update viewability * Sanitize JSON for adgeneration Co-authored-by: Patrick McCann <patmmccann@gmail.com> Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com>
* remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local>
* Create codeql-analysis.yml * Update codeql-analysis.yml * Update instream.html * Update emx_digitalBidAdapter_spec.js * Update index.js * Update index.js * Update index.js * Merge master (prebid#8873) * Readme: remove dead dev dependency and maintenance badges (prebid#8849) * Readme: remove dead dev dependency badge and issue * Remove maintainability and add back issues * Prebid 7.11.0 release * Increment version to 7.12.0-pre * Adriver Bid and Id Modules: buyerid bug fix (prebid#8768) * initial commit * adriver id submodule add * add id system tests, fix adriver bid adapter tests * adriver: fix buyerid * remarks fixing * removal of excess * delete custom parameter * bug fixes * handle native response privacy link (prebid#8838) Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Criteo Bid Adapter - Add support for banner+native multiformat ad unit (prebid#8842) Previously, the use of a native adunit was exclusive with the banner type. * Ras Bid Adapter: support for SlotSequence parameter (prebid#8792) * add rasbidadapter pos param * Read pos off the adunit * rename conflicting pos parameter for clarity * Improve Digital adapter: refactor code to align with latest RAZR creative tags (prebid#8827) * IX Bid Adapter: Native OpenRTB Request Support (prebid#8853) * fix native click trackers to only fire on click * fix unit tests for ix * remove version for native requests * remove unnecessary request conversion Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> * Update Sonobi adapter with GVLID (prebid#8860) * dgkeyword RTD provider: fix tests causing ID5 test failures (prebid#8862) * Id5 id configurable fetch flow (prebid#8784) Co-authored-by: Paweł Kowalski <pkowalski@id5.io> * NextMillenium Bid Adapter: Remove ortb2 referrerInfo (prebid#8868) * remove ortb2, get device/site manually * updated tests * remove fallbacks * no need to craete variable if there is no fallback (return in place) * removed one test case Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> * adserver.js : remove unused code (prebid#8855) * Displayio Bid Adapter: custom render; fix eids payload (prebid#8847) * Custom render; call pubmatic get user id function is removed * use refererInfo; remove call createEidsArray * VidCrunch LLC bidder (prebid#8872) Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Demetrio Girardi <dgirardi@prebid.org> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com> * Revert "Merge master (prebid#8873)" (prebid#8911) This reverts commit 07c5369. * Update code scan config * Update viewability * Sanitize JSON for adgeneration Co-authored-by: Patrick McCann <patmmccann@gmail.com> Co-authored-by: Chris Huie <phoenixtechnerd@gmail.com> Co-authored-by: Prebid.js automated release <prebidjs-release@prebid.org> Co-authored-by: m-oranskaya <99481039+m-oranskaya@users.noreply.github.com> Co-authored-by: Love Sharma <sharmak.love@gmail.com> Co-authored-by: Zicong Zhou <zicong.zhou@indexexchange.com> Co-authored-by: Léonard Labat <le.labat@criteo.com> Co-authored-by: wsusrasp <106743463+wsusrasp@users.noreply.github.com> Co-authored-by: Catalin Ciocov <catalin.ciocov@gmail.com> Co-authored-by: Mike Miller <mike@solitaired.com> Co-authored-by: Scott Menzer <scott@id5.io> Co-authored-by: Paweł Kowalski <pkowalski@id5.io> Co-authored-by: JacobKlein26 <42449375+JacobKlein26@users.noreply.github.com> Co-authored-by: Yakov Klein <yakovklein@Yakovs-MacBook-Air.local> Co-authored-by: caseywhitmire <60086994+caseywhitmire@users.noreply.github.com> Co-authored-by: philan15 <37775368+philan15@users.noreply.github.com> Co-authored-by: Gena <wertixvost@gmail.com>
Description of change
Stopped using
bid.ortb2object, as it can be "frozen" (Object.freeze) because of which nextMillennium threw an unexpected error,Instead, the
deviceandsiteobject are created manually (usinggetRefererInfo)