Add code to the head and footer
Paste verification tags, chat widgets, ad scripts or other third-party code into every page of your site.
Many services ask you to “paste this code into the <head> of your website” or “just before </body>”: a Google
Search Console verification tag, a live-chat widget, an advertising script, a cookie tool. Yclas has two boxes for
exactly that, and whatever you put in them is added to every page of your site.
Where to paste the code
- In the admin panel, go to Settings › General.
- Open Advanced (at the bottom of the list on the left).
- Paste the code into the right box:
- HTML in HEAD Element — when the service says head, or the code is a
<meta>or<link>tag. - HTML in Footer — when the service says before the closing body tag, footer or end of the page. Most chat widgets and many scripts go here.
- HTML in HEAD Element — when the service says head, or the code is a
- Click Save changes.
- Open your site, reload it, and check that the service now works (for example, click Verify in Search Console).
If the instructions don’t say, put <meta> and <link> tags in the head, and <script> tags in the footer. A
script in the footer doesn’t slow down how quickly your page appears.
What it’s for
| You want to… | Use |
|---|---|
| Verify your site with Google Search Console, Bing, Pinterest or Facebook (meta tag method) | HTML in HEAD Element |
| Add a live-chat or help-desk widget | HTML in Footer |
| Add Google AdSense auto ads or another ad network’s script | HTML in HEAD Element (as AdSense asks) |
| Load a font or an extra stylesheet | HTML in HEAD Element |
| Add Google Analytics, a Meta (Facebook) pixel or another tracking code | See Tracking codes and analytics pixels first |
| Show a banner on your pages | The banner fields in Theme options or an Image widget. See Banners and ad slots. |
| Change how the site looks | Custom CSS |
Where the code ends up
| Box | Position in the page |
|---|---|
| HTML in HEAD Element | At the end of the <head>, after the theme’s styles. |
| HTML in Footer | At the very end of the page, after the theme’s scripts, just before </body>. |
Both boxes are added to every public page and to your members’ account pages, in every theme. They are not added to the admin panel.
Be careful with code you paste
Your code runs on every page, for every visitor, exactly as you pasted it.
- Only paste code from services you trust. A script can read anything on the page, including what members type.
- A broken or unfinished tag (for example a
<div>that is never closed, or a<script>without</script>) can hide parts of your site. If the site looks wrong after saving, empty the box and save again: the admin panel doesn’t use this code, so you can always get back in to fix it. - Remove codes for services you no longer use. Each extra script makes your pages slower.
- Ad and tracking scripts may need your visitors’ consent in the EU and UK. See Cookie consent and privacy.
Ads.txt and robots.txt
The same Advanced group has two more boxes:
- Ads.txt — the authorised sellers file ad networks such as AdSense ask for. See Banners and ad slots.
- Robots.txt — instructions for search engine crawlers. See Search engine visibility.
Related guides
- Tracking codes and analytics pixels — Google Analytics, Meta pixel and others.
- Banners and ad slots — make money with advertising.
- Custom CSS — style changes.
- General settings — the rest of Settings › General.
Updated 7 October 2026 · Suggest an edit