When a small business website feels slow, the first suspect is usually the hosting or the images. Those are worth checking. But on many of the sites we audit, the biggest cost isn’t the site’s own code at all. It’s code from other companies: the chat widget, the review badge, the analytics tag, the ad network, the booking pop-up, the social feed.
Each one was added for a good reason, usually one at a time, by different people. Nobody ever looked at the total. This post shows you how to look at the total in about 15 minutes, using only free tools that come with Chrome.
Why Third-Party Code Is Different
Code you host yourself is under your control: you can compress it, cache it, and decide when it loads. Third-party code isn’t:
- It’s often large. A single ad or chat script can be bigger than your entire site’s own JavaScript.
- It loads more code. Many tags are “loaders” that fetch further scripts, which can fetch more still.
- It competes for the main thread. JavaScript has to be parsed and run, and while it runs, the page can’t respond to taps and clicks. This is what makes a page feel “stuck” even after it looks loaded.
- It changes without you. The vendor can ship a heavier version tomorrow, and your site gets slower without anyone on your side touching anything.
Our Own Wake-Up Call
We ran this audit on our own marketing site earlier this year and didn’t love what we found. Every page, including our pricing page, was loading an ad network’s script. The main ad script alone was around 190 KB compressed per page, and on some page loads the ad code fetched over half a megabyte. A review-widget script was loading on every page, even though only a few pages actually displayed reviews.
The ads were the clearest problem. On a pricing page, the visitor is deciding whether to buy. An ad there earns fractions of a cent, slows the page down, and could even show a competitor’s offer at the moment of decision. We removed ads from every sales page, loaded the review widget only on pages that show reviews, and delayed analytics until a visitor accepts cookies. Later we went further and took ads off the blog too. For a business that sells services, the few cents an ad earns aren’t worth the slower pages, the distraction, or the risk of showing a competitor to a reader who might become a client.
Your site will have a different mix, but the process for finding it is the same.
Step 1: List Everything (5 Minutes)
- Open your site in Chrome in an Incognito window, so browser extensions don’t add noise.
- Press
F12to open DevTools and click the Network tab. - Check Disable cache (so you see what a first-time visitor downloads).
- Reload the page.
- Right-click the column headers and enable Domain if it isn’t shown, then click it to sort.
Everything that isn’t your domain is third-party. At the bottom of the panel, Chrome shows totals for requests and transferred size. Now type a third-party domain into the Filter box and watch the totals change. That’s what one vendor costs on this page.
Do this for at least three pages: home, a content page, and your most important conversion page (contact, pricing, or checkout).
Step 2: Measure the Impact (5 Minutes)
Size is only part of the story. What hurts users most is JavaScript execution time.
- Go to pagespeed.web.dev and test the same page on Mobile.
- If your site gets enough traffic, the top section shows real-user data (Core Web Vitals from actual Chrome visitors). This is what Google uses. Lab scores below it are a simulation.
- Scroll to the diagnostics and look for the section about third-party code. It lists each third-party provider, how much it transferred, and how long it blocked the main thread.
Pay most attention to main-thread blocking time. A script that blocks the main thread for hundreds of milliseconds on a mid-range phone is a script that makes your buttons feel unresponsive.
Pro Tip
Test on mobile, not desktop. Your laptop is several times faster than the median phone visiting your site. A script that costs 50 ms on your machine can cost several hundred on a budget Android phone, and that’s the experience most of your visitors have.
Step 3: Decide What Stays (5 Minutes)
Make a short table with one row per third-party vendor:
| Script | What it does | Pages it’s on | Pages that need it | Cost |
|---|---|---|---|---|
| Chat widget | Live chat | All | Contact, pricing | 300 KB, 400 ms |
| Review badge | Shows star rating | All | Home | 120 KB |
| Analytics | Traffic reporting | All | All | 90 KB |
(Your numbers will differ. Fill them in from Steps 1 and 2.)
The gap between “pages it’s on” and “pages that need it” is almost always where the easy wins are. Then ask four questions for each row:
- Is anyone using it? It’s common to find tags for tools the business cancelled a year ago that are still loading on every page.
- Does it need to be on every page? Most don’t.
- Does it need to load immediately? Most don’t.
- Is there a lighter option? Sometimes the same job can be done with far less code.
The Fixes, From Easiest to Hardest
Remove what’s dead
Old tracking pixels, abandoned A/B testing tools, a chat tool you switched away from. Find where each was added (your theme’s header, a tag manager container, a plugin) and remove it. This is the cheapest performance win there is.
Load only where needed
If reviews only appear on your home page, load the review script only on your home page. Most site builders and content management systems let you add code to specific pages instead of a global header. For tag managers, use a page-path trigger instead of “All Pages.”
Load later
Many scripts don’t need to run before the visitor can see and use the page. Options, roughly in order of effort:
- Add
deferorasyncto the script tag (if the vendor supports it). - Load the script after the page has finished loading, or when the browser is idle.
- Load it only after a visitor action: scrolling, opening a menu, or accepting cookies. That last one does double duty, because in many regions you shouldn’t load analytics or advertising tags before consent anyway.
Use a facade
For heavy embeds like YouTube videos, maps, and chat widgets, show a lightweight placeholder that looks like the real thing (a thumbnail with a play button, a static map image, a chat bubble icon) and load the actual embed only when the visitor clicks. Most visitors never click, so most visitors never download it. For YouTube there are well-established open-source “lite” embed components that do exactly this.
Self-host where licensing allows
Some resources, like web fonts, can be downloaded and served from your own domain. That removes a connection to another server and gives you control over caching.
Make It a Habit
Third-party creep happens gradually. Someone adds a tool for a campaign, the campaign ends, the tool stays. Two habits keep it under control:
- Keep a written list of every third-party script, who owns it, and why it’s there. If you use a Content Security Policy, that list is effectively already written for you.
- Re-run this audit every quarter, or whenever someone adds a new tool. It takes 15 minutes, and it catches things that otherwise accumulate for years.
The goal isn’t zero third-party code. Analytics, payments, and spam protection earn their place. The goal is that every script on your site is there on purpose, on the pages that need it, at the moment it’s needed.
❓ Frequently Asked Questions
Do third-party scripts affect SEO?
Indirectly. Google uses Core Web Vitals (loading, responsiveness, and visual stability) as one of many ranking signals, and heavy third-party scripts are a common reason sites fail them. The bigger effect is usually on people: slow pages lose visitors before they ever read your content.
Is it safe to remove a script if I don't know what it does?
Not blindly. Search your site’s code or tag manager for the domain, find out what added it, and remove it on a test or preview deployment first. If it’s tied to something like payments or forms, check those still work.
What's a facade?
A lightweight placeholder that looks like the real widget — a video thumbnail with a play button, or a chat bubble — and only loads the heavy third-party code when the visitor actually clicks it. Most visitors never click, so most visitors never pay the cost.
Want Us to Run the Numbers?
We'll audit what your site loads, show you what each tool costs, and help you keep the ones that earn their place.
Was this article helpful?
WebGlo