Add your own code and ask visitors for consent
Add HTML to the head or body of your published site, and choose what waits for the visitor's consent first.
On this page 3 sections
Custom code
Choose Custom code… in the site menu. It is for HTML that you add to the published site: a tracking snippet, a chat widget or a verification tag. It needs a plan with custom code and the right to write code.
- Select Add snippet and give it a Name.
- Paste its Code.
- Choose Where it goes: In the head, At the start of the body or At the end of the body.
- Choose Runs on: Every page, or one page.
- Select Save.
A snippet can be switched off (Turned on) without removing it. The code is never run in the editor, the canvas or the preview, only on the published site. A new snippet counts as Marketing for cookies until you change it.
Plans and downgrades
Starter, Pro and Business include custom code. The free plan doesn't.
When a site moves to a plan without custom code, its snippets stay in the site but stop being published from the next publish. When you move it to a plan with custom code and publish again, they are published again. The review before the change lists them.
Code components and code overrides stop being published the same way, and the review lists them too.
HTML embeds' markup and custom CSS stop being published the same way, and the review lists them too.
Cookies and consent
Choose Cookies and consent… in the site menu.
- Ask visitors for consent turns on a banner on a visitor's first visit. Without it, nothing waits.
- Categories the banner offers: Necessary is always on. The others are Preferences, Analytics and Marketing.
- Cookie policy page: the page the banner links to.
- Google Consent Mode tells Google tags what the visitor accepted, and denies everything until then.
- Under Custom code, Embeds and Code components, choose the category of each snippet, embed and component. It runs only once the visitor accepts its category. One with no category runs as Marketing.
Save writes everything in one change, so undo takes it back. Add the banner to a page with the Cookie banner block (see "Insert blocks: navbar, accordion, tabs and more"). For code components see "Make code components wait for cookie consent".