SolisReach
← Journal
Web Performance5 min read

Auditing third-party scripts before they wreck your Core Web Vitals score

Written by the SolisReach team

A site that was fast at launch tends to slow down gradually, not from the pages themselves but from everything added around them afterward: a chat widget here, a heatmap tool there, a retargeting pixel, an A/B testing script, a review platform embed. Each addition felt small at the time. The cumulative effect, six months later, is a site that fails its Core Web Vitals thresholds for reasons nobody on the team can immediately explain.

Finding what's actually installed

Most teams underestimate how many third-party scripts are running on their site, because they were added by different people at different times through different tools (a tag manager, a plugin, a hardcoded snippet from a vendor's onboarding email). A network waterfall in Chrome DevTools, or a tool like WebPageTest, shows every request the page makes on load, which is the fastest way to get a complete, honest inventory.

Scoring each script by cost versus value

For each script, we ask two questions: how much load time and main-thread blocking is it actually costing (visible directly in the waterfall and in Lighthouse's "reduce JavaScript execution time" audit), and is anyone on the team actually using the data or feature it provides. Scripts that score high on cost and low on active use are the easiest deletions, and there are usually more of them than clients expect.

Deferring instead of deleting

For scripts that are genuinely useful but not needed immediately on page load, chat widgets, review platform embeds, most analytics beyond a core pageview tag, loading them after the main content has rendered, rather than blocking it, preserves the functionality while removing it from the critical path. This alone often recovers a full second or more of LCP on script-heavy sites without removing a single feature.

The governance problem behind the technical one

The deeper issue is usually process, not code: anyone with tag manager access can add a new script without anyone else reviewing its performance impact. We recommend a lightweight rule for client teams: any new third-party script gets a before-and-after Lighthouse check before it ships, not because every script needs to be blocked, but because someone should actually be looking.

What we found on a recent audit

On one client site, we found eleven separate third-party scripts, four of which nobody on the current team recognized or could explain. Removing the four unused ones and deferring three of the remaining seven brought mobile LCP down by 1.3 seconds with zero functional change to the site. It's often the single highest-leverage hour we spend on a performance engagement.

On one client site, we found eleven separate third-party scripts, four of which nobody on the current team recognized or could explain.

Tag managers make the problem worse, not better

Tag management systems were built to make adding third-party scripts easier for non-developers, and they've largely succeeded at that goal, which is exactly why script sprawl has gotten worse over time rather than better. A tag manager with no review process attached is a frictionless path for anyone with access to add a new script without ever touching a performance budget or asking whether it's actually needed.

We recommend a lightweight approval step inside the tag manager itself: a staging environment where new tags get tested and measured before promoting to production, with a simple before-and-after Lighthouse comparison as part of the promotion checklist. It adds a day or two of friction to shipping a new tracking pixel, which is a fair trade for not silently degrading site performance every time someone in marketing adds a new tool.

Setting an actual script budget

Beyond ad hoc audits, we recommend clients set an explicit total budget for third-party script weight and main-thread blocking time, similar to an image or JavaScript budget for the site's own code. When a new script would push the total over budget, that's the trigger for a real conversation about trade-offs rather than an unnoticed, gradual creep that only gets addressed once the whole site has already slowed down enough to notice.

Cookie consent banners and the underlying consent management platforms that power them are, ironically, some of the heaviest third-party scripts we see, and they're rarely questioned during a script audit because they feel mandatory rather than optional. Several popular consent platforms load a substantial JavaScript bundle before the page can even render the banner itself, which directly delays LCP on a component most visitors dismiss without reading.

We don't recommend removing consent management where it's legally required, but we do recommend auditing which specific platform is in use and whether a lighter-weight alternative exists, since the gap between the heaviest and lightest popular consent tools is large enough to matter for a Core Web Vitals score on its own, independent of anything else running on the page.

A checklist for the next script anyone wants to add

Before approving a new third-party script, we run through four questions with the client team: does it need to load before the main content renders, or can it wait until after. Is there a lighter-weight alternative that provides the same core functionality. Who on the team will actually be using the data or feature six months from now, and is that answer written down anywhere. And what's the specific, measured performance cost, checked in Lighthouse before and after adding it, not estimated from the vendor's own marketing claims.

Running through this list takes a few minutes and rarely blocks a genuinely useful script from shipping. What it does block is the slow accumulation of forgotten, unused, or redundant tags that nobody remembers approving, which is exactly the pattern that turns a fast site into a slow one over the course of a year without any single decision looking unreasonable in isolation.

We've started sharing this checklist directly with client marketing teams rather than keeping it as an internal review step, since the people most likely to add a new script, whoever owns the tag manager, are rarely the people who'll notice the performance cost later. Putting the questions in their hands up front prevents more sprawl than any after-the-fact audit ever recovers.

Start a project

Want this applied to your site?

We run a Core Web Vitals and SEO audit before quoting any performance marketing engagement, and we're happy to share what we'd find on yours.