What Is Header Bidding And How To Implement It

Posted by

[]The header bidding technology started to develop in 2015, and has actually since assisted lots of publishers to grow their revenue by as much as 40% (and even, in some cases, to levels of 100% or more.)

What Is Header Bidding?

[]Header bidding is an advanced technique where publishers use their ad inventory to numerous advertisement exchanges, also called Supply-Side Platforms (or SSPs), all at once prior to making calls to their ad servers.

[]Here are the actions a publisher needs to pass to have this technology power up its monetization.

  • Apply to SSP partners and get approval.
  • Execute Prebid.JS on site.
  • Set up advertisement server.
  • Choose a consent management system.
  • Test and debug.

Using To SSP Partners

[]There are hundreds of SSP partners readily available in the list to use, however I wish to discuss 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 pass through the business’s verification procedure. For instance, in the case of Xandr, the contact page appears like this:

Screenshot from Xandr, December 2022 Pay attention to the []minimum inventory size needed to be qualified for applying. Yes, that is an incredible high of 50M advertisement impressions a month. You might require rather an excellent site to be able to apply to a few of the ad networks. We will call them further bidders, as they bid on inventory in real time. Nevertheless, not all SSPs have such high thresholds for application.

[]For example, Sharethrough just requires 20M advertisement impressions. Besides, they think about also audience quality, traffic geolocation, just how much time users invest in the website, etc. It generally takes a few weeks after using to be approved and onboarded

[]with them, so it can be a fairly lengthy process that may even take months to end up. How Does Prebid.js Work? In nutshell, here is how Prebid.js works. When a user opens a website, an ad request is made to all bidders(SSP partners). Bidders respond with their CPM quotes– let’s say$1

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

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

[]paying $1.50 USD CPM for an advertisement. It runs another auction with Google Adsense or AdX. If Google provides 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 Ad Supervisor, December 2022 The technique here is that auctions occur in real-time, which develops buying pressure on Google AdX to pay the highest

[]CPM possible. If Google AdX doesn’t have any competition, it will offer the most affordable CPM possible– as it wishes to buy stock for the least expensive cost

[]possible. With header bidding, bidders have the ability to compete and press CPMs (and therefore revenue) up. There are two methods to carry out header bidding

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

[]operated on the server. Let’s discuss client-side header bidding. How To Carry Out Client-Side Header Bidding In order to set up header bidding, we need to execute Prebid.js on our site and configure our

[]Google Ad Manager(or advertisement server).

Carry out Prebid.js On Your Website Prebid.js []is a header bidding platform that has more than 200 demand sources incorporated. You need to pick the SSP partners you are dealing with

from the customize page and download the library []built for your particular configuration. Don’t forget to select Permission Management modules to comply

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

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

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

Basic Prebid.js Example

Div-1

Div-2

[]Let’s break down the code above.

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

[]For your specific case, you might need to code differently and change the setup, however the principle remains the very same.

[]Besides that, I wish to quickly go over how to execute lazy loading, since it is a little different.

How To Implement Lazy Loading

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

[]This is due to the fact that you need to run an auction, and identify and set key values prior to sending out a demand to the ad server.

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

tag when it is about to enter into the viewport.

choices = noticeable quantity of product displayed in relation to root; your_observer = brand-new IntersectionObserver( observer_handler, alternatives ); 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) 1055389 function lazySlotPrebid(slot, div_id) pbjs.que.push(function() // endd of initDynamicSlotPrebid []Now, let’s jump on establishing the ad server using Google Advertisement Supervisor.

How To Set Up GAM For Header Bidding

[]Advertisement servers need to have dozens of rate priority line products with key hb_pb targeting all possible CPM values, such as hb_pb=0.04, hb_pb=0.03, etc hb_pb crucial worth targeting

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

  • The winning SSP partner is sent out to GAM with an essential value targeting hb_pb = 2.62.
  • Since the order has the same CPM value, GAM understands 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 bid and show a Google Advertisement.
  • []As I discussed above, you would require to construct line products in GAM with certain granularity, state 0.01– and for the CPM variety $0-$20, you would require to create 2,000 line products, which are impossible to do manually.

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

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

    []It is a rather complicated job, however thanks to factors who developed API tools (although they are not actively supporting them), we can still customize it a little and make it work.

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

    Step 1: Enable API Gain Access To

    []In the Google Advertisement supervisor Worldwide > General settings area, make certain API access is allowed.

    []Click on 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 Advertisement Supervisor, December 2022 Action 2: Develop A New Task

    Browse to Google API Console

    []Qualifications page. From the project drop-down, pick Produce

    []a new job, get in a name for the job, and, additionally, edit the supplied Project ID. Click Produce.

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

    []. Click Produce to download a file consisting of a personal key. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Qualifications page, Deccember 2022 Fill out the service account details you have actually produced above. Assign the role “owner” and produce the service account OAuth2 qualifications. Then, click on the developed user and create JSON type secret, and download it. Screenshot from Google API Console Credentials page, Deccember 2022 Step 3: Download Task Download the job zip file and

    unzip it, directory(alternatively, you can use the git command tool to clone the repo). Set up author for your os in order to build the task. Step 4: Change your PHP.INI Modification your php.ini( situated at/ xampp/php/php. ini)file and make it possible for”

    []extension=soap”by getting rid of”;” in front of and set”soap.wsdl _ cache_ttl=0″ and restart 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 modification”googleads/googleads-php-lib”:”^ 44.0.0 “to utilize the latest variation” googleads/googleads-php-lib “:”^ 59.0.0″. Look for the most fresh variation at the minute you perform this. Browse and change in/ app []/ folder of the task”v201911″with” v202202″, because that git job was

    []n’t updated given that 2019, to use the latest variation path of libraries. Open the command line of your PC and switch to the directory site where you’ve unzipped the files(using cd command or right-click inside the folder” Git celebration here “if you have actually git set up), and run composer upgrade in the PC terminal or git terminal. It will produce subfolders and construct the task. Step 6: Establish Your Google Advertisement Manager Qualifications Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the task you’ve built. 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 path to the JSON crucial file in the folder root. Step 7: Set The Material Of The File Finally, navigate to the file/ script/tests/ConnexionTest

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

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

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

    []putenv(‘ HOUSE= ‘. dirname (__ DIR __).”/./”); require __ DIR __.’/././ vendor/autoload. php ‘; use App Scripts HeaderBiddingScript;$bucket_range=array(); $Your_Advertiser_Name=’Sample_Advertiser’; $pails=[“pails”=> [[‘precision’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ precision ‘= > 2, ‘minutes’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ pails [” buckets”] as $k => $bucket) >
    Additionally you can also define ‘geoTargetingList’ => “dz, pk, ke, pt” or customized essential worth targeting customTargeting’ => [‘ amp_pages’ => yes’] if you want your header bidding to work only when the customized key worth is set.

    []Run the command listed below and it will begin producing line items per the pail settings you’ve defined.

    []php ConnexionTest.php

    []There is a tool using Python that is utilized likewise; you may wish to offer it a try too.

    Debugging

    []For debugging, there are a couple of internet browser add-ons you can use to see if the auction runs without errors.

    []Alternatively, open your web page URL using “/? pbjs_debug=true” specification at the end of the URL, and enjoy console logs messages.

    []You need to ensure that hb_pb key values are passed to Google Advertisement Supervisor. Usage “/? google_console=1” at the end of the URL to open the GAM console, and click “Shipment Diagnostics” of each advertisement unit.

    []You should see that hb_pb values are set and passed to the advertisement server.

    Screenshot from Google API Console Qualifications page, Deccember 2022

    Select An Authorization Management System

    []Users’ personal privacy is one of the most crucial elements, and you want to make certain that you abide by both GDPR and GPP.

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

    []There are numerous suppliers which abide by IAB’s most current requirements, and here are a few of the most popular ones:

    Conclusion

    []You might discover it surprising that establishing header bidding includes numerous steps, however it is truly worth it to carry out. It can quickly enhance your revenue by +30% or more by producing selling pressure on Google Ads.

    []This guide is for technically savvy users– but if you have questions and concerns, there is an Adops slack channel you may register for and ask questions to the neighborhood.

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

    []More resources:

    []Included Image: Online SMM Panel