How to add partners into your Prebid.js wrapper



Implementing partners with correct parameters in Prebid.js may sound intimidating to the digital publisher with marginal experience in header bidding. In practice, however, you’ll find that the process is quite simple.

Partners and Parameters

You’ll want to bookmark the Bidders page on the official Prebid site: In this context, Bidders is synonymous to 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 which tell your ad partner how to submit the bid request to their demand-side brands and advertisers.

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

Header Code Adjustments

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

      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 Sovrn’s 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.

These posts intend to make header bidding through Prebid approachable for the everyday publisher. Topics for the post are selected based on commonly submitted publisher help tickets. If you have a suggestion for a future topic, feel free to comment on this post.

Did you find this helpful? What other resources do you use for expanding your knowledge of Prebid? Did I miss something you think is too important to leave out?

Did You Miss: Easy Guide to GDPR, ads.txt, Charles, Ad blocking, Net Neutrality