The tracking scripts your site still loads for tools nobody uses anymore
Speed up your pages and stop sending visitor data to vendors you dropped years ago. How to find, pause, and remove unused tracking scripts without breaking forms.
Every marketing tool starts the same way: paste this snippet into your site's <head>. Then the trial ends, the campaign wraps, the agency moves on. The snippet stays.
Open the source of a site that has been live for five years and you will often find a short history of its marketing stack. A heatmap tool from a redesign nobody remembers. A LinkedIn Insight tag from one quarter of ads. Two chat widgets, one of them hidden. A Facebook pixel tied to an ad account no one can log into. A Universal Analytics snippet still sending hits to a product Google turned off.
Each one still runs on every page view. This post covers what those scripts cost you, where they hide, and how to remove unused tracking scripts without breaking the parts of the site that quietly depend on them.
What a dead script still costs
A script you stopped using does not stop working. It downloads, parses, and runs exactly as it did the day it was installed.
Speed. Every third-party script needs its own DNS lookup and TLS connection, then time on the browser's main thread to run. Many tag scripts load more scripts of their own. Google's guide to third-party JavaScript performance covers how this delays rendering and interaction. A script feeding a dashboard nobody opens pays that cost for nothing.
Privacy. The vendor still receives the visitor's IP address, the page URL, browser details, and often a cookie identifier. Your privacy policy may not name that vendor anymore, and your consent banner may not list it. If nobody holds a login to the account, nobody can change its retention settings or act on a deletion request.
Security. A third-party script runs with the same access as your own code, including your form fields. You are trusting whoever controls that domain today, not whoever controlled it when the snippet went in. In 2024 the polyfill.io domain, embedded on a huge number of sites years earlier, changed owners and began serving malicious code to some visitors. It was not a tracker, but the lesson carries over: a script from a vendor that has been sold, shut down, or let its domain lapse is a standing risk on every page.
Where forgotten scripts hide
Forgotten scripts rarely live in one place. Check each of these:
- Theme files.
header.php,theme.liquid, or your framework's layout file. - Code injection fields. WordPress header and footer plugins, Squarespace Code Injection, Webflow and Wix custom code settings. These sit outside the theme, so redesigns miss them.
- Google Tag Manager. Old tags with an All Pages trigger keep firing long after the campaign ends. Some sites run two containers, one left by a former agency.
- Uninstalled apps and plugins. Removing an app does not always remove the snippet it added to your theme.
- Conversion pages. Thank-you and order confirmation pages often carry pixels that never appear on the homepage.
Duplicates are common too. Google Analytics installed in the theme and again through Tag Manager counts every page view twice. And a tracking ID that starts with UA- belongs to Universal Analytics. Google stopped processing Universal Analytics data for standard properties on July 1, 2023, so that snippet sends visitor data to a product that no longer does anything with it.
Build the inventory
A first pass takes about 15 minutes.
- Search the page source. View source on your homepage and search for common tracker domains:
googletagmanager.com,google-analytics.com,connect.facebook.net,snap.licdn.com,static.hotjar.com,clarity.ms,analytics.tiktok.com,static.ads-twitter.com. - Watch the network panel. Open a private window, open DevTools, and load the page. In Chrome, right-click the column headers to add a Domain column, then sort by it. Every domain that is not yours needs a name and a reason.
- Accept the cookie banner and reload. Tags gated behind consent only appear after you accept. Repeat on a contact page and a form's thank-you page.
- Open each Tag Manager container. List every tag, its trigger, and when it was last edited.
Put the results in one table: script, vendor, purpose, owner, and whether anyone can still log in. Then run each row through these questions:
| Question | If the answer is no | |---|---| | Does anyone have a working login to the vendor account? | Remove it | | Has anyone looked at its data in the last 90 days? | Pause it and ask around | | Does a live ad campaign optimize against it? | Remove it after checking with whoever runs your ads | | Is it named in your privacy policy and consent banner? | Fix the disclosure or remove the script |
Anything with no owner and no login is the easiest call. Nobody will miss it, because nobody can see what it collects.
How to remove unused tracking scripts safely
Deleting the main snippet is half the job. Breakage comes from the pieces around it.
Test with request blocking first. In Chrome DevTools, right-click a request in the network panel, choose Block request domain, and reload. Submit your forms, open the chat, run a test checkout. If everything works with the domain blocked, it will work with the script gone.
Pause before you delete in Tag Manager. A paused tag stops firing but keeps its configuration, so restoring it takes one click and a publish. Leave it paused for a few weeks, then delete it.
Find the code that calls the script. Theme code and form handlers often call tracker functions directly, such as fbq('track', 'Lead') after a form submits. Remove the Facebook pixel and leave that line behind, and the browser throws ReferenceError: fbq is not defined. Any code after that line in the same block never runs. Search your theme for fbq, gtag, ga(, _hsq, lintrk, and ttq, and check the browser console after every removal.
Clean up the companions. Most snippets come with extras:
<noscript>image pixels, or the Tag Manager<noscript>iframe in the<body>preconnectanddns-prefetchhints pointing at the vendor's domain- The vendor's entries in your Content Security Policy allowlist (see the CSP your CMS hides for where those live)
- The vendor's listing in your consent banner and privacy policy
Save a copy of every snippet you remove, with the date, next to your inventory. If someone asks for it back next month, you can restore it in minutes. Then reload with the network panel open and confirm nothing goes out to the vendor's domain.
Keep the list from growing back
Scripts pile up because adding one is a two-minute job and removing one is nobody's job. A few habits fix that:
- Route new tags through one place. Tag Manager or a single include file, so the inventory stays visible.
- Name tags with an owner and a review date. "LinkedIn Insight, Q1 campaign, owner: marketing, review 2027-04-01" tells the next person whether it is safe to remove.
- Make snippet removal part of cancelling a tool. When the subscription ends, the code comes out the same week.
- Review the list every quarter, and when an agency leaves. Their tags and containers often outlast the contract.
What the scan checks
The privacy module in the AcuityScan full scan reads your homepage as served and lists every tracking script it recognizes, sorted into analytics, marketing, and functional tools such as chat widgets. It also flags trackers in the <head> of a page that shows a consent banner, trackers with no banner at all, and a missing privacy policy link. Tags fired from inside a Tag Manager container will not appear in page source, so check those in the container. The tech lookup checks any URL against 60+ tech stack signatures, and the performance test gives you a before and after for the cleanup.
Want the list without opening DevTools? Run a free scan at acuityscan.com to see every tracker your homepage loads, alongside 350+ checks across 8 modules.
Scan your own site
See what 350+ checks find on your domain.
Free, no signup, 60 seconds. Email auth · DNS · SSL · Performance · SEO · Accessibility · Privacy · Mobile.
