Home / Guides

Webflow analytics: add cookie-free stats with custom code

Updated: October 14, 2026

Webflow sites are fast and clean — a heavy analytics tag works against that. LightMetrica adds about 2 KB, sets no cookies and shows the everyday numbers on one screen.

Before you start

<script defer src="https://lightmetrica.com/lm.js" data-site="YOUR_ID"></script>

Add the code

  1. Open your project and go to Site settings.
  2. Open the Custom code tab.
  3. Paste the LightMetrica code into Head code.
  4. Click Save.
  5. Publish the site — custom code only appears on the published site.

If you use both the webflow.io staging address and your own domain, add your own domain in LightMetrica: visits from other domains are ignored, which keeps test visits out of your stats.

Check that it works

Open the published site on your phone and check the Real-time report in LightMetrica. To exclude your own visits, open the site once with ?lightmetric=ignore.

What you'll see

FAQ

Can I add the code to one page only? Yes — page settings have their own custom code fields. Site-wide code is usually what you want, though.

Does LightMetrica work with Webflow CMS pages? Yes. Every published page, including CMS collection pages, is tracked.

Do I need to republish after changing the code? Yes. Custom code changes appear only after you publish the site.

Try LightMetrica — free

Lightweight, independent, cookie-free analytics: the counter installs in a minute — on its own or next to your current tools. Every week — an AI-powered Smart Report: what changed and what to do next.