What Is Header Bidding And How To Execute It

Posted by

[]The header bidding technology started to develop in 2015, and has considering that assisted many publishers to grow their income by as much as 40% (and even, sometimes, to levels of 100% or more.)

What Is Header Bidding?

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

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

  • Apply to SSP partners and get approval.
  • Implement Prebid.JS on site.
  • Set up ad server.
  • Select a consent management system.
  • Test and debug.

Applying To SSP Partners

[]There are numerous SSP partners readily available in the list to apply, however I wish to mention what I think to be the most popular ones:

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

[]One needs to find their online application and go through the company’s confirmation process. For example, when it comes to Xandr, the contact page looks like this:

Screenshot from Xandr, December 2022 Focus on the []minimum stock size needed to be qualified for using. Yes, that is a staggering high of 50M ad impressions a month. You may require rather an outstanding site to be able to apply to some of the advertisement networks. We will call them additional bidders, as they bid on stock in real time. Nevertheless, not all SSPs have such high thresholds for application.

[]For example, Sharethrough only needs 20M ad impressions. Besides, they think about likewise audience quality, traffic geolocation, just how much time users invest in the website, and so on. It typically takes a few weeks after using to be authorized and onboarded

[]with them, so it can be a fairly lengthy process that might 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 react with their CPM bids– let’s state$1

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

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

[]paying $1.50 USD CPM for an advertisement. It runs another auction with Google Adsense or AdX. If Google uses a greater CPM, then the Google Ad will be served. If not, our advertisement with $1.50 CPM will win, and be served

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

[]CPM possible. If Google AdX does not have any competition, it will provide the most affordable CPM possible– as it wants to buy stock for the cheapest rate

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

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

[]operated on the server. Let’s discuss client-side header bidding. How To Execute Client-Side Header Bidding In order to set up header bidding, we require to implement Prebid.js on our website and configure our

[]Google Advertisement Supervisor(or advertisement server).

Implement 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 []developed for your specific configuration. Do not forget to select Permission Management modules to comply

[]with GDPR and GPP privacy requirements. 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 first lines load all needed JS files and our tailored Prebid.JS file.
  • Advertisement slots are specified in the adUnits selection variable.
  • In the adslot meanings, you can see the SSP partners’ names and IDs you will be provided when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is contacted us to disable ad request to be sent out to Google Advertisement Manager up until Prebid.js finishes the auction.
  • pbjs.requestBids work calls SSP partners and figures out the winner.
  • initAdserver() function is contacted us to send out an advertisement demand to the Google Ad Supervisor with hb_pb key, which consists of the winning CPM worth, e.g. hb_pb=”1.5 ″. (This step is connected with setting up Google Ad Supervisor in the next action.)
  • When Google Advertisement Manager gets the demand with the winning bid, it runs its own auction in Google AdX, and returns either the AdX advertisement with a greater CPM, or the advertisement of the winning SSP.

[]For your particular case, you may need to code differently and change the setup, but the principle stays the same.

[]Other than that, I wish to rapidly go over how to carry out lazy loading, due to the fact that it is a little bit various.

How To Execute Lazy Loading

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

[]This is because you require to run an auction, and identify and set key values prior to sending a request to the ad server.

[]Since of that, I would recommend utilizing the Crossway Observer API to identify when to pack the advertisement in the HTML

tag when it will enter into the viewport.

choices = ; your_observer = brand-new IntersectionObserver( observer_handler, choices ); your_observer. observe( goog_adslots [i]; []In the observer_handler recall function, you can run the prebid auction and call the advertisement server.

function observer_handler( entries, observer) header-bid-tag -0′, [728,90], ‘your_html_div_id’ ). addService(googletag.pubads()); lazySlotPrebid(slot, ‘your_html_div_id’) function lazySlotPrebid(slot, div_id) // endd of initDynamicSlotPrebid []Now, let’s get on setting up the ad server utilizing Google Advertisement Manager.

How To Set Up GAM For Header Bidding

[]Advertisement servers require to have lots of cost concern line items with essential hb_pb targeting all possible CPM values, such as hb_pb=0.04, hb_pb=0.03, etc hb_pb key worth targeting

[] This is the bottom line that makes the header bidding engine work. The auction runs in the internet 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 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 display a Google Ad.
  • []As I mentioned above, you would require to build line items in GAM with particular granularity, state 0.01– and for the CPM range $0-$20, you would need to develop 2,000 line items, which are difficult to do by hand.

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

    []Regrettably, there are no strong services that you can simply download and run in one click.

    []It is a rather intricate task, but thanks to factors who constructed API tools (despite the fact that they are not actively supporting them), we can still modify it a little and make it work.

    []Let’s dive into how to establish Google Ad Manager and comprehend the following:

    Action 1: Enable API Access

    []In the Google Advertisement manager International > General settings section, make certain API access is enabled.

    []Click on the Include service account button and produce 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

    Navigate to Google API Console

    []Credentials page. From the project drop-down, select Produce

    []a brand-new job, go into a name for the job, and, additionally, edit the provided Task ID. Click Create.

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

    []. Click Develop to download a file consisting of a personal key. Screenshot from Google API Console Credentials page, Deccember 2022 Screenshot from Google API Console Qualifications page, Deccember 2022 Complete the service account details you’ve created above. Assign the role “owner” and develop the service account OAuth2 qualifications. Then, click on the produced user and create JSON type secret, and download it. Screenshot from Google API Console Credentials page, Deccember 2022 Step 3: Download Task Download the task zip file and

    unzip it, directory(additionally, you can use the git command tool to clone the repo). Set up composer for your operating system in order to construct the project. Step 4: Change your PHP.INI Modification your php.ini( located at/ xampp/php/php. ini)file and enable”

    []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: Produce Subfolders And Build The Job When you have everything established

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

    []n’t updated because 2019, to utilize the most recent variation course 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 bash here “if you have git set up), and run composer upgrade in the PC terminal or git terminal. It will create subfolders and construct the project. Step 6: Establish Your Google Ad Manager Qualifications Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the task you have actually constructed. Next, download adsapi_php. ini file []and set up your Google Ad 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 absolute directory path to the JSON key file in the folder root. Step 7: Set The Content Of The File Finally, browse to the file/ script/tests/ConnexionTest

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

    “/./” ); need __ DIR __.’/./ []./ vendor/autoload. php’; $traffickerId=(brand-new App AdManager UserManager ()) -> getUserId (); if(is_numeric($traffickerId)) else echo” n===Connexion KO==== n n “; In your terminal(or git celebration 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 OK====” Action 8: Configure The Parameters Navigate to the

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

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

    []Optionally you can also specify ‘geoTargetingList’ => “dz, pk, ke, pt” or custom-made crucial value targeting customTargeting’ => [‘ amp_pages’ => yes’] if you desire your header bidding to work only when the custom-made crucial worth is set.

    []Run the command below and it will start creating line items per the pail settings you’ve specified.

    []php ConnexionTest.php

    []There is a tool using Python that is used similarly; you may want to give it a shot 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 website URL using “/? pbjs_debug=true” specification at the end of the URL, and see console logs messages.

    []You require to ensure that hb_pb key values are passed to Google Ad Manager. Use “/? google_console=1” at the end of the URL to open the GAM console, and click “Delivery Diagnostics” of each advertisement system.

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

    Screenshot from Google API Console Credentials page, Deccember 2022

    Select A Consent Management System

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

    []The comprehensive guidelines on how to set up an authorization management system in your wrapper are here.

    []There are many service providers which abide by IAB’s most current standards, and here are a few of the most popular ones:

    Conclusion

    []You may discover it surprising that establishing header bidding includes many steps, however it is actually worth it to implement. It can quickly improve your earnings by +30% or more by creating selling pressure on Google Ads.

    []This guide is for technically smart users– however if you have questions and issues, there is an Adops slack channel you might subscribe to and ask concerns to the neighborhood.

    []I hope that after reading this post, you will discover it easier to establish header bidding and improve the monetization of your website.

    []More resources:

    []Included Image: Online Best SMM Panel