Code Injections
Your own code on every page, applied the moment you save.
The Injections tab adds your own code to every page. It exists for the things a website needs that are nobody's feature — a third-party verification tag, a style override, a snippet a partner asked you to add.
It applies site-wide and takes effect on save, with no review step. Treat it accordingly.
Before You Begin
- Code you understand, from a source you trust
- A reason it belongs on every page rather than one
Steps
Know what each field is for
Header Code goes into the top of every page. It is where verification tags and anything that must load early belongs.
Footer Code goes at the bottom, which is the right place for anything that does not need to block the page from rendering.
Custom CSS applies site-wide and loads after your design system, so it overrides it.
Custom JavaScript runs on every page.
Prefer the built-in settings where they exist
Before pasting a tracking snippet, check whether Webby already has the feature. Visitor analytics and live chat each have their own tab, and using those gets you the integration rather than just the script.
Injections are for what is not covered, not a shortcut past what is.
Write CSS that targets narrowly
Because custom CSS loads after your design system, a broad rule here will beat the design system everywhere — which is what makes it useful and what makes it dangerous.
Target specific things. And reference your design system's named values rather than writing colours and fonts directly, so your injected styles follow a rebrand instead of being left behind by one.
Keep JavaScript defensive
Injected JavaScript runs on every page, including ones that do not have whatever it is looking for. Check that an element exists before acting on it.
A script that throws on one page can stop later scripts on that page from running, which is how one injection breaks a feature somewhere apparently unrelated.
Save, then check more than one page
The change is live on save. Check a few genuinely different pages — your homepage, a long page, a page with a form — rather than only the one you had open.
If something breaks, the fastest diagnosis is to empty the field, save, and confirm the problem goes away.
Result
Your code on every page, checked on more than one of them.