# Load GPT and bids in parallel

## Overview

This audit checks whether or not header bidding requests are deferred until the
Google Publisher Tag (GPT) library loads. In most cases, these requests are not
dependent on GPT and can be made in parallel with the library being loaded to
speed up ad loading.

## Recommendations

Ensure that header bidding requests do not wait on `googletag.pubadsReady()` or
`googletag.cmd.push()`.

### Prebid.js Example

|---|---|
| **Incorrect** | ```javascript window.pbjs = pbjs || {}; pbjs.que = pbjs.que || []; window.googletag = window.googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.pubads().disableInitialLoad(); // Incorrect: Making bid requests dependent on GPT loading. pbjs.que.push(function() { pbjs.requestBids({ bidsBackHandler: handleBidResponse }); }); }); ``` |
| **Correct** | ```javascript window.pbjs = pbjs || {}; pbjs.que = pbjs.que || []; // Correct: Making bid requests independent of GPT loading. pbjs.que.push(function() { pbjs.requestBids({ bidsBackHandler: handleBidResponse }); }); window.googletag = window.googletag || {}; googletag.cmd = googletag.cmd || []; googletag.cmd.push(function() { googletag.pubads().disableInitialLoad(); }); ``` |

## More information

The list of supported ad exchanges and supply side platforms this audit
evaluates can be found in
[our GitHub repository](https://github.com/googleads/publisher-ads-lighthouse-plugin/blob/HEAD/lighthouse-plugin-publisher-ads/utils/bidder-patterns.js).
[View audit source](https://github.com/googleads/publisher-ads-lighthouse-plugin/tree/HEAD/lighthouse-plugin-publisher-ads/audits/gpt-bids-parallel.js) [Improve this article](https://github.com/googleads/publisher-ads-lighthouse-plugin/tree/HEAD/docs/audits/gpt-bids-parallel.md) [Report an issue](https://github.com/googleads/publisher-ads-lighthouse-plugin/issues/new?labels=documentation&template=documentation-feedback.md&title=Documentation+feedback:+gpt-bids-parallel.md)

<br />