Skip to main content
Skip table of contents

Implementing Partners in Prebid

Implementing partners with Prebid.js might seem like a technical challenge, but in practice, you'll find that the process is quite simple. Follow the instructions below to learn how to include Sovrn in your Prebid.js code.

Partners and Parameters

You'll want to bookmark the Bidders page on the official Prebid site, which is available here.

In this context, “bidders” is the same as “partners”. Select the partner you wish to add from the list there (or use ctrl-F to search the page). Take note of the Bidder Code and the required and optional Parameters.

Parameters are simply coded guidelines that tell your ad partner how to submit the bid request to their demand-side brands and advertisers.

For instance, our only required parameter: tagid, refers to the unique numerical identifier assigned to each ad tag created in the Sovrn Platform. As a rule, always discuss any optional parameters with your other ad partners to determine what you need to include.

Header Code Adjustments

Now that you know what parameters you need, locate the partner's ad array in your header code. It should look something like the example below:

CODE
[ 
{ 
code: "div-gpt-ad-1499821056491-0", 
bids: [ 
{ 
bidder: "sovrn", 
params: { 
tagid: 405293 
} 
} 
{ 
bidder: "sovrn", 
params: { 
tagid: 405294 
} 
} 
]

The code value indicates the unique Div ID of the ad unit targeted by the bidder array which follows. The bids key is where you will fill in the necessary bidder code and parameters pulled from the official Prebid site.

In the above example, we placed our bidder code "sovrn" between the quotation marks on line 6, and included the required parameter tagid between the brackets after params.

You cannot place multiple tags within the same bidder object. In the example above, you'll notice there are two different tag IDs, each with the same (but separate) bidder code “sovrn”. This publisher is targeting two different Sovrn tags to the same Div for multiple ad size options. This is the correct formatting for Sovrn as well as other partners.

Further Troubleshooting

If you are still running into issues, double-check that the partner you're trying to add is compatible with the version and build of Prebid you're using. To check, paste this: ?pbjs_debug=true after your page URL in the navigation bar, and pull up your browser's debug console.

Refer to the image below.

image-20240719-200527.png

Need more information or assistance? Send an email to support@sovrn.com & we will do our best to help out.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.