Your own code and tracking
Add your own JavaScript, or snippets from other tools, to every page of your site. Most sites never need this. When you do need it, it is here.
The short version
- It is included with every website once your subscription is active.
- Your own scripts go under Custom code in website settings. Snippets from other tools go under Tracking scripts on the Analytics tab.
- What you add runs on every page of that site.
- Tracking snippets bring a consent banner with them.
- Test on a page you can afford to break.
- If your subscription lapses, the code stops running but is not deleted.
What it is for
A booking widget from another service. A chat bubble. An advertising pixel. Something small you want on every page that no setting covers.
If what you want is Google Analytics, there is a box for that already and you do not need this.
Where it goes
Body code, on the Custom code tab, runs on every page of that website, just before the end of the page. Write your script there in full: script files loaded from other websites are blocked by your site's security policy.
A snippet from another service, which usually loads a script from that service, goes under Tracking scripts on the Analytics tab instead. Apart from the Google Analytics box, that is the one place scripts from other websites are let in, and it is added to every page too.
Neither runs in the editor's preview. Check the result on your published site.
Be careful, and here is exactly why
This runs on your live site for real visitors. Broken code can stop the rest of your page working, and it will do it silently: your editor will look fine.
Paste snippets from tools you actually use, from their own instructions. Do not paste code you found somewhere and do not understand. If something stops working right after you added a snippet, take the snippet out first and ask questions second.
Tracking snippets and the consent banner
Third-party tracking generally uses cookies and follows people between sites, so a site carrying it has to ask permission.
Add one and your site shows a consent banner, and those scripts do not run until a visitor accepts. That is not optional and it is not a setting. It covers script tags only: an image pixel loads without asking, so prefer the script version of a snippet when a tool offers both.
So each tool costs you a banner and some visitors' patience. That is a real price, and it is worth being honest about whether you are going to read the numbers a given pixel produces.
During a trial, or if your subscription lapses
Scripts do not run on a trial site, and they stop running if your subscription lapses. Your code stays saved either way. Once your subscription is active it runs again, exactly as it was.