# Overview
The Code Vault is where tracking scripts, custom CSS and small pieces of markup live when you want them **outside your theme files**.
Code in the Vault reaches your storefront through a Shopify app embed, not through `theme.liquid`. So it survives a theme update, and it survives switching to an entirely different theme. Snapty never writes any of it into your theme.
## Why keep code out of theme files
Pasting a script into `theme.liquid` is the most common way a theme stops being eligible for its vendor's updates — and Shopify does not warn you when it happens. It is also the code most likely to vanish when you switch themes, because it was never part of the theme you switched to.
The Vault takes that code out of the theme entirely. The theme file stays as the vendor shipped it; the script still runs on every page.
## How it reaches your storefront
You save a snippet in Snapty.
Snapty publishes your Vault to a small storage slot that only Snapty can write — no theme file is touched.
Two Snapty app embeds in your live theme read that slot and place the code on each page: one in ``, one before ``.
Step 3 depends on you. **App embeds are off by default after any app is installed**, so until you switch them on, a saved snippet reaches nothing. See [Turn on the Snapty app embeds](https://docs.foxecom.com/snapty-app/code-vault/managing-snippets#turn-on-the-snapty-app-embeds).
## Where each placement puts your code
A snippet is delivered to a **placement**, not to a position on the page.
| Placement | Where on the page | What can go there |
| --- | --- | --- |
| **Before the closing body tag** | The very end of the page, after all theme content | Script · CSS · HTML |
| **In the head** | Inside `
`, before the page renders | Script · Meta and link tags |
**For scripts and CSS, placement is about timing, not position.** A script runs the same wherever it is injected; a stylesheet applies to the whole page wherever it sits. Body is the default and better for speed. Head is for code that must run before the page renders — a consent script, or a vendor tag that insists on ``.
**For markup, placement is everything**, because markup is content at the point it sits. In the head, only tags that do not render are accepted — ``, ``, `