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

Smaato Bid Adapter: Native support #9089

Merged

Conversation

el-chuck
Copy link
Contributor

@el-chuck el-chuck commented Oct 7, 2022

Type of change

  • Feature

  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

Description of change

Adding native support for Smaato bid adapter

Other information

prebid/prebid.github.io#4064

@el-chuck el-chuck marked this pull request as ready for review October 7, 2022 11:27
@@ -342,6 +426,55 @@ function createVideoImp(bidRequest, videoMediaType) {
};
}

function createNativeImp(bidRequest, nativeMediaType) {
const mainImageSize = nativeMediaType.image.sizes
Copy link
Collaborator

Choose a reason for hiding this comment

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

The documentation for it is still in progress, so the timing of this PR is a bit unfortunate, but prebid now supports native ORTB out of the box with very little adapter code required:

  • bidRequest.nativeOrtbRequest should be an object very similar to your createNativeImp(..).native
  • bids returned by interpretResponse can use the ORTB native response directly ({native: {ortb: JSON.parse(bid.adm)}})

@musikele FYI

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you, i'm having a look and will update the PR

- update to ortb native
Copy link
Collaborator

@dgirardi dgirardi left a comment

Choose a reason for hiding this comment

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

The code LGTM, but beware that I am not able to properly test this with the example config in your md file. If I use this:

{
        "bidder": "smaato",
        "params": {
            "publisherId": "1100042525",
            "adspaceId": "130563103"
        }
    }

the endpoint replies with 204, no content (and no bid). In particular I wanted to verify the server response because this code expects {native: [ORTB native response]}, which is different from what I'm used to - the ORTB native response at the top level.

@el-chuck
Copy link
Contributor Author

i can confirm that (non standard) {native: [ORTB native response]} is what our server responds - so we need to unwrap.

@patmmccann patmmccann merged commit 5885682 into prebid:master Oct 19, 2022
JacobKlein26 pushed a commit to nextmillenniummedia/Prebid.js that referenced this pull request Feb 9, 2023
* PREB-36	[Prebid.js] Native support

* PREB-36	[Prebid.js] Native support
- update to ortb native

Co-authored-by: Ruslan Sibgatullin <ruslan.sibgatullin@smaato.com>
Co-authored-by: Bernhard Pickenbrock <bernhard.pickenbrock@smaato.com>
jorgeluisrocha pushed a commit to jwplayer/Prebid.js that referenced this pull request May 23, 2023
* PREB-36	[Prebid.js] Native support

* PREB-36	[Prebid.js] Native support
- update to ortb native

Co-authored-by: Ruslan Sibgatullin <ruslan.sibgatullin@smaato.com>
Co-authored-by: Bernhard Pickenbrock <bernhard.pickenbrock@smaato.com>
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