Advanced: code, tracking and CSS
Most sites never need this page. When you do, Settings has one place for code that applies to every page: site-wide CSS, tracking and verification tags, and the header and footer HTML.
Open Advanced
- Open your site, choose Settings in the sidebar, then Advanced (described as Shared HTML, custom CSS & deletion).
- The page opens with These changes affect every page. Use the AI editor for individual page content.
- Edit a box, then press Save changes in the bar at the bottom. The bar shows how many changes are unsaved, and Discard throws them away.
Everything saved here applies to your published pages right away. Each part keeps its own history, so you can go back (see History and undo).
Add your own CSS
The Site CSS card is for styling you want on every page, such as a button or card look. It is added to every page after the theme, so it can refine the theme's colors and fonts. For the theme itself, use Design and theme instead.
- In Site CSS, type plain CSS in the CSS box, for example
.btn { border-radius: 4px; }. - Press Save changes. Your published pages are updated; the bar says how many pages are being refreshed.
CSS is plain CSS onlyIt cannot contain </style, and it is limited to 128 KB.
On Rosa's Bakery, add site CSS so every link in the footer is underlined on hover. Show me the CSS you plan to add before you save it.Uses get_shared_part, replace_shared_part. Connect an assistant
Add tracking and verification code
The Tracking and verification code card is for analytics, chat widgets and search verification tags. It has two boxes: In the page head for tags such as <meta name="google-site-verification" content="...">, and At the end of the page for scripts. Scripts run on the published site only, never in the editor.
- Paste the snippet your tool gave you into the box it names: In the page head or At the end of the page.
- Press Save changes.
- Open a published page of your site and check that the tool sees it.
The code goes on every published page. For a site that stays hosted elsewhere, Lentil uses its own tracking snippet instead; see Already have a website.
Only paste code you trustA script on your site can read everything on a page, including what visitors type into forms. Use snippets from the tool's own instructions, and nothing from a stranger.
Header and footer HTML
The Header and footer HTML card shows the code behind the shared header and footer, in a Header box and a Footer box. It is easier to change them in the page editor; use these boxes when you need to paste markup. See The page editor. Each box is limited to 256 KB.
History and undo
The header, footer, site CSS and tracking code each have a History button on their card. Press it to see earlier versions and restore one. Restoring keeps the history, so you can change your mind again.
Who can use it
- Owners, admins, members and clients can change Advanced settings, including site CSS, tracking code, and the header and footer HTML. See Team and roles.
- Available on Free and Pro.
Limits and edge cases
- Site code (both tracking boxes together) is limited to 512 KB. Over the limit, the larger box shows Site code is larger than 512 KB in total. Shorten this field.
- Site CSS is limited to 128 KB, and the header and footer HTML to 256 KB each.
- Tracking boxes cannot contain
<template>tags. The box tells you to remove them. - If someone else changed the same part since you opened it, the save is refused so nothing is overwritten. Reload and try again.
From an AI assistant
An assistant connected to Lentil works with your role. See AI assistants.
get_shared_partwithpartset toheader,footer,code(the site code) orcss: read it with itscurrentVersionId.replace_shared_part: replace a whole part (header and footer up to 256 KB, site code 512 KB, CSS 128 KB), passing thebaseVersionIdit read.edit_shared_partedits single header or footer elements.update_theme: change theme colors and fonts, or the site CSS (designLanguageCSS).list_shared_part_versions,get_shared_part_version,restore_shared_part_version: history and undo.
Safety rules: changes to shared parts, the theme and site CSS go live on published pages immediately, so an assistant should confirm with you first.
Updated 9 November 2026
