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

Add StickyAdsTV Bidder adapter #916

Merged
merged 18 commits into from
Feb 9, 2017
Merged

Conversation

guillaume-sticky
Copy link
Contributor

Type of change

  • Bugfix
  • Feature
  • [ x] New bidder adapter
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other

Description of change

Add StickyAdsTV Bidder Adaptor

  • test parameters for validating bids
{
  bidder: 'stickyadstv',
  params: {
    zoneId : 277225  //only this parameter is mandatory
  }
}

Other information

Contact: gandouard@freewheel.tv

Test page: http://sandbox.stickyadstv.com/qa/prebid.html

@mkendall07
Copy link
Member

Please fix test failures.

@guillaume-sticky
Copy link
Contributor Author

Done by merging in master.


var script = "<script type='text/javascript'>"+

"var vast = window.top.stickyadstv_cache[\""+placementCode+"\"];"+
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use of window.top will not work when running in a cross domain iframe, which is increasingly more common. Delivery of creatives into a SafeFrame, for example, or when integrating Prebid with an AMP Page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, I'll remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Is there a way I can get the context where my script has been loaded before the bid?

When I use "adloader.loadScript" I load a full API that I would need to access again inside the "Ad" (html/javascript loaded if my bid wins) which is loaded inside an iframe.

That is what "window.top" was for.

var bidObject;
if(valid && priceData) {
// valid bid response
bidObject = bidfactory.createBid(1);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pass in the bid requested here so the request/response pair can be matched.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How? the documentation says to use "var bidObject = bidfactory.createBid(1);"
see: http://prebid.org/dev-docs/bidder-adaptor.html

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK, seen an example in bidder adaptor AppNexus.js:
bidfactory.createBid(1, bidObj);

You should add it in the documentation, I didn't find an API reference for the bidfactory.
(did I miss it?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, thanks, created an issue on docs repo:
prebid/prebid.github.io#168

}
else {
// invalid bid response
bidObject = bidfactory.createBid(2);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Pass in the bid requested here as well.

@protonate
Copy link
Collaborator

@guillaume-sticky please let us know the status on this, thanks.

@guillaume-sticky
Copy link
Contributor Author

I'm sorry I was quite busy those days.

I'll push the requested modifications soon.

@guillaume-sticky
Copy link
Contributor Author

Updated with requested modifications.

@protonate
Copy link
Collaborator

This appears to be a video adapter. Please have a look at the docs on video support: http://prebid.org/dev-docs/show-video-with-a-dfp-video-tag.html

This PR can be updated to incorporate the video config as described.

@guillaume-sticky
Copy link
Contributor Author

guillaume-sticky commented Feb 8, 2017

Can you be more specific on what is needed here ? We don't want to use your video player example as we are already setup our player as we need it.

I guess I have to declare the supported media type video ?
"supportedMediaTypes" : ["video"]

Is that it ?

@protonate
Copy link
Collaborator

@guillaume-sticky yes and also set the bid.mediaType to "video". This way the adapter will be registered as a video adapter and the bid will be handled as a video bid.

@mkendall07
Copy link
Member

@guillaume-sticky
Please hold off on changes for now. You only need to designate bid.mediaType to "video" if the bid returns a VAST response.

This format appears to be in banner video, is that correct?

@guillaume-sticky
Copy link
Contributor Author

guillaume-sticky commented Feb 8, 2017

Yes it is, we never return a VAST response, we give the html ad in a bid object to be displayed in banner.

So "supportedMediaTypes" : ["video"] will be enough ?

@protonate
Copy link
Collaborator

@guillaume-sticky This is good as-is, thanks for the contribution!

@protonate protonate merged commit 82fd5a5 into prebid:master Feb 9, 2017
@guillaume-sticky
Copy link
Contributor Author

guillaume-sticky commented Mar 2, 2017

Thank you for adding stickyadstv bidder adapter.

I wonder if we should worry about the 20$ CPM cap? As we could see some CPM over 20$ in our video platform.
When I run tests using a price over 20$ everything seems fine.

And if we need to work around this, can we do it from inside the bidder adapter or is the "custom price bucket" something the publisher needs to setup?

mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…ebid-official-0.19.0 to release/1.14.0

* commit 'b13f7ba7ee8b3c168dc0af7c8bfc94747d017e70': (34 commits)
  Add changelog entry.
  Prebid 0.19.0 Release
  check truthiness of adUnitCode (prebid#990)
  fixed exception when refreshing individual Ad Units and bidder responds slowly (prebid#989)
  Stub pixel drop to prevent network request in test (prebid#988)
  Updating Komoona adapter to support future Prebid requirements (prebid#974)
  Use stable version of Chrome (prebid#984)
  Revert to running browser tests in Travis (prebid#983)
  Fix issue with appnexusAst sending `user` object in the wrong place. (prebid#980)
  Integrate Browserstack tests into Travis CI build (prebid#839)
  Add StickyAdsTV Bidder adapter (prebid#916)
  Stronger xdomain checks (prebid#971)
  added matomy as an alias for appnexus (prebid#850)
  Added 152Media Appnexus Alias (prebid#952)
  OpenX Adapter: Handles fallback ads correctly as a no fill (prebid#39) (prebid#963)
  Use package dependencies for ES6 Array shims (prebid#962)
  Make x-domain safe frame example work out of the box (prebid#955)
  added usersync for adkernel adapter (prebid#951)
  Rubicon adapter: add a floor variable (prebid#964)
  Added Lifestreet adapter. (prebid#965)
  ...
mp-12301 pushed a commit to aol/Prebid.js that referenced this pull request Apr 10, 2017
…14.0 to master

* commit 'c008f3f531ae3409f4a16bf03470d84e82aead0e': (35 commits)
  Add adapters in aolPartnersIds.json.
  Add changelog entry.
  Prebid 0.19.0 Release
  check truthiness of adUnitCode (prebid#990)
  fixed exception when refreshing individual Ad Units and bidder responds slowly (prebid#989)
  Stub pixel drop to prevent network request in test (prebid#988)
  Updating Komoona adapter to support future Prebid requirements (prebid#974)
  Use stable version of Chrome (prebid#984)
  Revert to running browser tests in Travis (prebid#983)
  Fix issue with appnexusAst sending `user` object in the wrong place. (prebid#980)
  Integrate Browserstack tests into Travis CI build (prebid#839)
  Add StickyAdsTV Bidder adapter (prebid#916)
  Stronger xdomain checks (prebid#971)
  added matomy as an alias for appnexus (prebid#850)
  Added 152Media Appnexus Alias (prebid#952)
  OpenX Adapter: Handles fallback ads correctly as a no fill (prebid#39) (prebid#963)
  Use package dependencies for ES6 Array shims (prebid#962)
  Make x-domain safe frame example work out of the box (prebid#955)
  added usersync for adkernel adapter (prebid#951)
  Rubicon adapter: add a floor variable (prebid#964)
  ...
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.

4 participants