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

Update for Media.net adapter #2232

Merged
merged 4 commits into from
Mar 19, 2018
Merged

Conversation

vedantseta
Copy link
Contributor

Type of change

  • Feature

Description of change

This PR adds the following :

  • ability to log client side timeouts.
  • sending extra params In bidRequest which are tmax, prebid_version and all


let bidParams = {};

events.on(BID_TIMEOUT, function (timedOutBidders) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Listening to and logging event data isn't allowed in a bidder adapter, but is in an analytics adapter.

Choose a reason for hiding this comment

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

Hey @matthewlane ,

Shouldn't the bidder timeout be allowed in the main adapter, the analytics adapter could listen to a lot more events based on the environment. The publisher might not always pick the analytics adapter, as it generally leads to more px calls on the browser.

However the client timeout is an important event that the bidder must listen to to optimize, tweak things at its end. This optimization could directly lead to better yields to the publisher.

Your views?

Thanks,
Ruturaj

Copy link
Collaborator

Choose a reason for hiding this comment

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

Makes sense. The BID_TIMEOUT event still shouldn't be listened to in bidder adapters as it may contain data from other bidders, even though you are filtering them out below, but I've create an issue to define and implement a way for bidders to subscribe to their own timed out event data: #2254. Feel free to comment on that or use it for tracking and whenever a PR is merged you'll be able to use it here

@vedantseta
Copy link
Contributor Author

@matthewlane , We have removed timeout event binding, can you please check and merge ?


const BIDDER_CODE = 'medianet';
const BID_URL = 'https://prebid.media.net/rtb/prebid';

$$PREBID_GLOBAL$$.medianetGlobals = {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is ok since no public api functions are being invoked but we encourage adapters to use $$PREBID_GLOBAL$$ as little as possible. localStorage might suit this use case without needing to use the pbjs global

@matthewlane matthewlane merged commit b9906c3 into prebid:master Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants