Skip to main content

GTM Effect on Web App Performance

  • All tests were done on the new Guides Bibs page

Third Party Assets

Speedcurve URL - https://app.speedcurve.com/rapha/thirdparty/?b=apple-iphone-x&cs=lg&d=-1&dc=1&de=1671062399&ds=1670976000&r=eu-west-2&s=733117&u=3957372

Removing GTM reduces third party requests by 84% from 61 to 10, which corresponds to a 95% decrease in third pary asset size from 705kb to 37kb. There is also the total removal of any long and blocking tasks that JS assets run.

A full breakdown of third party javascript files being used can be found here

https://app.speedcurve.com/rapha/thirdparty/?b=apple-iphone-x&cs=lg&d=-1&dc=1&de=1671235199&ds=1670976000&r=eu-west-2&s=733117&u=3946048

The below table pulls out the main scripts that slowed down page speed. This test was run against the MTB page

VendorSizeTimeLong Tasks*
GTM310kb333ms225ms
Exponea111kb11ms95ms
Google Anlytics20kbd99ms97ms
Kakao13kb18ms
TikTok99kb117ms148ms
Total553kb578ms565ms

*https://www.speedcurve.com/blog/javascript-long-tasks/

Page Speeds

Speedcurve URL - https://app.speedcurve.com/rapha/javascript/?b=apple-iphone-x&cs=lg&d=-1&dc=1&de=1671062399&ds=1670976000&r=eu-west-2&s=733117&u=3957372

Both page load time and fully loaded time decrease with the removal of GTM reducing 50% and 52% respectively.

Page load time reduces from 919ms to 455ms, whilst fully loaded reduces from 953ms to 459ms

Page Content Sizes

Speedcurve URL - https://app.speedcurve.com/rapha/responsive/?cs=lg&d=-1&dc=1&de=1671062399&ds=1670976000&m=largest_contentful_paint&r=eu-west-2&s=733117&u=3957372

Largest Contentful Paint decreases 30% from 4s to 2.8s, with reduced content requests of 40% from 128 to 75

Summary

Removing GTM completely reduces content sizes by 25% and reduces time to page loaded and page fully loaded by 52%.