What Is Header Bidding And How To Execute It

Posted by

[]The header bidding innovation began to develop in 2015, and has since helped 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 innovative technique where publishers offer their advertisement inventory to many ad exchanges, likewise called Supply-Side Platforms (or SSPs), all at once before making calls to their advertisement servers.

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

  • Apply to SSP partners and get approval.
  • Execute Prebid.JS on site.
  • Set up advertisement server.
  • Pick an authorization management system.
  • Test and debug.

Using To SSP Partners

[]There are hundreds of SSP partners offered in the list to use, but 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 business’s verification process. For example, when it comes to Xandr, the contact page looks like this:

Screenshot from Xandr, December 2022 Pay attention to the []minimum stock size required to be eligible for using. Yes, that is an incredible high of 50M ad impressions a month. You might need quite an excellent website to be able to use to a few of the ad networks. We will call them more bidders, as they bid on inventory in genuine time. Nevertheless, not all SSPs have such high thresholds for application.

[]For instance, Sharethrough only needs 20M ad impressions. Besides, they consider likewise audience quality, traffic geolocation, how much time users spend on the site, and so on. It generally 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 ad request is made to all bidders(SSP partners). Bidders react with their CPM quotes– let’s state$1

[]and$ 1.50– and Prebid.js makes a demand 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 Advertisement Manager, the demand is received and it knows that somebody is

[]paying $1.50 USD CPM for an advertisement. It runs another auction with Google Adsense or AdX. If Google offers a greater 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 technique 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 competitors, it will use the lowest CPM possible– as it wants to buy inventory for the most affordable rate

[]possible. With header bidding, bidders have the ability to contend and push CPMs (and therefore earnings) up. There are 2 methods to execute header bidding

[]: Client-side: When the auction runs through JavaScript in the web 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 website and configure our

[]Google Ad Manager(or ad server).

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

from the customize page and download the library []developed for your particular configuration. Don’t 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]]

Standard Prebid.js Example

Div-1

Div-2

[]Let’s break down the code above.

  • The very first lines fill all needed JS files and our tailored Prebid.JS file.
  • Advertisement slots are defined in the adUnits range variable.
  • In the adslot definitions, you can see the SSP partners’ names and IDs you will be provided when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is called to disable advertisement request to be sent to Google Advertisement Manager till Prebid.js completes the auction.
  • pbjs.requestBids operate calls SSP partners and determines the winner.
  • initAdserver() function is contacted us to send an ad 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 Ad Supervisor in the next step.)
  • When Google Ad Supervisor gets the demand 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 may need to code differently and change the setup, however the principle stays the same.

[]Other than that, I would like to rapidly go over how to carry out lazy loading, because it is a bit various.

How To Implement Lazy Loading

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

[]This is due to the fact that you require to run an auction, and figure out and set essential values prior to sending out a request to the advertisement server.

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

tag when it will enter into the viewport.

alternatives = root: null,; your_observer = new IntersectionObserver( observer_handler, options ); your_observer. observe( goog_adslots [i]; []In the observer_handler call back function, you can run the prebid auction and call the ad 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 advertisement server utilizing Google Ad Supervisor.

How To Set Up GAM For Header Bidding

[]Advertisement servers need to have lots of price priority line items with essential hb_pb targeting all possible CPM worths, such as hb_pb=0.04, hb_pb=0.03, etc hb_pb key worth targeting

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

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

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

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

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

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

    Step 1: Allow API Access

    []In the Google Ad manager Global > General settings area, ensure 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 Ad Manager, December 2022 Step 2: Create A New Task

    Browse to Google API Console

    []Qualifications page. From the task drop-down, select Develop

    []a brand-new task, enter a name for the job, and, additionally, edit the offered Task ID. Click Create.

    []On the Qualifications page, []select Produce credentials, then select Service account key.Select New service account, and select JSON

    []. Click Develop to download a file including a personal secret. Screenshot from Google API Console Credentials page, Deccember 2022 Screenshot from Google API Console Qualifications page, Deccember 2022 Fill out the service account details you’ve created above. Assign the function “owner” and develop the service account OAuth2 credentials. Then, click on the produced user and create JSON type secret, and download it. Screenshot from Google API Console Qualifications page, Deccember 2022 Step 3: Download Job Download the job zip file and

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

    []extension=soap”by eliminating”;” 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 Task As soon as you have whatever established

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

    []n’t upgraded because 2019, to utilize the latest 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 celebration here “if you have git set up), and run author update in the PC terminal or git terminal. It will create subfolders and build the job. Action 6: Establish Your Google Ad Supervisor Qualifications Move the downloaded JSON key “gam-api-54545-0c04qd8fcb. json” file into the root folder of

    the project you’ve developed. Next, download adsapi_php. ini file []and set up 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 essential 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(‘ HOUSE =’. dirname( __ DIR __ ).

    “/./” ); require __ 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 remain in the/ script/tests/ folder). php ConnexionTest.php You must see a message”= == =Connection okay====” Action 8: Set Up The Parameters Browse to the

    file/ script/tests/ConnexionTest. php in your job and open it. Copy and paste the below code into that file, and configure the specifications in the $entry and$buckets ranges per your needs.

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

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

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

    []php ConnexionTest.php

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

    Debugging

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

    []Additionally, open your web page URL utilizing “/? pbjs_debug=real” criterion at the end of the URL, and watch console logs messages.

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

    []You need to see that hb_pb worths are set and passed to the ad server.

    Screenshot from Google API Console Qualifications page, Deccember 2022

    Select A Permission Management System

    []Users’ privacy is among the most important aspects, and you want to make sure that you comply with both GDPR and GPP.

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

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

    Conclusion

    []You may discover it surprising that setting up header bidding involves a lot of steps, but it is truly worth it to execute. It can quickly increase your profits by +30% or more by developing selling pressure on Google Ads.

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

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

    []More resources:

    []Included Image: SMM Panel