# Your code, on every page.

> Paste an analytics tag, a chat widget or a site verification into the head or foot of every page with Code injection. Owners and admins only.

Settings › Code and reset has two fields, Head and Foot. **PixelGlass puts what you paste on every page of the site, exactly as pasted**, in every bundled theme.

## By hand, in the admin

1. Open **Settings** and choose **Code and reset**.
2. Under **Code injection**, paste HTML into **Head** for the head of each page, or into **Foot** for its end.
3. Press **Save**. The code is on every page at once.
4. To take it off, empty the field and press **Save**.

Only the owner or an admin can edit the code.

## With your agent

> Put the analytics snippet I paste below at the end of every page in my theme.

> Find the end of my theme's layout and add our chat widget's script there.

The tools it calls: `read_theme_file`, `edit_theme_file`, `render_page`.

No agent tool writes the Code injection fields. An admin's agent can put the same code in the theme's layout with edit_theme_file instead. That code is then on that one theme's pages, and goes live once the theme is whole.

## Examples

- **A verification tag in a minute.** A gardening blog pastes a search engine's verification tag into **Head** and proves the site is theirs the same morning.
- **A chat bubble for a studio.** A design studio pastes its chat widget into Foot, so the bubble is on every post and page.
- **Analytics that outlast a redesign.** A newsletter keeps its own analytics tag in Code injection, not in the theme, so **it stays through every theme change**.

## Questions

### How do I add code to every page on PixelGlass?

Open Settings › Code and reset and paste your HTML into Head or Foot under Code injection, then press Save. PixelGlass adds it to every page of the site.

### Does PixelGlass check or clean the code I paste?

No. Code injection is placed exactly as pasted. Who may write it is the safeguard: only the owner or an admin.

### Is the code in my newsletters too?

No. PixelGlass puts Code injection on the site's pages, not in the emails it sends.

### Does it work with my own theme?

Yes, when the theme's layout carries PixelGlass's head and foot tags. Every bundled theme does, and validate_theme warns about a layout that leaves one out.

### Can my agent add the code for me?

Not to Code injection. An admin's agent can add it to the theme's layout with edit_theme_file, which puts it on that theme's pages alone.

## See also

- [Edit your menus](https://pixelglass.co/guides/edit-your-menus): Change the links in your site's masthead and footer menus. Add, reorder and remove them in Settings › Design, or ask your agent.
- [Change your theme](https://pixelglass.co/guides/change-your-theme): Try any of the 9 themes on your own site, fill in its settings and make it live. Do it in Settings › Design or ask your agent.
- [Read your traffic](https://pixelglass.co/guides/read-your-traffic): The Dashboard shows visitors, views, sources, countries and devices, with no cookie and no banner. What each figure means, and how to filter it.
- [Themes](https://pixelglass.co/features/themes): Start from 9 themes made for magazines, newsletters, coaches and portfolios. Change the look in Settings, or ask your agent to redesign it.
- [Every guide](https://pixelglass.co/guides)
- [Pricing](https://pixelglass.co/pricing): every feature on every plan, 14 days free
- [Create your site](https://pixelglass.co/signup)
