See who visits your website, without cookies
For a small site, the useful questions are simple: how many people came, which pages they read and what sent them. Cloudflare Web Analytics answers them for free, and it counts without cookies or anything else stored on the visitor’s device.
- Time
- 1 minute
- Cost
- Free
The steps below are for a site on Cloudflare Pages, such as one made with Promti, where turning it on is a switch in the project. If your site is hosted elsewhere, you can still use it: add the site under Web Analytics in Cloudflare and paste the snippet it gives you before the closing body tag.
It’s free and quick to switch on. It also has limits worth knowing before you trust the numbers, and it sits right in the middle of the cookie-banner question; both are covered below.
Before you start
- A Cloudflare account; the free one is enough.
- Your site on Cloudflare Pages, or access to its HTML if it’s hosted elsewhere.
- If your site sends a Content Security Policy, room in it for static.cloudflareinsights.com, where the script loads from.
- Your privacy page, to add a line on how you count visits.
Step by step: see who visits
- In Cloudflare: Workers & Pages → your project → Metrics → turn on Web Analytics.
- It starts counting from your next deployment: upload the site once more.
At the end: Visits, pages and where people come from, counted without cookies and without storing anything on the visitor’s device.
What it shows
Visits and page views, the pages people read, the sites that sent them, and their country, device type, browser and operating system. It also times how long your pages take to load and reports Google’s Core Web Vitals.
Cloudflare counts a visit when someone arrives from another site or straight from a typed address or bookmark; every page they read after that is a page view in the same visit. Its metrics include no count of unique visitors: with no cookie and no fingerprint, nothing tells one person from the next.
A filter leaves bots out, which brings the figures closer to real people.
What it misses
Ad blockers stop it. Cloudflare says its script is blocked by tools such as Adblock Plus, Brave and the DuckDuckGo extension, so some visitors never appear. Read the numbers as a trend, not a headcount.
It ignores campaign tags. Cloudflare doesn’t log query strings, to avoid collecting sensitive data, so UTM parameters don’t show up. There are no custom events either: it can’t count clicks on a button or forms sent.
History is short. You can look back six months, and after seven days Cloudflare keeps roughly a tenth of the raw data, so older figures are estimates.
Outside Cloudflare’s network, one account can track up to ten sites, a limit Cloudflare support can raise.
Does it need a cookie banner?
The rule behind cookie banners covers more than cookies. In EU law it’s article 5(3) of the ePrivacy Directive, and in Spain article 22.2 of the LSSI: storing information on a visitor’s device, or reading what’s already there, needs their consent, unless it’s strictly necessary to carry the communication or to provide a service they asked for.
Spain’s data protection authority, the AEPD, applies that rule in its cookie guide to cookies and similar technologies — it names web beacons and device fingerprinting — and says analytics cookies aren’t exempt. Google Analytics, for instance, sets a first-party cookie to tell users apart, so it needs that consent.
Cloudflare says its analytics stores nothing on the visitor’s device — no cookies, no localStorage — and fingerprints no one. The AEPD guide says nothing about cookieless tools like this one, either way. Explain in your privacy page how you count visits, and if you want a firm answer for your own site, ask a professional.
Putting the numbers to use
When you post somewhere — a newsletter, a directory, a social network — check the referrers a few days later: they show which one actually sent people.
A referrer tells you someone came from google.com, not what they searched for. Google’s Search Console shows the queries that bring people to your site, so the two work well side by side.
Questions
- Is Cloudflare Web Analytics really free?
- Yes. Cloudflare offers it at no cost, and your site doesn’t have to run through Cloudflare’s network to use it.
- Why are my numbers lower than in another tool?
- Ad blockers are one reason: they block Cloudflare’s script. Tools also count differently; Cloudflare starts a new visit whenever someone arrives from outside your site.
- Can it count clicks on my Book or Buy button?
- Not Web Analytics, which has no custom events. If the button is a Stripe payment link, Stripe shows how many times the link was opened and how many sales it made, with a delay of up to 18 hours, except on subscription links.
- Do I still need a privacy policy?
- Your site still needs its legal notice, and a privacy policy as soon as it collects personal data; one contact form is enough for that. Mention there how you count visits.
- How soon do the numbers appear?
- Once the snippet is on your pages, Cloudflare says data can take a few minutes to show up.