Blog › Third-party scripts

How third-party scripts slow down your website

Every time you add an analytics tool, live chat widget, social media button, or advertising pixel to your site, you’re adding code that runs on every visitor’s device. Individually, each one seems harmless. Together, they can account for half your page’s loading delay — and most of it is invisible to you.

What counts as a third-party script?

A third-party script is any code your site loads from an external service. Common examples include:

  • Analytics — Google Analytics, Hotjar, Mixpanel
  • Advertising pixels — Google Ads, Facebook/Meta Pixel, TikTok Pixel
  • Live chat — Intercom, Zendesk, HubSpot, Drift
  • Social media buttons — Facebook like buttons, Twitter/X embeds, LinkedIn Insight Tag
  • Tag managers — Google Tag Manager (which then loads multiple further scripts)
  • Cookie consent banners — OneTrust, Cookiebot, CookieYes
  • Review widgets — Trustpilot, Google Reviews embeds

Why do they slow pages down?

When your page loads, the browser has to pause and wait for these scripts to download before it can finish setting up the page. Think of it like a loading bay where deliveries have to arrive before the shop can open. Each third-party service is a separate delivery, often from a different location, with its own unpredictable timing.

A single Google Tag Manager installation can trigger five or more additional scripts loading in sequence. A live chat tool might load 300 KB of code that the visitor will never use. An A/B testing tool might intentionally freeze the page while it decides which version to show. None of this is visible to the site owner, but every visitor experiences it.

How do I know which scripts are causing the problem?

PageWeight shows a breakdown of third-party scripts in your results — which services are loading, how much data they transfer, and how many milliseconds they’re adding to your load time. This tells you exactly which tools are costing the most, so you can make informed decisions about what to keep.

What to do about it

First: audit what you actually have

Most sites accumulate scripts over time. Old marketing campaigns end but their tracking pixels stay live. Analytics tools get replaced but the old code is never removed. A/B tests that ran six months ago are still loading on every page. Before doing anything else, go through your analytics and marketing platforms and remove anything you don’t actively use.

If your site runs on WordPress

A performance plugin like WP Rocket, Perfmatters, or Asset CleanUp can delay non-essential scripts so they load after your page is already visible to visitors. This doesn’t remove the scripts, but it means they no longer slow down the initial load. Most of these plugins have a simple toggle interface — no developer needed.

For live chat in particular, consider switching to a lighter-weight tool. Many popular chat widgets load several hundred kilobytes on every page even when no one opens the chat window.

On any other platform

Share your PageWeight results with your developer and ask them to load non-essential scripts “after the page is interactive” rather than at the start of the page load. This is a standard technique and a straightforward change for any developer. The specific scripts to prioritize are the ones shown with the highest blocking time in your results.

If you use Google Tag Manager, ask your developer to audit the container — unused tags accumulate there over time and load on every page without anyone realizing.