Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Uninstalled Shopify app leaving broken script tags: how to fix

OPS-267Medium impactDetectedBy FunnelGuardPublished Updated
On this page

What this issue is

Many Shopify apps work by adding code to your store. Newer apps use app embeds in the theme editor, which are removed cleanly when you uninstall. Older apps, or apps installed by hand, often paste a <script> tag or a {% render %} snippet straight into files such as theme.liquid, product.liquid or cart.liquid.

Why it costs you leads or sales

A failed request on its own is often harmless. The risk comes from what the leftover code does around it.

How leftover tags cause damage
  • A script that fails to load can delay rendering if it is placed in the head without async or defer.
  • JavaScript errors from half-loaded code can stop later scripts, such as add-to-cart or tracking code, from running.
  • Old code that used to hide, move or wrap page elements may leave buttons or sections broken.
  • Failed requests add noise, which makes real problems harder to spot in your console and logs.
  • Old tracking snippets may keep sending data to a service you no longer use.
How a dead script affects a visit
  1. Visitor opens pageTheme loads normally
  2. Leftover script requestedFile from removed app returns 404
  3. Console errorDependent code fails
  4. Feature or tag skippedButton or tracking may not run

The break is the request for a file the removed app no longer serves.

How to check if your site has it

Find broken resources on your store
  1. Open the page in Chrome

    Visit your home page, a product page and the cart in a private window.

  2. Open DevTools

    Press F12, then go to the Console tab. Look for red errors mentioning a file or domain you do not recognise.

  3. Check the Network tab

    Reload with the Network tab open and filter by status. Requests showing 404 or failed are the ones to trace.

  4. Match domains to apps

    Compare each failing domain with the apps you removed. The app's name is often in the URL.

  5. Search your theme codeShopify

    In Online Store > Themes > Edit code, use the search box to look for that domain or app name.

How to fix it

Remove leftover app code
  1. Check app embeds

    In the theme editor, open App embeds and switch off or remove any entry for an app you uninstalled.

  2. Search theme files

    In Edit code, search for the app name or its domain. Check layout/theme.liquid, templates, sections and snippets.

  3. Delete the tag and snippet

    Remove the script tag and any matching {% render 'app-snippet' %} line, then delete the unused snippet file.

  4. Check other places

    Look in Settings > Customer events for old pixels and in Online Store > Preferences for header scripts from the removed app.

Example of a leftover tag to look forhtml
<script src="https://cdn.example-app.com/widget.js" async></script>
{% render 'example-app-snippet' %}
Theme before and after cleanup

Before

  • Console shows 404 for a removed app's script
  • Snippet file still rendered in theme.liquid
  • Extra failed requests on every page

After

  • No failed requests from removed apps
  • Unused snippets deleted
  • Console clean on key pages

How to confirm it's fixed

Confirmation checks
  • Reload home, product, cart and checkout entry pages with DevTools open: no red errors from the removed app.
  • Network tab shows no 404s for the app's domain.
  • Add to cart, the contact form and any chat or booking buttons still work.
  • Your tracking tags still fire, checked in GTM Preview or the platform's debug tool.
  • Search theme code again for the app name and find nothing.

How to prevent it happening again

Uninstall routine
  • Before uninstalling an app, read its docs for removal steps; some need manual cleanup.
  • Prefer apps that use app embeds, which are removed automatically.
  • After uninstalling, search the theme for the app name and domain.
  • Test on a duplicate theme before publishing changes.
  • Keep a short log of which apps edited which theme files.
  • Re-check the console on key pages after any app change.

How FunnelGuard handles this

FunnelGuard detects this today. When its robot visitor runs your journeys on a schedule, it watches for broken resources and console errors on each page, such as a script that returns a 404. A failure is re-checked from a second region before one alert goes out with a screenshot and a likely cause. It tells you a resource is failing; you still need to trace it to the removed app and clean up the theme. You can start on the Free plan (1 site, 2 journeys, daily checks, no card), or try a paid plan free for 3 days.

Questions people ask

Why does my Shopify store still load scripts from an app I uninstalled?

The app probably added code directly to your theme files, and Shopify does not always remove that when the app is uninstalled. The code stays and keeps requesting files from the app's server. You need to delete it manually from the theme.

How do I find leftover app code in my Shopify theme?

Go to Online Store > Themes > Edit code and use the search box for the app's name or domain. Check theme.liquid, templates, sections and snippets. Chrome DevTools can show the failing URL to search for.

Can leftover app code slow down my Shopify store?

Yes, it can. A script that fails or hangs in the page head can delay rendering, and failed requests add extra work on every page. The effect varies by how the tag is loaded.

Is it safe to delete app code from theme.liquid?

It is safe if you remove only code that belongs to an app you no longer use. Duplicate your theme first, edit the copy, test key pages, then publish it.

Why do I see 404 errors in the console after deleting a Shopify app?

A 404 means the page is requesting a file the app no longer serves. The script tag or snippet that requests it is still in your theme. Removing that line fixes the error.

What are app embeds in Shopify?

App embeds are app features you switch on in the theme editor instead of pasting code into files. They are cleaner to remove, because turning off or uninstalling the app removes the embed.

Does FunnelGuard detect broken scripts left by uninstalled apps?

It detects broken resources and console errors during its scheduled journey checks and alerts you with a screenshot and likely cause. You then remove the leftover code from your theme.

Does FunnelGuard catch this?

Detected

FunnelGuard checks for this today.

How: Broken resources/console.

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.