Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Too many third-party scripts: how to find and cut them

OPS-200Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

A third-party script is a piece of JavaScript your page loads from a domain you do not control. Examples are analytics, ad pixels, chat widgets, review badges, session recorders, A/B testing tools and font or video embeds.

One or two are normal. The problem starts when they pile up. Old agencies, past campaigns and tested tools leave scripts behind, and nobody removes them. Each one adds download size, work for the browser and another company with access to your visitors' browsers.

Why it costs you leads or sales

Scripts compete with your own content for bandwidth and the browser's main thread (the part that handles taps and clicks). On a phone with a weak connection, a heavy page shows the form late or reacts slowly to taps. Visitors leave before they convert.

There is also risk. Every extra domain is one more place that can fail, expire or be compromised. A script that errors can break the code that runs after it, including your tracking and form handling. Scripts that collect personal data without consent also create compliance exposure.

Page load time as scripts are addedExample numbers
Page load time as scripts are added (example)3 scripts: 2.1 seconds; 10 scripts: 3.4 seconds; 25 scripts: 5.8 seconds0242.13.45.83 scripts10 scripts25 scriptsseconds

Example: illustrative load times for the same landing page with 3, 10 and 25 third-party scripts. Your numbers will differ.

How script bloat costs a lead
  1. Ad clickVisitor lands on the page
  2. Scripts loadMany outside files compete for bandwidth
  3. Form usableAppears late or reacts slowly
  4. LeadVisitor has already left

A slow, script-heavy page loses visitors before the form is usable.

How to check if your site has it

Build a list of every third-party script
  1. Open DevTools on your key pages

    In Chrome, press F12, open the Network tab, tick Disable cache, and reload. Do this on the landing page, the form page and the checkout.

  2. Filter by domain

    Click the Domain column or use the filter box. Look for any domain that is not your own. Click JS to show scripts only.

  3. Group by owner

    Note which tool each domain belongs to and who at your company uses it. Anything with no clear owner is a removal candidate.

  4. Check what the tag manager loadsGoogle Tag Manager

    In Google Tag Manager, open Tags and look for paused, duplicate or old-campaign tags. Many scripts on the page come from here.

  5. Run a lab test

    Run PageSpeed Insights or Lighthouse and read the third-party usage and main-thread time sections to see which scripts cost the most.

Common third-party scripts and the question to ask about each
Script typeQuestion to ask
Ad pixels (Meta, TikTok, LinkedIn)Is a campaign still running on this platform?
Heatmaps and session recordingDoes anyone look at the reports?
Chat widgetIs it staffed and does it load on every page?
A/B testingIs a test live, or is it a leftover?
Social and review widgetsDo they need to load on every page?
Duplicate analyticsIs the same tag installed twice?

How to fix it

Cut and tame your scripts
  1. Remove what has no owner or no use

    Delete scripts for ended campaigns, replaced tools and duplicate tags. Remove the tool's account connection too, if you no longer use it.

  2. Load only where needed

    A chat widget or review badge rarely needs to be on every page. Restrict it to the pages where it helps.

  3. Delay non-essential scripts

    Load heatmaps, chat and social widgets after the page is interactive, for example on a later trigger such as Window Loaded rather than Page View.

  4. Use async or defer

    Scripts that block rendering should carry async or defer so the page can draw first.

  5. Keep consent rules intact

    Do not remove consent checks to save time. Scripts that need consent should still wait for it.

Where to remove or delay scripts
  1. Review plugins

    Many plugins add scripts. Deactivate those you do not use, then check the page again in the Network tab.

  2. Check theme and header settings

    Look in your theme's custom code or header and footer injection plugin for old snippets and remove them.

Load a non-essential script after the page has loadedjavascript
window.addEventListener('load', function () {
  setTimeout(function () {
    var s = document.createElement('script');
    s.src = 'https://example.com/widget.js';
    s.async = true;
    document.head.appendChild(s);
  }, 2000);
});
Script setup before and after a clean-up

Before

  • Scripts from old campaigns and tools nobody uses
  • Same tag installed twice
  • Chat and heatmap load on every page at once

After

  • Every script has a named owner and a purpose
  • Passive tools load after the page is usable
  • Widgets only load on pages that need them

How to confirm it's fixed

After the clean-up
  • Reload key pages with DevTools Network open and count third-party domains again
  • Run PageSpeed Insights before and after and compare
  • Submit a test lead and confirm the form still works
  • Check in GA4 and your ad platforms that conversion events still arrive
  • Test the page on a phone over a mobile connection
  • Confirm the chat widget and other kept tools still load where intended

How to prevent it happening again

Keep the count down
  • Keep a simple list of every script, its owner and why it exists
  • Require a reason and an owner before anyone adds a new tag
  • Review the list every quarter and remove what is unused
  • Remove a tool's script when you cancel the tool
  • Limit who can publish in your tag manager
  • Set a page weight budget and watch it

How FunnelGuard handles this

FunnelGuard detects this issue only partly. A robot visitor runs your real journeys on a schedule and checks page weight. If a page becomes much heavier, for example because new scripts were added, that can show up in that check.

FunnelGuard does not give you a full inventory of every third-party script, tell you which ones are unused, or judge whether each one is safe. It also does not remove anything for you.

To cover the rest by hand, use the DevTools Network method above, review your tag manager, and repeat the audit every quarter. FunnelGuard still helps after a clean-up: it re-runs your journeys and checks tracking hits and form steps, so you notice if removing a script broke something. The Free plan covers 1 site and 2 journeys with daily checks, and no card is needed.

Frequently asked questions

Questions people ask

How many third-party scripts is too many?

There is no fixed number. The test is whether each script has an owner, a purpose and a measurable benefit. If a script has none of these, or if the page is slow on mobile, you have too many.

Why is my website slow because of third-party scripts?

Third-party scripts compete with your own content for bandwidth and the browser's main thread. Each one adds downloads, extra connections and processing work. Heavy ones such as chat widgets, session recorders and A/B testing tools often cost the most.

How do I see which third-party scripts my site loads?

Open Chrome DevTools with F12, go to the Network tab, reload the page and filter by JS. Any domain that is not your own is a third-party script. PageSpeed Insights also lists third-party usage and the time each one takes.

Are third-party scripts a security risk?

Yes, they can be. A script runs with access to the page, so if its provider is compromised or its domain changes hands, that code can affect your visitors. Fewer scripts means fewer places this can happen.

Can I just remove scripts from Google Tag Manager?

Yes, but do it carefully. Pause the tag first, use Preview mode, and confirm conversions still record. Then delete it and publish a clearly named version so you can roll back.

Will removing tracking scripts break my ads?

Only if you remove one that is still in use. Remove tags for ended campaigns and duplicates, keep the ones that record leads and purchases, and check your conversion events afterwards.

Does FunnelGuard detect too many third-party scripts?

Only partly. FunnelGuard checks page weight on your journeys, which can reveal that pages have grown heavier. It does not list every script or decide which are unused, so you still need a manual audit.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: Page weight.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.