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

NextMillenium Bid Adapter: Remove ortb2 referrerInfo #8868

Merged
merged 5 commits into from
Aug 19, 2022

Conversation

JacobKlein26
Copy link
Contributor

  • Bugfix

Description of change

Stopped using bid.ortb2 object, as it can be "frozen" (Object.freeze) because of which nextMillennium threw an unexpected error,

Instead, the device and site object are created manually (using getRefererInfo)

@patmmccann patmmccann changed the title Remove ortb2 NextMillenium Bid Adapter: Remove ortb2 referrerInfo Aug 18, 2022
@patmmccann patmmccann requested a review from dgirardi August 18, 2022 20:41
function getSiteObj() {
const refInfo = (getRefererInfo && getRefererInfo()) || {}

const page = refInfo.page || refInfo.location || getWindowTop().location.href
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it,
I'll update with no fallbacks then.

Thanks!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

@patmmccann patmmccann merged commit 4a3daec into prebid:master Aug 19, 2022
patmmccann added a commit that referenced this pull request Aug 21, 2022
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Demetrio Girardi <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>
patmmccann added a commit that referenced this pull request Aug 31, 2022
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Demetrio Girardi <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>

* Revert "Merge master  (#8873)" (#8911)

This reverts commit 07c5369.

* Update code scan config

* Update viewability

* Sanitize JSON for adgeneration

Co-authored-by: Patrick McCann <[email protected]>
Co-authored-by: Chris Huie <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>
JacobKlein26 added a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
* 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 <[email protected]>
JacobKlein26 added a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Demetrio Girardi <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>

* 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 <[email protected]>
Co-authored-by: Chris Huie <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
* 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 <[email protected]>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Demetrio Girardi <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>

* 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 <[email protected]>
Co-authored-by: Chris Huie <[email protected]>
Co-authored-by: Prebid.js automated release <[email protected]>
Co-authored-by: m-oranskaya <[email protected]>
Co-authored-by: Love Sharma <[email protected]>
Co-authored-by: Zicong Zhou <[email protected]>
Co-authored-by: Léonard Labat <[email protected]>
Co-authored-by: wsusrasp <[email protected]>
Co-authored-by: Catalin Ciocov <[email protected]>
Co-authored-by: Mike Miller <[email protected]>
Co-authored-by: Scott Menzer <[email protected]>
Co-authored-by: Paweł Kowalski <[email protected]>
Co-authored-by: JacobKlein26 <[email protected]>
Co-authored-by: Yakov Klein <[email protected]>
Co-authored-by: caseywhitmire <[email protected]>
Co-authored-by: philan15 <[email protected]>
Co-authored-by: Gena <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants