What Is Header Bidding And How To Execute It

Posted by

[]The header bidding technology began to develop in 2015, and has actually since helped numerous publishers to grow their income 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 provide their ad inventory to lots of ad exchanges, also called Supply-Side Platforms (or SSPs), concurrently 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 website.
  • Configure ad server.
  • Pick an approval management system.
  • Test and debug.

Using To SSP Partners

[]There are numerous SSP partners available in the list to apply, however I want to discuss 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 requires to find their online application form and travel through the business’s verification process. For instance, in the case of Xandr, the contact page looks like this:

Screenshot from Xandr, December 2022 Take note of the []minimum stock size required to be eligible for applying. Yes, that is an incredible high of 50M ad impressions a month. You might require rather an excellent website to be able to apply to a few of the advertisement networks. We will call them further bidders, as they bid on inventory in real time. However, not all SSPs have such high limits for application.

[]For instance, Sharethrough just requires 20M ad impressions. Besides, they think about also audience quality, traffic geolocation, how much time users spend on the site, and so on. It usually takes a couple of weeks after applying to be authorized and onboarded

[]with them, so it can be a relatively time-consuming procedure that may even take months to complete. How Does Prebid.js Work? In nutshell, here is how Prebid.js works. When a user opens a webpage, an advertisement request is made to all bidders(SSP partners). Bidders react with their CPM bids– 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 Advertisement Supervisor, the demand is gotten and it knows that someone is

[]paying $1.50 USD CPM for an ad. 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 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 doesn’t have any competition, it will use the lowest CPM possible– as it wishes to purchase stock for the cheapest cost

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

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

[]worked 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 require to execute Prebid.js on our site and configure our

[]Google Ad Supervisor(or advertisement server).

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

from the customize page and download the library []constructed for your specific setup. Don’t forget to choose Approval Management modules to comply

[]with GDPR and GPP personal privacy standards. Below is the sample code taken from the official documentation. 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 needed JS files and our personalized Prebid.JS file.
  • Ad slots are defined in the adUnits array variable.
  • In the adslot definitions, you can see the SSP partners’ names and IDs you will be offered when onboarding when them.
  • googletag.pubads(). disableInitialLoad(); is contacted us to disable advertisement demand to be sent out to Google Ad Manager until Prebid.js completes the auction.
  • pbjs.requestBids function calls SSP partners and figures out the winner.
  • initAdserver() function is contacted us to send an ad request to the Google Ad Manager with hb_pb secret, which contains the winning CPM worth, e.g. hb_pb=”1.5 ″. (This step is gotten in touch with setting up Google Ad 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 returns either the AdX advertisement with a greater CPM, or the advertisement of the winning SSP.

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

[]Besides that, I would like to rapidly go over how to execute lazy loading, because it is a little various.

How To Implement Lazy Loading

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

[]This is because you require to run an auction, and determine and set essential values prior to sending a demand to the ad server.

[]Due to the fact that of that, I would recommend using the Intersection Observer API to identify when to fill the ad in the HTML

tag when it will enter into the viewport.

choices = relative to record viewport rootMargin: ‘1500px’,; your_observer = 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 ad server.

function observer_handler( entries, observer) 1055389 function lazySlotPrebid(slot, div_id) // endd of initDynamicSlotPrebid []Now, let’s jump on establishing the ad server using Google Ad Supervisor.

How To Set Up GAM For Header Bidding

[]Advertisement servers require to have dozens of price top priority line items with key hb_pb targeting all possible CPM worths, such as hb_pb=0.04, hb_pb=0.03, etc hb_pb key value 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 out to GAM with a crucial worth targeting hb_pb = 2.62.
  • Since the order has the very same CPM value, GAM comprehends that there is a quote 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 Ad.
  • []As I mentioned above, you would need to develop line products in GAM with specific granularity, say 0.01– and for the CPM range $0-$20, you would need to produce 2,000 line items, which are impossible to do by hand.

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

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

    []It is a rather intricate task, but thanks to factors who constructed 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 establish Google Ad Manager and comprehend the following:

    Step 1: Enable API Access

    []In the Google Ad supervisor Worldwide > General settings section, ensure API access is made it possible for.

    []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 Step 2: Create A New Job

    Navigate to Google API Console

    []Credentials page. From the task drop-down, select Create

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

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

    []. Click Develop to download a file consisting of a private key. Screenshot from Google API Console Qualifications page, Deccember 2022 Screenshot from Google API Console Qualifications page, Deccember 2022 Fill in the service account information you’ve developed above. Designate the role “owner” and develop the service account OAuth2 qualifications. Then, click on the developed user and develop JSON type secret, and download it. Screenshot from Google API Console Qualifications page, Deccember 2022 Action 3: Download Task Download the job zip file and

    unzip it, directory site(additionally, you can utilize the git command tool to clone the repo). Install author for your os in order to develop the task. Step 4: Change your PHP.INI Change your php.ini( situated at/ xampp/php/php. ini)file and enable”

    []extension=soap”by removing”;” in front of and set”soap.wsdl _ cache_ttl=0″ and restart Apache from the control panel of XAMPP. Step 5: Develop Subfolders And Build The Task Once you have everything established

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

    []n’t updated given that 2019, to utilize the latest version course of libraries. Open the command line of your PC and switch to the directory site where you’ve unzipped the files(utilizing cd command or right-click inside the folder” Git celebration here “if you have actually git installed), and run composer upgrade in the PC terminal or git terminal. It will produce subfolders and develop the task. Step 6: Set Up Your Google Advertisement Manager Qualifications 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 absolute directory site path to the JSON key file in the folder root. Action 7: Set The Content Of The File Lastly, navigate to the file/ script/tests/ConnexionTest

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

    “/./” ); need __ 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 are in the/ script/tests/ folder). php ConnexionTest.php You must see a message”= == =Connection OK====” Step 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 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=array(); $Your_Advertiser_Name=’Sample_Advertiser’; $buckets=[“containers”=> [[‘precision’=> 2,’minutes ‘=> 0,’max’= > 4.00,’increment’= > 0.01], [‘ accuracy ‘= > 2, ‘min’ => 4.01, ‘max’ => 8.00, ‘increment’ => 0.05],]]; foreach ($ buckets [” pails”] as $k => $bucket) ‘sizes’ => [[ 1,1], [160, 600], [250, 250], [300, 250], [300, 600], [320, 50], [320, 100], [300, 100], [336, 280], [728, 90], [970, 90], [970, 250]], ‘sizes’ => [[ 250, 250]], ‘orderPrefix’ => $Your_Advertiser_Name,

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

    []Run the command below and it will begin producing line products per the pail settings you have actually defined.

    []php ConnexionTest.php

    []There is a tool using Python that is utilized similarly; you may want to offer it a shot as well.

    Debugging

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

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

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

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

    Screenshot from Google API Console Qualifications page, Deccember 2022

    Choose An Authorization Management System

    []Users’ privacy is one of the most essential aspects, and you wish to make sure that you comply with both GDPR and GPP.

    []The detailed guidelines on how to establish an approval management system in your wrapper are here.

    []There are many providers which comply with IAB’s latest requirements, and here are a few of the most popular ones:

    Conclusion

    []You may discover it surprising that establishing header bidding includes a lot of actions, but it is actually worth it to implement. It can quickly increase your income by +30% or more by creating selling pressure on Google Advertisements.

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

    []I hope that after reading this short article, you will find it simpler to establish header bidding and enhance the monetization of your website.

    []More resources:

    []Included Image: Online Best SMM Panel