The performance test’s goal was to measure the impact of loading the PubGuru Header Bidding script directly on a web page and indirectly using Google Tag Manager. This was required because some clients implementing Google Tag Manager complained about performance degradation when loading PubGuru Header Bidding through Google Tag Manager.
How the test was executed
Two HTML pages were created:
The first one using Google Tag Manager for loading the PubGuru Header Bidding script.
http://f.monetizemore.com/speedtest.html
The second loading the PubGuru Header Bidding script directly.
http://f.monetizemore.com/speedtestNoGoogle Tag Manager.html
Additionally, two more pages were created to measure the impact in pages closer to those used by publishers.
http://f.monetizemore.com/speedtestHeavy.html
http://f.monetizemore.com/speedtestHeavyNoGoogle Tag Manager.html
They then were discarded since the impact on performance was not measurable consistently.
For the test using Google Tag Manager, a Custom HTML Tag was created in Google Tag Manager, and the tag was configured for triggering on page view.
Collected data analysis
The tests were executed using a custom script for automating the task.
There were 4 main sets of tests:
Google Tag Manager | No Google Tag Manager | |
Mobile | 50 | 50 |
Desktop | 50 | 50 |
And 4 additional for testing with heavy pages:
Google Tag Manager | No Google Tag Manager | |
Mobile | 10 | 10 |
Desktop | 10 | 10 |
Simulated throttling was used in all sets of tests since that configuration provides the best results regarding Variability and Accuracy.
The parameters that were measure were:
- First Contentful Paint (FCP)
- Speed Index
- Longest Contentful Paint(LCP)
- Time to Interactive(TTI)
- Total Blocking Time (TBT)
- Cumulative Layout Shift (CLS)
As shown in the results spreadsheet, there was a consistent impact in the time to interactive metric on the page with Google Tag Manager, about 21%.
For one of the test runs, the opposite Google Tag Manager ran almost twice faster, consistent in all tests run on a site in two different tries. That could be explained by differences in network paths. To clarify this result, additional testing additional would be required.
All the other parameters behaved variably and did not show a clear impact due to using Google Tag Manager for loading the PubGuru Header Bidding script.
First Contentful Paint (FCP) is when the browser renders the first bit of content from the DOM, providing the first feedback to the user that the page is actually loading. The question “Is it happening?” is “yes” when the first contentful paint completes.
Speed Index measures how quickly content is visually displayed during page load. Lighthouse first captures a video of the page loading in the browser and computes the visual progression between frames. Lighthouse then uses the Speedline Node.js module to generate the Speed Index score.
Longest Contentful Paint (LCP) measures when the viewport’s largest content element is rendered to the screen. This approximates when the main content of the page is visible to users. See Largest Contentful Paint defined for more details on how LCP is determined.
The Time to Interactive (TTI) metric measures the time from when the page starts loading to when its main sub-resources have loaded, and it is capable of reliably responding to user input quickly.
The Total Blocking Time (TBT) metric measures the total amount of time between First Contentful Paint (FCP) and Time to Interactive (TTI), where the main thread was blocked for long enough to prevent input responsiveness.
Cumulative Layout Shift (CLS) is an important, user-centric metric for measuring visual stability because it helps quantify how often users experience unexpected layout shifts—a low CLS helps ensure that the page is delightful.
Conclusion
Watch out for part 2 of this guide coming next!
Need help optimizing your ad speed, layouts, performance, and more? MonetizeMore is a Google Certified Publisher Partner already helping hundreds of publishers reach their full ad revenue potential. Let us do the same for you! Sign up today!