# A Shopify app's snippet stops working

> A plain script runs before Smootify has loaded; change its type to smootify-load so it runs right after.

Area: Developers  
Docs: https://www.smootify.io/docs/developers/scripts  
URL: https://www.smootify.io/tips/app-snippet-stops-working

**The symptom.** An app’s code, pasted in the site’s custom code, does nothing or throws errors, often around the cart.

**Why.** Smootify loads as a module, after plain scripts. A snippet that calls the cart (`/cart.js`) or wraps `fetch` runs too early.

**The fix.** Keep the snippet as it is and change only its type:

```html
<script type="smootify-load">
  // the app's code
</script>
```

Smootify runs it right after it has loaded. For your own code, use `window.Smootify.push` instead.
