Home / Companies / Gatsby / Blog / Post Details
Content Deep Dive

Speed up your time to interactive by delaying third party scripts

Blog post from Gatsby

Post Details
Company
Date Published
Author
Kilian Valkhof
Word Count
1,074
Company Posts That Month
3
Language
English
Hacker News Points
-
Post removed?
No
Summary

Kilian Valkhof's article explores strategies to improve the "Time to Interactive" metric for websites, highlighting its significance for SEO and user experience. He emphasizes the impact of third-party scripts on this metric, particularly in Gatsby sites, where the default performance can degrade with added scripts. Valkhof shares his experience with a performance drop after integrating Segment, which led to a significant increase in "Time to Interactive." To address this, he implemented a technique where scripts are loaded only after user interaction, such as scrolling, to prevent them from affecting the initial load time. This approach improved his website's performance score from 63 to 94. Valkhof also notes the trade-off of potentially less accurate bounce rates and suggests using Google Lighthouse to monitor site performance. He concludes by offering a solution that involves modifying the gatsby-plugin-segment-js to delay script loading, thereby enhancing performance and interactivity.

Trends Found in this Post

No tracked trend matches for this post yet.

Use This Data

Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.