# Adding and editing a snippet
**Code vault → Add a snippet.** Four steps, in an order that matters — then the same screen again when you come back to edit.
## 1 · Where it loads
Placement comes first, because it decides which kinds of code exist at all.
| Option | When to choose it |
| --- | --- |
| **Before the closing body tag** | The default, and better for speed. Right for almost everything |
| **In the head** | Only if the code must run before the page renders, or it is a verification tag |
If the embed for the placement you chose is off in your live theme, the step says so before you write anything — *"The head embed is off, so this snippet will not load until you switch it on. Saving does not switch it on."* See [Turn on the Snapty app embeds](https://docs.foxecom.com/snapty-app/code-vault/managing-snippets#turn-on-the-snapty-app-embeds).
Press **Use this placement** to continue.
## 2 · What kind of code
| Kind | What to paste | Placement |
| --- | --- | --- |
| **Script** | The JavaScript **between** the `