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
The below table pulls out the main scripts that slowed down page speed. This test was run against the MTB page
| Vendor | Size | Time | Long Tasks* |
|---|---|---|---|
| GTM | 310kb | 333ms | 225ms |
| Exponea | 111kb | 11ms | 95ms |
| Google Anlytics | 20kbd | 99ms | 97ms |
| Kakao | 13kb | 18ms | |
| TikTok | 99kb | 117ms | 148ms |
| Total | 553kb | 578ms | 565ms |
*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%.