Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Too many third-party scripts slowing your pages: how to fix it

SEO-260Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

A third-party script is JavaScript on your page that comes from a domain you do not control. Common examples are Google Analytics 4, Google Ads and Meta pixels, live chat, booking widgets, review badges, heatmaps, A/B testing tools, cookie banners, embedded videos and social feeds.

Why it costs you leads or sales

Slow pages lose visitors before they see your offer or form. Third-party code also competes with your own content for the browser's attention, which can delay the main image or headline (LCP), push layout around (CLS) and make taps respond late (INP). Google uses these Core Web Vitals as part of its page experience signals, and mobile visitors on mid-range phones feel the weight most.

How added scripts can stack upExample numbers
How added scripts can stack up (example)No third parties: 1.6 seconds; 5 scripts: 2.3 seconds; 12 scripts: 3.4 seconds; 20 scripts: 4.8 seconds0241.62.33.44.8No third parties5 scripts12 scripts20 scriptsseconds

Example: illustrative load times for the same page as third-party scripts are added. Your numbers will differ.

How a heavy script can cost a lead
  1. Ad clickVisitor lands on the page
  2. Third-party scripts loadChat, pixels and widgets compete with your content
  3. Page usableForm and button appear late
  4. Lead submittedVisitor has already left

A slow third-party script delays the page, so the visitor leaves before the form step.

How to check if your site has it

Audit your third-party scripts
  1. Run a speed test on a key page

    Test your landing page or checkout in PageSpeed Insights. Open the diagnostics and look for 'Reduce the impact of third-party code' and 'Reduce JavaScript execution time'. Test the mobile result first.

  2. List every external domain

    In Chrome, open DevTools, go to the Network tab, reload the page and filter by 'JS'. Sort by Domain. Anything not on your own domain is third-party.

  3. Measure the cost of each

    In the Performance tab, record a page load and check the Bottom-Up view grouped by domain. Note which ones use the most main-thread time or size.

  4. Match each script to an owner and purpose

    For each one, write down who asked for it and what it is for. Anything with no owner or purpose is a candidate to remove.

  5. Check your tag manager tooGoogle Tag Manager

    If you use Google Tag Manager, open the container and list all published tags and their triggers. Look for tags firing on All Pages that only matter on one page.

Common third-party scripts and how to treat them
Script typeUsually needed early?Typical approach
Analytics and ad conversion tagsYes, but can be asyncKeep, load async, remove duplicates
Live chat widgetNoLoad after interaction or after page load
Heatmaps and session replayNoRun on selected pages only, or remove
Embedded video or mapsNoUse click-to-load placeholder
Social feeds and badgesNoRemove or replace with a static link
Old or unused pixelsNoDelete

How to fix it

Work in this order: remove, then limit to the pages that need it, then delay, then replace with lighter options. Removing is the biggest win and the safest.

Cut the third-party load
  1. Remove scripts nobody uses

    Delete old pixels, trial tools, duplicate analytics tags and widgets with no owner. Keep a note of what you removed in case something breaks.

  2. Fire tags only where needed

    Replace All Pages triggers with page-specific ones. A heatmap or booking widget does not need to load on every page.

  3. Load non-essential scripts later

    Chat, surveys and feeds can wait until the page has loaded or the visitor interacts. Use async or defer, or a delayed trigger.

  4. Replace heavy embeds

    Show a thumbnail for videos and load the player on click. Use a static map image linking to the live map.

  5. Re-test and compare

    Run the same page test again on mobile and compare script time and load metrics with your first result.

How to do it on your platform
  1. Find where scripts come from

    Scripts come from plugins, the theme and header or footer code boxes. Deactivate plugins one at a time on a staging copy and see which external requests disappear.

  2. Remove or limit plugins

    Delete plugins you do not use. If a plugin has a setting to load only on certain pages, use it. A script manager or asset-control plugin can also disable a script on specific pages.

  3. Delay non-essential scripts

    If your caching or performance plugin has a 'delay JavaScript execution' option, add chat or widget scripts to it, then test your forms and checkout.

Load a non-essential widget after the page has loadedhtml
<script async src="https://example.com/analytics.js"></script>

<script>
  window.addEventListener('load', function () {
    setTimeout(function () {
      var s = document.createElement('script');
      s.src = 'https://example.com/chat-widget.js';
      s.async = true;
      document.body.appendChild(s);
    }, 2000);
  });
</script>
Script load before and after cleanup

Before

  • Many tags fire on every page
  • Chat widget loads at the start
  • Old pixels and duplicate analytics still active
  • Video and map embeds load immediately

After

  • Only needed tags remain
  • Tags fire only on relevant pages
  • Chat loads after the page is ready
  • Embeds load on click

How to confirm it's fixed

Confirmation checks
  • Re-run PageSpeed Insights on mobile and compare third-party code time with your first test
  • The Network tab shows fewer external domains on key pages
  • Your form submits and the thank-you page still loads
  • Conversion events still appear in GA4 DebugView and your ad platforms
  • Chat and other delayed widgets still appear and work
  • No new console errors from removed scripts

Lab tests change right away, but field data in Search Console's Core Web Vitals report is based on real visits over about 28 days, so it improves more slowly.

How to prevent it happening again

Keep the script list under control
  • Keep a simple register of every third-party script, its owner and its purpose
  • Require a reason and a named owner before any new tag is added
  • Review the tag manager and code injection boxes every quarter
  • Remove tools when a campaign or trial ends
  • Test page speed after each new tag or app is installed
  • Prefer one tool over several that do similar jobs
How script bloat builds up
  1. Month 1

    Analytics and one ad pixel are added

  2. Month 4

    Chat widget and heatmap tool are added for a trial

  3. Month 8

    Agency adds extra tracking, trials are never removed

  4. Month 12

    Pages feel slow on mobile and nobody knows why

How FunnelGuard handles this

FunnelGuard detects this issue only partly. When its robot visitor runs your journeys, it reports third-party failures, meaning external requests that fail during the run. It does not score the number of third-party scripts on a page, so it will not tell you that you have too many or how much they slow you down.

Questions people ask

Why are third-party scripts slowing down my website?

Each third-party script needs its own network request, download and processing time, and it runs on the visitor's device. Many scripts together compete with your own content for the browser, which delays the page and makes it feel unresponsive, especially on mobile.

How do I find which third-party scripts are on my site?

Open Chrome DevTools, go to the Network tab, reload the page and filter by JS, then sort by Domain. Any domain that is not yours is third-party. PageSpeed Insights also lists third-party code and its impact under its diagnostics.

How many third-party scripts is too many?

There is no fixed number. What matters is how much they delay your key pages and whether each one is needed. If a script has no clear purpose or owner, or slows your main content, it is one too many.

Do third-party scripts hurt SEO?

They can, indirectly. Heavy scripts can worsen Core Web Vitals such as LCP and INP, which feed into Google's page experience signals. Slow pages also lose visitors, which hurts conversions whatever your rankings are.

How do I make third-party scripts load faster?

Remove the ones you do not need, load the rest only on the pages that need them, and add async or defer. Delay chat, heatmaps and feeds until the page has loaded, and use click-to-load for videos and maps.

Will removing tracking scripts break my analytics?

Only if you remove the wrong ones. Remove unused and duplicate tags, keep your conversion tags, and then check GA4 DebugView and your ad platforms to confirm events still arrive.

Does Google Tag Manager slow my site down?

The container itself is small, but every tag it loads adds weight. A container with many tags firing on all pages can slow things. Tighten triggers, delete unused tags and delay low-priority ones.

Can FunnelGuard tell me if I have too many third-party scripts?

Not fully. FunnelGuard reports third-party failures during its journey runs but does not score how many scripts a page loads. Use PageSpeed Insights and the browser Network tab for the count and impact.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: Third-party failures reported; count not scored.

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.