Skip to content

Custom code

Custom code is HTML, usually a script or meta tag, added to every page of a site (or one page) for things like analytics, chat widgets, fonts or site verification.

Updated

On this page

What it is

Many services ask you to paste a snippet into your site's head or just before the closing body tag. On a hand-written site that means editing a layout file; on a hosted builder it means a settings field.

Because these snippets run on every page, they affect speed and privacy, and some need visitor consent before they load.

In Xodia

Project settings has a Custom code section with Head code and Before the closing body tag. On the React template, Vite and HTML sites Xodia writes it into index.html, for every page. For one page, your AI adds it in that page's file.

A CMS collection's page has its own custom code, inside the head and before the closing body tag, with field tokens filled in per item. Values are escaped so they show as text, unless a field is marked safe to use as HTML.

Xodia's analytics and scripts skill tells your AI to add each script once, site-wide, with consent where the law asks for it.

Read more

See every term in the glossary