How We Optimize Header Bidding Script for Faster Page Load Time?

A publisher that’s about to implement header bidding for the first time typically has a question — how it’s going to impact the page load time? After all, page speed can impact Google search engine ranking, user experience, and the ad rendering time. 

Ensuring that the header bidding script gets loaded instantly can have a positive impact on your bottom line. For instance, with a second of added delay, you are bound to lose 1 percent of the impressions. 

“With 1 s of added delay, impressions decreased by 1.1% for mobile traffic and 1.9% for desktop traffic”

Web.dev.

As a managed header bidding solution provider, we understand that hundreds of publishers rely on our wrapper to run header auctions and get the highest bid sent to Google Ad Manager as soon as possible. Though we optimize on bidder-level (for example, timeouts, enabling/disabling bidders based on performance, etc.), our header bidding script (JS) delivery is optimized for maximum speed as well. In other words, to ensure Automatad’s Javascript gets loaded instantly, we follow certain best practices. Some of them are discussed in this post. 

– Asynchronous Loading

You probably are familiar with synchronous and asynchronous loading. In synchronous loading, scripts are loaded sequentially, one after another, starting with the <head> tag. On the other hand, in asynchronous loading, scripts can be loaded at the same time. 

As you know, the header bidding script has to be on the header of the page and it means it is important to ensure that the script isn’t blocking the rest of the content of the page from loading. And, we do. Automatad’s Javascript (ATD JS) wouldn’t block the rest of the scripts from loading. Once the header auctions are completed, the server will see the impression and header bidding info instantly. 

With optimal timeouts, we ensure users aren’t looking at blank ad spots when the page gets loaded.

– Javascript Minification & Gzip Compression

Minification refers to minimizing code and markup in the JS files. It is one of the most-used methods to reduce page load time and bandwidth usage. We minify ATD JS to improve page load speed and user experience. It also helps users who are accessing the site through a limited data plan and low bandwidth connection to render ads faster. We also use gzip compression to make sure our script size is further reduced for faster network transfer. 

– HTTP/2

We make use of the HTTP/2 protocol to further reduce our script load times. It also means we can take advantage of HTTP/2’s features such as improved performance, updated error handling, and reduced latency. The page load time drops noticeably because of fewer TCP connections. 

– CDN-based Delivery

Publishers tend to attract users from various parts of the world and as a platform that runs header auctions, we need to ensure instant ad delivery for users regardless of their geographical locations. That’s why we deliver our script via a network of CDNs. Instead of serving scripts from our server, multiple CDNs dispersed across the globe will serve the script based on the user’s location. If a user from NY accesses a site, our CDN in NY will deliver the JS. This means faster delivery and reduced latency. 

– Anycast Network Routing

Our DNS provider uses a global Anycast network that helps us to make use of the nearest data center with the capacity to process the request efficiently. It helps the CDN network to stay resilient in the event of high traffic volume and network congestion. Whenever there is a huge influx of traffic to our partners’ sites, we would be able to run faster header auctions as we typically do. 

– Lazy-loading (Optional)

If you haven’t heard about lazy loading yet, we suggest you read this. Anyways, lazy loading increases the page speed by loading the elements (images, ads, and iframes) of the pages only when users scroll them into view. For publishers who would like to implement lazy loading, we lazy load ad units on the web pages, improving page load speed and ad delivery.  

– Monitoring

Last but not least, we also have automated monitoring infrastructure in place using which we proactively monitor our script loading times from multiple locations. This enables us to identify and resolve any script delivery/loading issues before it impacts our publishing partners. 

Automatad Speed Optimization Dashboard

Leave a Reply

Your email address will not be published. Required fields are marked *