What Is Header Bidding And How To Implement It

Posted by

[]The header bidding technology started to develop in 2015, and has since helped numerous publishers to grow their earnings by as much as 40% (and even, sometimes, to levels of 100% or more.)

What Is Header Bidding?

[]Header bidding is an innovative strategy where publishers use their advertisement inventory to numerous advertisement exchanges, also called Supply-Side Platforms (or SSPs), at the same time prior to making calls to their ad servers.

[]Here are the steps a publisher requires to pass to have this innovation power up its money making.

  • Apply to SSP partners and get approval.
  • Implement Prebid.JS on website.
  • Configure ad server.
  • Select an authorization management system.
  • Test and debug.

Using To SSP Partners

[]There are hundreds of SSP partners available in the list to apply, but I would like to mention what I believe to be the most popular ones:

  • TripleLift.
  • Index Exchange.
  • Amazon UAM/TAM.
  • Xandr (previously AppNexus).
  • Teads.
  • Pubmatic.
  • Sovrn.
  • Verizon.
  • Magnite (previously Rubicon).
  • OpenX.
  • Sonobi.
  • GumGum.
  • Sharethrough.
  • Unurly.

[]One needs to find their online application form and go through the company’s confirmation procedure. For example, in the case of Xandr, the contact page appears like this:

Screenshot from Xandr, December 2022 Take notice of the []minimum inventory size required to be eligible for applying. Yes, that is a shocking high of 50M ad impressions a month. You may need rather an excellent website to be able to use to some of the ad networks. We will call them additional bidders, as they bid on inventory in real time. However, not all SSPs have such high thresholds for application.

[]For example, Sharethrough just needs 20M advertisement impressions. Besides, they consider likewise audience quality, traffic geolocation, just how much time users invest in the website, etc. It typically takes a couple of weeks after applying to be authorized and onboarded

[]with them, so it can be a relatively time-consuming process that may even take months to finish. How Does Prebid.js Work? In nutshell, here is how Prebid.js works. When a user opens a web page, an advertisement demand is made to all bidders(SSP partners). Bidders respond with their CPM bids– let’s state$1

[]and$ 1.50– and Prebid.js makes a request to the ad server, with the greatest

[]CPM targeting. In this case, that would be $1.50. At the ad server, in our case, Google Ad Manager, the demand is received and it understands that somebody is

[]paying $1.50 USD CPM for an ad. It runs another auction with Google Adsense or AdX. If Google offers a higher CPM, then the Google Advertisement will be served. If not, our ad with $1.50 CPM will win, and be served

[]by our SSP partner. Screenshot from Google Advertisement Supervisor, December 2022 The trick here is that auctions happen in real-time, which creates buying pressure on Google AdX to pay the greatest

[]CPM possible. If Google AdX does not have any competition, it will offer the most affordable CPM possible– as it wishes to purchase inventory for the least expensive rate

[]possible. With header bidding, bidders are able to compete and press CPMs (and for that reason income) up. There are two ways to implement header bidding

[]: Client-side: When the auction runs by means of JavaScript in the browser. Server-side: When the auction is

[]run on the server. Let’s go over client-side header bidding. How To Execute Client-Side Header Bidding In order to establish header bidding, we need to execute Prebid.js on our website and configure our

[]Google Advertisement Manager(or ad server).

Execute Prebid.js On Your Site Prebid.js []is a header bidding platform that has more than 200 need sources integrated. You require to select the SSP partners you are dealing with

from the customize page and download the library []constructed for your specific setup. Do not forget to select Approval Management modules to comply

[]with GDPR and GPP privacy standards. Below is the sample code drawn from the official documents. var div_1_sizes=[ [300, 250]

[], [300, 600]]; var div_2_sizes= [[

[]728, 90], [970, 250]]

Fundamental Prebid.js Example

Div-1

Div-2

[]Let’s break down the code above.

  • The first lines fill all required JS files and our tailored Prebid.JS file.
  • Ad slots are defined in the adUnits range variable.
  • In the adslot meanings, you can see the SSP partners’ names and IDs you will be given when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is contacted us to disable ad demand to be sent out to Google Advertisement Supervisor until Prebid.js finishes the auction.
  • pbjs.requestBids function calls SSP partners and determines the winner.
  • initAdserver() function is called to send an advertisement request to the Google Advertisement Supervisor with hb_pb secret, which consists of the winning CPM value, e.g. hb_pb=”1.5 ″. (This action is connected with setting up Google Advertisement Supervisor in the next step.)
  • When Google Ad Manager gets the demand with the winning bid, it runs its own auction in Google AdX, and sends back either the AdX ad with a greater CPM, or the advertisement of the winning SSP.

[]For your particular case, you may require to code differently and alter the setup, however the concept remains the exact same.

[]Other than that, I wish to quickly discuss how to carry out lazy loading, because it is a little bit different.

How To Execute Lazy Loading

[]The Google tag for publishers has a lazy loading structure which will not work in the case of header bidding.

[]This is due to the fact that you need to run an auction, and determine and set essential values before sending a demand to the advertisement server.

[]Since of that, I would encourage using the Crossway Observer API to figure out when to pack the advertisement in the HTML

tag when it will participate in the viewport.

options = noticeable amount of product displayed in relation to root; your_observer = new IntersectionObserver( observer_handler, choices ); your_observer. observe( goog_adslots [i]; []In the observer_handler call back function, you can run the prebid auction and call the advertisement server.

function observer_handler( entries, observer) dynamicAdUnit = [code: ‘your_html_div_id’, mediaTypes: banner: , quotes: [, bidder: “familiar”, params: site_id:”122869″, safe:1]]; pbjs.addAdUnits(dynamicAdUnit); slot = window.googletag.defineSlot(‘ function lazySlotPrebid(slot, div_id) pbjs.que.push(function() // endd of initDynamicSlotPrebid []Now, let’s jump on setting up the advertisement server utilizing Google Advertisement Supervisor.

How To Establish GAM For Header Bidding

[]Advertisement servers require to have lots of rate priority line items with key hb_pb targeting all possible CPM worths, such as hb_pb=0.04, hb_pb=0.03, and so on hb_pb key worth targeting

[] This is the bottom line that makes the header bidding engine work. The auction runs in the web browser on page load.

  • The winning SSP partner is sent to GAM with an essential worth targeting hb_pb = 2.62.
  • Since the order has the exact same CPM value, GAM comprehends that there is a bid at $2.62.
  • GAM runs an AdX auction and has to pay more than $2.62 in order to win the quote and display a Google Advertisement.
  • []As I mentioned above, you would need to construct line items in GAM with certain granularity, state 0.01– and for the CPM range $0-$20, you would need to produce 2,000 line products, which are impossible to do by hand.

    []For that, you would require to utilize GAM API.

    []Unfortunately, there are no strong solutions that you can just download and run in one click.

    []It is a rather intricate job, but thanks to contributors who built API tools (even though they are not actively supporting them), we can still customize it a little and make it work.

    []Let’s dive into how to establish Google Advertisement Supervisor and understand the following:

    Action 1: Allow API Access

    []In the Google Ad manager Global > General settings section, make sure API access is made it possible for.

    []Click the Include service account button and create a user with the sample name “GAM API USER” and email “[email protected]” with admin rights.

    Screenshot from Google Ad Supervisor, December 2022 Step 2: Create A New Job

    Navigate to Google API Console

    []Credentials page. From the job drop-down, choose Create

    []a new project, enter a name for the job, and, additionally, edit the provided Task ID. Click Create.

    []On the Credentials page, []select Develop credentials, then choose Service account secret.Select New service account, and choose JSON

    []. Click Develop to download a file consisting of a private secret. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Credentials page, Deccember 2022 Complete the service account details you’ve developed above. Assign the function “owner” and produce the service account OAuth2 credentials. Then, click on the developed user and create JSON type secret, and download it. Screenshot from Google API Console Credentials page, Deccember 2022 Action 3: Download Project Download the task zip file and

    unzip it, directory site(alternatively, you can utilize the git command tool to clone the repo). Set up composer for your operating system in order to build the job. Step 4: Change your PHP.INI Change your php.ini( situated at/ xampp/php/php. ini)file and make it possible for”

    []extension=soap”by eliminating”;” in front of and set”soap.wsdl _ cache_ttl=0″ and reboot Apache from the control board of XAMPP. Step 5: Develop Subfolders And Build The Project Once you have whatever established

    and unzipped, open composer.json file and change”googleads/googleads-php-lib”:”^ 44.0.0 “to utilize the most recent variation” googleads/googleads-php-lib “:”^ 59.0.0″. Look for the most fresh version at the moment you perform this. Search and change in/ app []/ folder of the task”v201911″with” v202202″, since that git task was

    []n’t updated because 2019, to utilize the current version path of libraries. Open the command line of your PC and switch to the directory where you’ve unzipped the files(utilizing cd command or right-click inside the folder” Git bash here “if you have actually git set up), and run author upgrade in the PC terminal or git terminal. It will develop subfolders and construct the job. Action 6: Establish Your Google Ad Manager Credentials Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the project you’ve constructed. Next, download adsapi_php. ini file []and established your Google Advertisement Supervisor qualifications in it. networkCode= “899899” applicationName =”My GAM APP” jsonKeyFilePath=”

    []D: xampp htdocs dfp-prebid-lineitems gam-api-54545-0c04qd8fcb. json”scopes=”https://www.googleapis.com/auth/dfp” impersonatedEmail =” [email protected]”jsonKeyFilePath is the outright directory site course to the JSON crucial file in the folder root. Action 7: Set The Content Of The File Finally, browse to the file/ script/tests/ConnexionTest

    []. php and set the material of the file like listed below: putenv(‘ HOME =’. dirname( __ DIR __ ).

    “/./” ); require __ DIR __.’/./ []./ vendor/autoload. php’; $traffickerId=(new App AdManager UserManager ()) -> getUserId (); if(is_numeric($traffickerId))echo” n====Connexion okay=== = n n”; else In your terminal(or git bash console) test the connection by running the command(if you remain in the/ script/tests/ folder). php ConnexionTest.php You should see a message”= == =Connection OK====” Action 8: Configure The Parameters Navigate to the

    file/ script/tests/ConnexionTest. php in your job and open it. Copy and paste the listed below code into that file, and configure the parameters in the $entry and$pails selections per your requirements.

    []putenv(‘ HOME= ‘. dirname (__ DIR __).”/./”); require __ DIR __.’/././ vendor/autoload. php ‘; use App Scripts HeaderBiddingScript;$bucket_range=range(); $Your_Advertiser_Name=’Sample_Advertiser’; $buckets=[“containers”=> [[‘precision’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘min’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ pails [” containers”] as $k => $bucket) $request_bucket = range( ‘buckets’ => variety( $bucket) ); $order_name=’Your_Order_name ‘.$bucket [‘ minutes’]’-‘.$bucket [‘ max’];

    []Additionally you can also define ‘geoTargetingList’ => “dz, pk, ke, pt” or custom essential worth targeting customTargeting’ => [‘ amp_pages’ => yes’] if you desire your header bidding to work just when the customized key value is set.

    []Run the command listed below and it will start producing line products per the pail settings you have actually specified.

    []php ConnexionTest.php

    []There is a tool utilizing Python that is used likewise; you may wish to give it a try too.

    Debugging

    []For debugging, there are a few browser add-ons you can utilize to see if the auction runs without mistakes.

    []Additionally, open your webpage URL using “/? pbjs_debug=true” specification at the end of the URL, and watch console logs messages.

    []You need to make sure that hb_pb secret worths are passed to Google Ad Manager. Usage “/? google_console=1” at the end of the URL to open the GAM console, and click on “Shipment Diagnostics” of each ad unit.

    []You ought to see that hb_pb values are set and passed to the ad server.

    Screenshot from Google API Console Qualifications page, Deccember 2022

    Pick A Consent Management System

    []Users’ personal privacy is one of the most important elements, and you want to make sure that you adhere to both GDPR and GPP.

    []The detailed instructions on how to set up a consent management system in your wrapper are here.

    []There are numerous companies which adhere to IAB’s newest standards, and here are a few of the most popular ones:

    Conclusion

    []You may find it surprising that setting up header bidding involves many steps, however it is truly worth it to execute. It can quickly boost your income by +30% or more by creating selling pressure on Google Ads.

    []This guide is for technically smart users– however if you have concerns and problems, there is an Adops slack channel you may sign up for and ask concerns to the neighborhood.

    []I hope that after reading this short article, you will find it much easier to set up header bidding and boost the monetization of your website.

    []More resources:

    []Featured Image: SMM Panel