Prebid Integrations

Prebid.js

A Prebid.js wrapper integration is another Triplelift supported integration type. Triplelift is a Prebid approved bidder and continuously updates the Triplelift bid adapter to add new features and improvements. The Prebid open source project is currently operating on Prebid v7.0+. The following is the process for adding Triplelift to the publisher’s existing Prebid.js integration:

  • Add the Triplelift Bid adapter module to your existing Prebid build via the
    following method:

         gulp build --modules=tripleliftBidAdapter

  • Configure each of the Prebid ad units that the publisher has set up on the page to
    include unique Triplelift bidder parameters that correspond to the respective ad unit.
    The following parameters are the required and optional Triplelift bid parameters:

    Banner:

              var adUnits = [
                 {
                   code: 'top-banner',
                   mediaTypes: {
                      banner: {
                         sizes: [
                            [728, 90],
                            [970, 250]
                         ]
                      }
                   },
                   bids: [{
                      bidder: 'triplelift',
                      params: {
                         inventoryCode: 'leaderboard'
                      }
                   }]
                 }
              ]
    

         
Video:

         var videoAdUnits = [
            {
              code: 'video1',
              mediaTypes: {
                 video: {
                    playerSize: [640, 480],
                    context: 'instream',
                    mimes: ['video/mp4']
                 }
              },
              bids: [{
                 bidder: 'triplelift',
                 params: {
                    inventoryCode: 'instream1',
                    video: {
                       w: 640,
                       h: 480
                    }
                 }
              }]
            }
         ]
  • If the publisher is using Google Ad Manager (GAM) as their primary ad server, they must
    create orders and line items for Triplelift unless they have global orders (not bidder-
    specific) set up. The following can be used as a guide when creating orders and line
    items in GAM: Prebid Ad Ops Guide

For more information on our bid adapter and bidder params, see Triplelift Bidder Parameters

Prebid Server

A Prebid Server integration is also a Triplelift supported integration type. The quickest and easiest way for a publisher to work with Prebid Server is for them to sign up to an already hosted Prebid Server solution. Currently supported vendors include Xandr, Magnite and OpenX, though new hosts are constantly being set up:
Existing Prebid Server Hosts

If a publisher wishes to host their own Prebid Server cluster for bidders to plug into, they can find the process for doing so here:
Prebid Server Hosting

The following is the process for adding Triplelift to the publisher’s existing Prebid Server integration via Prebid.js:

  • The following example is if the publisher has chosen to plug into AppNexus’ Prebid Server
    cluster:
           pbjs.setConfig({
               s2sConfig: {
                  accountId : '12345',
                  bidders : ['appnexus','triplelift'],
                  defaultVendor: 'appnexus',
                  timeout: 300
               }
           });
    

         The accountID in this configuration uniquely identifies the publisher within the
respective Prebid Server cluster.

For any additional questions regarding Prebid Server, you can reference the following Prebid.org documentation:

Prebid Server Overview

First Party Data

Prebid has designed an easy way for publishers to set first party data and have that data sent in bid requests to TLX and other bidders. At the moment, Triplelift is only able to use this first party data for deal targeting, but this process may be updated soon to include the use cases of ‘enhancement of bid request signaling’ and ‘open market targeting’.

First Party Data Documentation

As of Prebid v4.30, Prebid has described the structure for setting first party data that is consistent with OpenRTB 2.5 standards. If a publisher is running Prebid v4.30 or greater and they are setting first party data via Prebid, they should be using this structure. There is currently three different types of first party data that a publisher can send:

  • AdUnit-specific first party data. This data is set at the ad unit level and applies to
    all bidders (all bid adapters are capable of picking this data up).

     pbjs.addAdUnits({
        code: "test-div",
        mediaTypes: {
           banner: {
              sizes: [[300,250]]
           }
        },
        ortb2Imp: {
           ext: {
        data: {
                pbadslot: "homepage-top-rect",
                adUnitSpecificContextAttribute: "123"
        }
           }
        },
        ...
     });
    
  • Global site and user first party data. This data is set via a global Prebid function
    pbjs.setConfig({}) and is available to all bidders:

    pbjs.setConfig({
      ortb2: {
        site: {
          name: "example",
          domain: "page.example.com",
          cat: ["IAB2"],
          sectioncat: ["IAB2-2"],
          pagecat: ["IAB2-2"],
          page: "https://page.example.com/here.html",
          ref: "https://ref.example.com",
          keywords: "power tools, drills",
          search: "drill",
          content: {
            userrating: "4",
            data: [{
       	        name: "www.dataprovider1.com",
       	        ext: {
                    segtax: 7,
    	            cids: [ "iris_c73g5jq96mwso4d8" ]
                },
               segment: [
         		    { id: "687" },
         		    { id: "123" }
               ]
             }]
         },
         ext: {
             data: {   // fields that aren't part of openrtb 2.5
                 pageType: "article",
                 category: "repair"
             } 
         }
          },
         user: {
            yob: 1985,
            gender: "m",
            keywords: "a,b",
           data: [{
              name: "dataprovider.com",
              ext: { segtax: 4 },
               segment: [
                  { id: "1" }
               ]
           }],
           ext: {
                data: {
                    registered: true,
                    interests: ["cars"]
              }
           }
        }
      }
    });
    
  • Bidder-specific site and/or user data that applies to only a specified set of bidders.
    This data can be set using a function called pbjs.setBidderConfig({})

     pbjs.setBidderConfig({
       bidders: ['bidderA', 'bidderB'],
       config: {
         ortb2: {
           site: {
             ext: {
                data: {
                   pageType: "article",
                   category: "tools"
                }
             }
           },
           user: {
             ext: {
                data: {
                   registered: true,
                   interests: ["cars"]
                 }
             }
           }
         }
       }
     });
    

Consent Management

Prebid offers a consent management module that the publisher will need to add to their existing Prebid build in order for Prebid, in conjunction with an IAB approved CMP, to gather a user’s consent / opt-out if applicable.

The Consent Management Module works with IAB-supported CMPs to fetch an encoded string that represents a user’s consent choice and makes it available for adapters to consume and pass to their respective exchanges. Triplelift’s bid adapter supports this functionality. To utilize this module, a Consent Management Platform (CMP) compatible with the IAB TCF v2 spec needs to be implemented on the site to interact with the user and obtain their consent choices. Once a CMP is implemented on a publisher’s page, the following steps will need to be take by the publisher to ensure Prebid is properly fetching consent:

  • The publisher will need to include the Prebid consent management module in their Prebid
    build:
    gulp build --modules=consentManagement

  • The publisher will then need to include the consentManagement object in the global Prebid
    configuration:

     pbjs.setConfig({
        consentManagement: {
          gdpr: {
            cmpApi: 'iab',
            timeout: 8000,
            defaultGdprScope: true
          }
        }
     });
    

For any questions regarding GDPR, CCPA, or CMPs as they relate to Prebid, please see the following page:

Consent Management