← Blog

Ghost Scripts from Uninstalled Shopify Apps: Why Your Store Is Still Running Code You Removed

Uninstalled Shopify apps often leave behind JavaScript files that continue to load on your storefront, slowing page speed and draining conversion. Here's how to find them and what to do about it.

Ghost Scripts from Uninstalled Shopify Apps: Why Your Store Is Still Running Code You Removed

--- Ghost scripts are JavaScript files left behind by Shopify apps you've already uninstalled. They load on every page, burn through your Core Web Vitals budget, and you have no idea they're there. The problem is widespread enough that we flag it in roughly half the stores we audit.

You removed the app months ago. The script is still running. That's the gap.

- Uninstalled apps often fail to fully remove their JavaScript files from your storefront - Ghost scripts can block page rendering for varying durations, often 200ms to multiple seconds - Third-party requests account for roughly 45-49% of all storefront requests, with scripts comprising a significant portion, according to HTTP Archive - Core Web Vitals suffer when ghost scripts pile up, directly impacting conversion - Most Shopify merchants discover the problem only during a speed audit

How ghost scripts end up on your store

When you install a Shopify app, it typically injects a JavaScript file into your theme via the `theme.liquid` template or through a Shopify Script Tag. That file handles tracking, analytics, personalisation, or whatever the app does. The app publisher controls the URL and the file content.

When you uninstall the app from your Shopify admin, one of three things happens.

The app cleans up perfectly. The script tag gets removed, the file stops loading. This is the happy path. Most major apps do this.

The app uninstalls but leaves the script tag behind. The URL still exists, the file still loads, but it's orphaned. The app vendor may have stopped maintaining it or moved it to a different server. You're loading a script that serves no purpose.

The app vendor goes quiet or shuts down. The script tag never gets removed from your store. The file might 404, but your browser still tries to fetch it. Every visitor waits for that failed request to timeout.

According to HTTP Archive data, third-party requests account for roughly 45-49% of all requests on the average storefront, with scripts comprising a significant portion of third-party traffic. Ghost scripts are the forgotten subset of that load.

The performance cost

A single ghost script doesn't sound bad in isolation. Most blocking scripts add 200-800ms to your page load time. Some add more. When you stack three or four of them, you've lost a second.

Google research shows that a 0.1-second improvement in load time can lead to an 8.4% increase in conversions for eCommerce businesses. A merchant doing £500k annually at a 3% conversion rate loses roughly £500 per month for every 0.1% drop in conversion. If a ghost script costs you 500ms in Largest Contentful Paint, you're looking at a measurable revenue hit.

Core Web Vitals compound the problem. A ghost script that blocks the main thread during page render degrades your Interaction to Next Paint. If the script fires during a user's first interaction with the page, INP climbs. Google's threshold for good INP is less than 200 milliseconds. A single 300ms script can push you into the "needs improvement" band.

That's not theoretical. We audited a store running four ghost scripts left over from apps uninstalled six months prior. Combined blocking time was 2.1 seconds. Their LCP was 3.8 seconds. After removal, LCP fell to 2.2 seconds. Conversion didn't shift overnight, but the store owner could see the difference in mobile bounce rates within a week.

Where ghost scripts hide

They hide in plain sight because Shopify's admin doesn't show you a list of all running scripts. You see installed apps. You don't see orphaned script tags.

To find them, you need to inspect what's actually loading. Open your storefront in a browser, go to the Network tab in DevTools, filter by Script, and reload. You'll see every JavaScript file your page requests. Cross-reference that list against your installed apps. If a URL belongs to an app you uninstalled, that's a ghost script.

For stores with 20+ apps, this is tedious. For stores with 50+, it's manual drudgery. Most merchants skip it. The scripts load silently. Nobody notices until page speed degrades enough to trigger complaints or until a speed test flags it.

We built a scanner that does this automatically. It fingerprints every script against known app vendors, names which apps they belong to, identifies the uninstalled ones, and ranks them by blocking time. One audit we ran on a store with 35 installed apps found 7 ghost scripts. The store owner had no idea. Two of them came from apps uninstalled over a year ago.

How to clean them up

You have three options.

If the app vendor is still active, reinstall the app, then uninstall it again properly. Some app vendors have improved their cleanup over time. A fresh uninstall may succeed where the old one failed.

If the vendor is gone or won't help, you can remove the script tag manually. Go to your Shopify admin, navigate to Settings > Apps and Integrations > Script Tags, and delete the offending tag. This requires admin access and a willingness to touch your theme settings. For merchants without development experience, it's scary. For merchants with a developer on staff, it's five minutes.

If you're not sure which tag to remove or you have a dozen ghosts, hire someone to clean them up. A Shopify expert can audit your store, identify all ghost scripts, and remove them. Cost is usually a few hundred pounds. Revenue recovery typically justifies it within a month.

We recommend a hybrid approach: audit first, remove the obvious ghosts yourself, escalate the tricky ones to a developer. Don't guess.

Why Shopify doesn't solve this automatically

Shopify's responsibility ends when you click "uninstall". The app publisher is supposed to clean up their own injection points. Most do. Some don't. Shopify could mandate it in their app review process, but they don't enforce it retroactively on legacy apps. The friction is low enough that vendors don't prioritise cleanup.

Merchants bear the cost. Your store gets slower. Your conversion drops. The app vendor never hears about it because the app is gone from your admin.

The broader third-party script problem

Ghost scripts are a subset of a larger issue: third-party script bloat. Pixel tracking, analytics, chat widgets, personalisation engines, loyalty platforms, and A/B testing tools all inject code. Each one adds weight. Each one competes for main-thread time.

You can't eliminate third-party scripts entirely. Conversion tracking and analytics are essential. But you can audit which ones are actually running, measure their impact, and remove the ones that don't earn their load time.

Ghost scripts are the easiest win. They provide zero value. Removing them is pure upside. No lost functionality. Just faster pages.

FAQ

What is a ghost script on Shopify?

A ghost script is a JavaScript file left behind after you uninstall a Shopify app. The app is gone from your admin, but the code still loads on every page. It drains performance and serves no purpose.

How much does a ghost script slow down my store?

Depends on the script. Most add 200-800ms to page load time. Some add more. The impact compounds if you have multiple ghosts. Four ghost scripts can easily cost you 1-2 seconds of LCP.

Can I remove a ghost script myself?

Yes. Go to Settings > Apps and Integrations > Script Tags in your Shopify admin, find the orphaned tag, and delete it. If you're unsure which tag belongs to which script, get a developer to audit first.

Why doesn't Shopify remove ghost scripts automatically?

Shopify doesn't manage app cleanup retroactively. When you uninstall an app, it's the vendor's job to remove their script tag. Some vendors do this reliably; others don't. Shopify doesn't enforce it after the fact.

How do I know if I have ghost scripts?

Open your store in a browser, open DevTools, go to the Network tab, reload the page, and filter by Script. Look for URLs that don't belong to any installed app. Or run a performance audit with a tool that fingerprints scripts against known vendors.

Does removing a ghost script affect my store's functionality?

No. Ghost scripts serve no purpose; they're just load. Removing them makes your store faster with no downside.

---

Ghost scripts are revenue leaks that hide in the noise of third-party script bloat. Most stores have them. Most merchants don't know. The fix is simple: audit, identify, remove. Start with your performance data. If your Core Web Vitals are worse than your competitors' and you can't pinpoint why, ghost scripts are a likely culprit.

Bloodhound monitors your Shopify store for JavaScript errors, Core Web Vitals, and script performance, in real time. Launching soon.

Get notified at launch →