Table of contents
Publisher Ad Audits is a series of tests that can be run on any page that runs Google Ad Manager using the GPT tag. The tools is part of Google’s Lighthouse performance testing tool, which has replaced the old pagespeed tests, and gives a host of publisher-specific information. Publisher Ad Audits gives us a host of information about how the ads on a page perform in terms of speed, which can be invaluable. Fast ads make for happy users and increased revenue, so this is information that is well worth having.
How to run publisher ads audits for Lighthouse
Publisher Ads Audits can be run programmatically through an API. Much more common though is that the tests are either run through the online form, a bookmarklet or from the “Audit this page” button in Google Publisher Console. All three manual methods produce the same result, so which method you use is down to convenience and personal preference.
- To run a Publisher Ad Audit through the online form : Simply visit https://developers.google.com/publisher-ads-audits/ , enter the URL you want to test and click “generate report”.
- To run Ad Audits through a bookmarklet, create a new bookmarklet for the script below and click that whilst viewing the page you want to audit:
javascript:(function(){window.open(‘https://pub-ads-audits.appspot.com/audit?url=’+encodeURIComponent(document.location.href.split(‘?’)[0])+’&mobile-emulation=on&utm_source=bkm’,’_blank’);})(); - To run a Publisher Ad Audit through Google Publisher console : Open the Publisher Console then click “Audit this page”
Understanding Publisher Ads Audit results
The report initially presents you with percentage scores for five different areas: Publishers Ads, Performance, Accessibility, Best Practices & SEO. Each is colour coded as Green for good, Amber of OK and Red for poor. The format will be familiar to anyone who already uses PageSpeed insights, but the Ads Audit breaks the score down into five distinct areas rather than given just a single overall score.
The tool tests Mobile and Desktop rendering of the page and will return different scores for each if the results differ. You can switch between the two using the blue bar.
Although the full audit covers five areas, all of which can have a performance on ad revenue, we are going to focus on the Publisher Ads section for the purpose of this guide as this is the part specific to Google Ad Manager users.
The audit runs a number of tests (21 at time of writing, but this might change). The results of each test are colour coded and accompanied by information, such as timings, when appropriate.
More information on each test, what it means and how to fix it is below. Click on any warning message to go straight to that test
- Load ad tag asynchronously #
- Parallelize bid requests #
- Avoid long tasks that block ad-related network requests #
- Avoid render-blocking resources #
- Reduce critical path for ad loading #
- Move the top ad further down the page #
- Avoid loading ads until they are nearly on-screen #
- Reduce latency of first ad request (from tag load) #
- Avoid waiting on load events #
- Avoid bottleneck requests #
- Load tags only once per frame #
- Reduce time to render first ad #
- Increase the width of ad slots #
- Load GPT and bids in parallel #
- Load ad tag over HTTPS #
- Load GPT from recommended host #
- Load ad scripts statically #
- Reduce tag load time #
- Reduce ad density in initial viewport #
Load ad tag asynchronously
Test name: async-ad-tags
Pass message: Ad tag is loaded asynchronously
Lighthouse description: Loading the ad tag synchronously blocks content rendering until the tag is fetched and loaded. Consider using the `async` attribute to load gpt.js and/or adsbygoogle.js asynchronously.
What this message means: JavaScript, such as Ad Manager’s Google Publisher Tag, can either be loaded synchronously (each bit of code is executed in sequence) or asynchronously (code can be executed when it is found, rather than waiting for the previous block to complete). It is usually faster to load Javascript asynchronously as code can run whilst that is happening. This warning is informing you that the Google Publisher Tag is being loaded synchronously.
How to fix the ‘Load ad tag asynchronously’ warning: It’s easy to switch to loading asynchronously just by adding async to the GPT tag, as per the example below. This may introduce other issues though as synchronous loading may have been deliberately set for your site to avoid conflicts with other scripts.
Example synchronous tag
<script async src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
Example asynchronous tag
<script src="https://securepubads.g.doubleclick.net/tag/js/gpt.js">
Parallelize bid requests
Test name: serial-header-bidding
Pass message: Header bidding is parallelized.
Lighthouse description: Send header bidding requests simultaneously, rather than serially, to retrieve bids more quickly.
What this message means: A standard header bidding set-up will request bids from all demand partners at once (in parallel). This prevents unnecessary delay of waiting for each bid to be returned before asking for the next. If that doesn’t happen then this warning is triggered.
How to fix the ‘Parallelize bid requests’ warning: A common cause of this issue is if more than one wrapper is being used. If, for instance, Amazon UAM and Prebid are being used together then they may be running serially. If only one wrapper is being used and this warning is returned then it would be advisable to look into the prebid set-up to resolve this.
Avoid long tasks that block ad-related network requests
Test name: ad-blocking-tasks
Pass message: No long tasks blocking ad-related network requests.
Lighthouse description: Tasks blocking the main thread can delay ad requests and cause a poor user experience. Consider removing long blocking tasks or moving them off of the main thread. These tasks can be especially detrimental to performance on less powerful devices [Learn more].
What this message means: This message is shown when there are tasks running ahead of the call to ads that take a particularly long time to execute. When this happens ads will be called and shown late, which will reduce performance. In extreme cases ads may not even be shown until after the user has scrolled past them.
How to fix the ‘Avoid long tasks that block ad-related network requests’ warning: You can use tools like Webpagetest or GTmetrix too identify long tasks running ahead of the call to ads. Consider whether you can make tasks shorter, remove them, make them asynchronous or call them after the ads have been served.
Avoid render-blocking resources
Test name: ad-render-blocking-resources
Pass message: Minimal render-blocking resources found
Lighthouse description: Render-blocking resources slow down tag load times. Consider loading critical JS/CSS inline or loading scripts asynchronously or loading the tag earlier in the head.
What this message means: Render-blocking resources are those that stop the page for being “drawn” until they are loaded/completed. This is mostly frequently either synchronous JavaScript or CSS.
How to fix the ‘Avoid render-blocking resources’ warning: One way is to remove and resources that block rendering, or move them after the ad tags are called. In practice this can be tricky though. It is usually more practical to use a combination of methods to stop large amounts of CSS and JavasScript blocking rendering such as:
- Remove script and CSS that isn’t needed on every page
- Use asynchronous javascript
- Spilt assets that are critcal for the page load from those that are cosmetic and load the latter after ad units are called
- Avoid @import css calls
- Utilise conditional CSS
- Combine CSS files
- Use inline CSS
Reduce critical path for ad loading
Test name: ad-request-critical-path
Pass message: Minimal requests found in ad critical path.
Lighthouse description: Consider reducing the number of resources, loading multiple resources simultaneously, or loading resources earlier to improve ad speed. Requests that block ad loading can be found below.
What this message means: The Critical Rendering Path is the chain of events that need to happen from the HTML of a page being requested at ending with the content being displayed. The more items in that path, and the longer each takes, the longer a user will have to wait to see contents and for ads to be displayed.
How to fix the ‘Reduce critical path for ad loading’ warning: This is one of the more complex warnings to address and differs a lot from one site to the next. In essence though it involves analysing what is happening as the page is being built and finding points to optimise. LucidChart have a great example on their website of how they tackled this with their application.
Move the top ad further down the page
Test name: ad-top-of-viewport
Pass message: No ad found at the very top of the viewport.
Lighthouse description: Over 10% of ads are never viewed because users scroll past them before they become viewable. By moving ad slots away from the very top of the viewport, users are more likely to see ads before scrolling away.
What this message means: It’s a common mistake to think that ads at the very top of the screen will have the highest viewable. This is not the case, particularly on mobile devices. Users have a tendency to scroll down almost immediately, which can put a placement out of view before the ad even renders.
How to fix the ‘Move the top ad further down the page’ warning: Moving ads away from the very top (10% of viewport) will clear this error and should improve the viewability, and therefore the value, of units. For best results measure where the user lingers on the page.
Avoid loading ads until they are nearly on-screen
Test name: ads-in-viewport
Pass message: Few or no ads loaded outside viewport.
Lighthouse description: Too many ads loaded outside the viewport lowers viewability rates and impacts user experience. Consider loading ads below the fold lazily as the user scrolls down. Consider using GPT’s Lazy Loading API.
What this message means: Long pages that have many ad units on them create significant additional load for the user. If all units are loaded as the page loads this will slow down page loading and create poor user experience. One way to counter that is to only load ads when they are likely to be needed – so called Lazy Loading.
How to fix the ‘Avoid loading ads until they are nearly on-screen’ warning: There are a number of ways that lazy loading can be done, but the easiest is usually too use Ad Manager’s inbuilt lazy loading functions. This can be done within the GPT tag as follows:
googletag.pubads().enableLazyLoad({ fetchMarginPercent: 500, // Fetch slots within 5 viewports. renderMarginPercent: 200, // Render slots within 2 viewports. mobileScaling: 2.0 // Double the above values on mobile. });
Reduce latency of first ad request (from tag load)
Test name: ad-request-from-page-start
Pass message: Latency of first ad request, from tag load.
Lighthouse description: This metric measures the elapsed time from the start of page load until the first ad request is made. Delayed ad requests will decrease impressions and viewability, and have a negative impact on ad revenue.
What this message means: The latency this message refers to is the time between the page being loaded and the first ad being called. Too long and the ads will be slow the display, which impacts viewability, revenue and user experience.
How to fix the ‘Reduce latency of first ad request (from tag load)’ warning: Addressing other issues listed on this page will also help with this one. A lot of the other warnings indirectly impact latency. Anything that causes a delay between the page being loaded and the first ad being shown will have an affect though. Common causes include: Calling AdSense/GPT too late on the page, heavy javascript or CSS, slow server response, slow external files, conditional logic, obfuscated code etc.
Avoid waiting on load events
Test name: blocking-load-events
Pass message: Ads not blocked by load events.
Lighthouse description: Waiting on load events increases ad latency. To speed up ads, eliminate the following load event handlers {timeInMs, number, seconds} s blocked.
What this message means: Load events are events that are only triggered when the whole page has loaded. This includes all dependent resource such as images and external CSS. If ad requests are dependent on a load events then they will either happen very late in the users interaction with the page or possibly not at all.
How to fix the ‘Avoid waiting on load events’ warning: Remove on load events or ensure that ad requests are not dependent on them.
Avoid bottleneck requests
Test name: bottleneck-requests
Pass message: No bottleneck requests found
Lighthouse description: Speed up, load earlier, parallelize, or eliminate the following requests and their dependencies in order to speed up ad loading.
What this message means: Your site/page may incorporate a script or scripts that are dependent upon a particular request that is slow to execute and as such the delivery of ads is being negatively affected.
How to fix the ‘Avoid bottleneck requests’ warning: This warning seems to be more rare, but fixes should be treated similar to those used for reducing the critical path for ad loading and avoiding long tasks that block ad-related network requests. If the offending request and dependent scripts are not critical, consider loading them asynchronously or removing them altogether. Embedding the scripts earlier in the page or using a CDN should be considered if they are necessary for the page/site to function.
Load tags only once per frame
Test name: duplicate-tags
Pass message: No duplicate tags found in any frame
Lighthouse description: Loading a tag more than once in the same frame is redundant and adds overhead without benefit.
What this message means: This checks common (Google) tags to ensure that each is only loaded once. Loading the same tag more than once will slow down the page. This test checks for the following tags: gpt.js, adsbygoogle.js, ima3.js, analytics.js
How to fix the ‘Load tags only once per frame’ warning: Look for multiple occurrences of the listed tag. Check include files and common page elements and remove all but one of each tag.
Reduce time to render first ad
Test name: first-ad-render
Pass message: Latency of first ad render
Lighthouse description: This metric measures the time for the first ad iframe to render from page navigation.
What this message means: This is a very general message and many of the other issues the lighthouse audit can surface will impact on this. In short, anything that increases how long it takes to serve up the first ad could trigger this message.
How to fix the ‘Reduce time to render first ad’ warning: Start by fixing any of the other issues the audit flags. General speed improvements to the page should help resolve this.
Increase the width of ad slots
Test name: full-width-slots
Pass message: Ad slots effectively use horizontal space.
Lighthouse description: Ad slots that utilize most of the page width generally experience increased click-through rate over smaller ad sizes. We recommend leaving no more than 25% of the viewport width unutilized on mobile devices.
What this message means: This test is more about monetization performance than speed performance. Higher CTR units will generally earn more than those receiving less clicks (even when being paid CPM). As wider units get a higher CTR this is general best practice.
How to fix the ‘Increase the width of ad slots’ warning: This is definitely one of the fixes that we would recommend testing rather than blindly following. Whilst wider units will generally perform better, this will not be the case on every site and with every mix of campaigns. The error will be cleared when ad units are taking at least 75% of the width of tested viewports. Responsive AdSense units are an easy way to achieve this. Ensuring that Ad Manager size mappings match the viewports that your users are utilising is the best way for GAM users.
Load GPT and bids in parallel
Test name: gpt-bids-parallel
Pass message: GPT and bids loaded in parallel
Lighthouse description: To optimize ad loading, bid requests should not wait on GPT to load. This issue can often be fixed by making sure that bid requests do not wait on `googletag.pubadsReady` or `googletag.cmd.push`
What this message means: Some implementations of header-bidding wait for bids to be returned and the header auction to be completed before the ad server is called. This causes unnecessary delay and there is no benefit to doing this.
How to fix the ‘Load GPT and bids in parallel’ warning: This was standard behaviour in early Prebid implementations but rare in later ones. This could be an indication that you need to upgrade the version of Prebid that you are using (which will come with other benefits).
Load ad tag over HTTPS
Test name: loads-ad-tag-over-https
Pass message: GPT tag is loaded from recommended host.
Lighthouse description: For privacy and security, always load GPT/AdSense over HTTPS. Insecure pages should explicitly request the ad script securely. GPT Example: <script async src=”https://securepubads.g.doubleclick.net/tag/js/gpt.js\”> AdSense Example: <script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”>
What this message means: https protects network traffic whilst information is in transit. This is important for users privacy and the security of your own site. This error isn’t really flagging a performance issue, but it is definitely worth resolving.
How to fix the ‘Load ad tag over HTTPS’ warning: This is very easy to fix. Simply ensure that GPT and AdSense are always called from https:// urls rather than http:// ones.
Load GPT from recommended host
Test name: loads-gpt-from-sgdn
Pass message: GPT tag is loaded from recommended host.
Lighthouse description: Load GPT from ‘securepubads.g.doubleclick.net’ to reduce GPT load time. By loading GPT from the same host as ad requests, browsers can avoid an additional DNS lookup and HTTP connection. Example:'<script async src=”https://securepubads.g.doubleclick.net/tag/js/gpt.js\”>’
What this message means: Ad Manager’s GPT tag used to get loaded from https://www.googletagservices.com/tag/js/gpt.js then ad requests would be made from securepubads.g.doubleclick.net . This required the browser to make an additional DNS lookup, which slowed things down.
How to fix the ‘Load GPT from recommended host’ warning: Ensure that you are using the latest tag formats. If you see googletagservices.com in your source code then you should update your tags.
Load ad scripts statically
Test name: script-injected-tags
Pass message: Ad scripts are loaded statically.
Lighthouse description: Load the following scripts directly with `<script async src=…>` instead of injecting scripts with JavaScript. Doing so allows the browser to preload scripts sooner.
What this message means: Some websites will inject ad scripts using javascript. This can be a useful work around in some situations, such as when the website CMS is restrictive. However it does cause performance issues as this is a far slower way to serve tags than to have them included in source code.
How to fix the ‘Load ad scripts statically ‘ warning: The solution to this is theoretically simple, but can be difficult to achieve on some websites as you simply need to include the tags in source code rather than using Javascript to inject them.
Reduce tag load time
Test name: tag-load-time
Pass message: Tag load time x.x s
Lighthouse description: This metric measures the time for the ad tag’s implementation script (pubads_impl.js for GPT; adsbygoogle.js for AdSense) to load after the page loads.
What this message means: This message will appear if the main ad tag is slow to load. This usually means that the tag is being called after other script that is taking too long to execute.
How to fix the ‘Reduce tag load time’ warning: Any speed optimisation work is going to help with this issue, but pay particular attention to what is happening before the ads are called. Consider which scripts could be moved further down the page or removed completely.
Reduce ad density in initial viewport
Test name: viewport-ad-density
Pass message: Ad density in initial viewport is within recommended range
Lighthouse description: The ads-to-content ratio inside the viewport can have an impact on user experience and ultimately user retention. The Better Ads Standard recommends having an ad density below 30%.
What this message means: This error relates to the proportion of screen taken up by ads on the first screen as the page loads (ie, before the user scrolls). If more than 30% of the visible screen is taken up by ads this error will be triggered. This issue can impact earnings both by reducing repeat visits and by triggering ads to be blocked on the site by Chrome’s inbuilt ad blocker.
How to fix the ‘Reduce ad density in initial viewport’ warning: Test your pages on a variety of devices. Use techniques like Google Ad Manager size mapping to ensure that less than 30% of the screen is taken up by ads.