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
Related terms
- Collection pageA collection page is one page design that shows every item of a CMS collection, each at its own address, such as /blog/my-first-post for each post in a blog.
- Structured dataStructured data is machine-readable information about a page, usually JSON-LD in the schema.org vocabulary, that tells search engines and AI tools what the page is about.
- Canonical URLA canonical URL is the one address a page declares as its main version, with a link rel="canonical" tag, so search engines combine duplicates under it.