Code Injection
The Code Injection tab lets you add custom code that runs across your entire site. Use it for anything that isn’t a standard marketing pixel — those belong in Pixels & Tracking.
The two fields
Section titled “The two fields”| Field | Where it loads | Common uses |
|---|---|---|
Custom <head> code | In the document <head> | Verification tags, web fonts, analytics loaders |
Custom <body> code | At the start of the <body> | Chat widgets, third-party embeds |
Each field accepts up to 20,000 characters and runs your code exactly as you paste it.
When to load
Section titled “When to load”If your site asks visitors for cookie consent, When to load this code decides what your snippets wait for:
- Always — code that neither tracks nor remembers visitors: site verification, fonts.
- After Functional consent — chat widgets, embedded players, maps. Adds a Functional switch to your cookie banner.
- After Analytics consent — Hotjar, Microsoft Clarity, other analytics or heatmaps.
- After Marketing consent — ad pixels and retargeting tags not set up in Pixels & Tracking.
With Cookie consent off, the code loads for everyone whatever you pick here.
Saving
Section titled “Saving”Click Save custom code to apply. The status line shows All changes saved, Unsaved changes, or an error. The button is disabled when nothing has changed.
Changes appear in your live preview right away and on your published site after you publish.
Where each kind of code belongs
Section titled “Where each kind of code belongs”- This tab — site-wide custom
<head>/<body>code. - Pixels & Tracking — GTM, Meta Pixel, GA4, TikTok, LinkedIn by ID.
- Page settings → Scripts — code you want on a single page only.