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

Missena Bid Adapter: floor implementation #10534

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

pdamoc
Copy link
Contributor

@pdamoc pdamoc commented Sep 26, 2023

Type of change

  • Feature

Description of change

This is an implementation of the passing of the relevant price floor data to our server.

Other information

The PR also includes a small refactoring of the event notification used for onBidWon that is also reused for onTimeout.

@ChrisHuie
Copy link
Collaborator

@pdamoc can you please add units tests for these updates

@pdamoc
Copy link
Contributor Author

pdamoc commented Sep 27, 2023

We will add the tests for the floor changes and remove the notification refactoring (which we will submit in a later PR).

@ChrisHuie ChrisHuie removed the request for review from lksharma September 29, 2023 12:07
@pdamoc pdamoc marked this pull request as ready for review October 2, 2023 09:08
@pdamoc
Copy link
Contributor Author

pdamoc commented Oct 2, 2023

The update includes tests for the bid floor. I have removed the notification refactoring and simplified the floor implementation.

The onBidWon pixel has been updated to use the originalCpm.

@ChrisHuie ChrisHuie changed the title Missena: floor implementation Missena Bid Adapter: floor implementation Oct 5, 2023
if (!isFn(bidRequest.getFloor)) {
return {};
}
const sizesArray = getSizeArray(bidRequest);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think this is necessary, the floors module will already pick size from the request when it makes sense. What this does is force using the first size when there are multiple instead of looking for a floor that applies to all sizes.

Unless that was your intention I recommend removing this. (I am learning now that a lot of other adapters do this, so I suspect you're just following the pattern, which is unfortunately not a good one).

Copy link
Collaborator

Choose a reason for hiding this comment

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

To clarify - if you just call getFloor(), it will attempt to find reasonable defaults:

  • currency defaults to 'USD'
  • mediaType defaults to the request's if it contains only one
  • size defaults to the request's if it contains only one (which implies it also has only one mediaType)

Copy link
Contributor Author

@pdamoc pdamoc Oct 17, 2023

Choose a reason for hiding this comment

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

@dgirardi the functions you mentioned have been removed by @ysfbsf (my colleague who wrote this code). We will rely on our partners to properly configure their bidFloors (the code was there for corner cases).

Please let us know if we need to change anything else.

@pdamoc pdamoc requested a review from dgirardi October 19, 2023 08:26
@pdamoc
Copy link
Contributor Author

pdamoc commented Nov 15, 2023

@ChrisHuie is there anything else that is blocking this PR from being merged into the master?

@ChrisHuie ChrisHuie merged commit c027061 into prebid:master Nov 15, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants