Webflow analytics: add cookie-free stats with custom code
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
- Custom code in Webflow requires a paid site plan.
- Create a free LightMetrica account — sign up and add your site's domain.
- Copy the tracking code from the counter settings:
<script defer src="https://lightmetrica.com/lm.js" data-site="YOUR_ID"></script>
Add the code
- Open your project and go to Site settings.
- Open the Custom code tab.
- Paste the LightMetrica code into Head code.
- Click Save.
- 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
- Visits, visitors, page views, bounce rate and time on site.
- Top pages and how far people scroll.
- Sources, including AI assistants like ChatGPT and Perplexity.
- Automatic goals: phone, email and messenger clicks, downloads and outbound links. For a form or a button, add
the custom attribute
data-lm-goalwith a goal name in the element settings. - A weekly AI Smart Report with one to three recommendations.
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.