Sitebuilder handles most of your site’s structure automatically, including generating the HTML, CSS and JavaScript it needs. If you need extra functionality, you can use custom code to integrate tracking tools, third-party services, widgets or advanced customisations.
Note: adding and editing custom code requires Sitebuilder Large. If you have a different package, you’ll need to upgrade to use this feature. While code may work as expected, we can’t guarantee long-term compatibility – third-party scripts can become outdated or conflict with platform updates.
You can insert custom code in three specific places on your site:
- Inside <head>
- After <body>
- Before </body>
Most third-party providers tell you where their code should go. If no placement is mentioned, start with the <head> section.
In Sitebuilder there are four places where you can add custom code:
- In Website settings, for the whole site
- In Page settings, for an individual page
- In the Custom block, using the HTML widget
- Via the HTML embed block
Adding custom code for the whole site
Site-wide custom code applies to every page.
- In Sitebuilder, click Main menu in the top-left corner.
- Click Settings in the sidebar.
- Open the Custom code tab.
Within each placement area (Head, Body or Footer) you can create and manage several code snippets.
Adding a code snippet
- Click Add code in the section you want: inside <head>, after <body>, or before </body>.
- In the dialog:
- Enter a Name to identify the snippet.
- Paste your HTML, CSS or JavaScript code.
- Choose Rendering: Website and editor (runs on the published site and inside the editor) or Website only (runs only on the published site).
- Click Submit to save.
Each snippet appears as a separate item in the list, so you can manage scripts individually.
Editing or deleting a code snippet
- Click an existing snippet to open the Edit code snippet dialog.
- Update the name, code or rendering option.
- To remove it, click Delete code snippet.
Rendering behaviour
If you choose Website and editor, the editor shows a confirmation that the custom code has been rendered, and the code runs even before you publish.
Adding custom code per page
Per-page custom code only applies to the selected page.
- In the top bar, click Pages to open the Page Manager.
- Select the page and click its Settings icon.
- Open the Custom code tab.
- Add, edit or manage snippets using the same steps as above.
If the snippet is set to Website only, click Publish for it to run on the published page. If it’s set to Website and editor, it also renders inside the editor.
Note: to add custom-code content at a specific spot on a page, use an HTML embed block or an HTML widget in a Custom block.