Help others
saving time too!

How to measure the latency of third-party ads?

Written by Roy
May 18, 2022 • 3 min read

As a publisher, you want to be sure ads load fast enough, without slowing down the page. In today's programmatic world, every party in the ad tech stack adds their own libraries, pixels and ad validation scripts to a creative.

How are you going to measure the all of this added latency?

What is latency?

First of all, let's define latency as the time it takes for a data packet to be send across a network. In real life, this translates to the visible delay between the loading of a page and the moment something is painted on the screen.

Measuring load speeds

To measure the load speed of a creative, you can add the ad tag or HTML5 ad to a test page and look in Chrome Dev Tools at the DOMContentLoaded event. Upper thresholds are arbitrary, but aim for a load speed of < 500ms. The faster the better.

Also check the Console tab to see if document.write() is invoked. Some ad tech vendors are still using old techniques from the 90s.

Minification, CDN and image compression

A lot of the suggestions offered by Google's web essentials page can also be applied to ads. The JavaScript code to build the ad unit can be minified and gzipped. The assets themselves like images and videos can be hosted on a CDN to minimize network latency between the server and the user. Images can be compressed using lossless techniques to reduce their file size. Any self-respected ad server vendor should implement these techniques to keep latency at a minimum.

Want to try AdValify's QA scanners for free?

Validate ads in < 30 seconds.

External Resources

More from AdValify.io