Choose how visits reach you
Each website has an Installation section (Site settings › Installation) with the ways to install side by side. They differ in what the website owner does, how exact the visitor’s location is, and how often ad blockers get in the way.
| Way | What the website owner does | Visitor location | Ad blockers | Best for |
|---|---|---|---|---|
| Standard snippet | Paste one line into the site’s <head>, or install the WordPress connector plugin | Cloudflare’s own: the most accurate | Some ad blockers block the tracking domain once their lists pick it up | Getting started, or sites where a few missed visits do not matter |
| WordPress connector plugin | Install the plugin, paste the code, turn on Serve from this site. No DNS changes | From the visitor address the site forwards: a little less exact than Cloudflare’s | Hardly ever blocked: the script and visits use a random path on the site itself | WordPress sites |
| Domain in the agency’s Cloudflare | Nothing, if their domain is in your Cloudflare account with proxied (orange-cloud) records | Cloudflare’s own | Hardly ever blocked | Domains whose DNS you manage, on any platform |
| Own subdomain | Add one CNAME record, such as go.theirsite.com. Cloudflare issues the certificate | Cloudflare’s own | Hardly ever blocked, if the name is neutral (not stats or analytics) | Any website whose DNS is elsewhere |
Own subdomain uses Cloudflare for SaaS, a paid Cloudflare add-on that needs a payment method on your Cloudflare account. The screen links to Cloudflare’s pricing.

Settings › Ways to install (administrators only) decides which ways are offered, and which ones clients may set up themselves in the portal.

The standard snippet#
Under Any other website: add the snippet, click Copy snippet and paste it into the <head> of every page. Open the website in a browser: the visit shows on the dashboard within seconds.
The snippet counts by itself: page views, sources and campaigns (utm_ tags), outbound links, file downloads, form sends, scroll depth and time on page.
Tick Also count visits on localhost to test on your own computer.
More options for the snippet (attributes on the <script> tag):
| Attribute | What it does |
|---|---|
data-h="1" | Counts #/hash routes as separate pages, for apps that route with #/… |
data-x="/admin*,/preview/*" | Never counts these pages (* is a wildcard) |
data-p-author="Ann" | Adds a property to every page view. It shows under Goals & events › Properties |
data-m="1" | Turns off automatic page views, so you send them yourself (Developers) |
To count a button click as an event without code, add data-k-event="Signup" to the element (and data-k-p-plan="pro" for a property). Where only classes can be set, use the classes k-event-name=Signup k-event-plan=pro.
The WordPress connector plugin#
For WordPress websites, use the free WordPress connector plugin. It adds the snippet for you and records much more than the snippet alone.
- In Site settings › Installation, under WordPress site: use the connector plugin, click Download the connector plugin.
- On the client’s WordPress, go to Plugins › Add New › Upload Plugin, upload the zip and activate it.
- On that website, open Settings › Site stats.
- Back in your site settings, click Copy code, paste the connection code there and press Connect.
- Turn on Serve from this site so the script and visits use a random path on the website itself. The connector checks the route and shows where visits come from.

Keep the connection code private: it belongs to that one website and carries its secret.
What the connector adds on top of the snippet:
- Shop sales with revenue from WooCommerce, SureCart, FluentCart and Easy Digital Downloads: added to cart, checkout started and purchase. Sales are recorded from the server when the order is paid, so ad blockers cannot lose them.
- Form sends from Contact Form 7, WPForms, Gravity Forms, SureForms, Elementor, Fluent Forms, Formidable, Ninja Forms, Forminator and MetForm, each named after its form.
- Video and audio plays in common players.
- 404 pages, with the page that linked to them.
- Which signed-in roles are counted, chosen by the website’s owner.
- Consent tools: it marks the stats as necessary in Must-Have Cookie, Cookiebot, CookieYes, iubenda and Termly, since they set no cookies.
- SEO and AI extras: llms.txt, the site audit, crawler checks and IndexNow (SEO & AI).
- Stats inside the client’s WordPress (Clients & portal).
In the connector’s What to count, the website owner picks what is recorded. Shop switches show only for shop plugins active on that site. Each plugin it works with is explained in the Nahnu Analytics Connector for WordPress › WordPress integrations docs.
Serving from the website’s own domain without WordPress#
In Installation, Other ways to serve from the website’s own domain gives a ready configuration for the client’s own Cloudflare account (a route, or a Worker deployed for them), or for their server: Nginx, Apache, Caddy, Netlify, Vercel, Next.js or Express. Paste it, then click Check: it sends a test visit and tells you whether it arrived with the right key and secret.
No server or hosting control (Squarespace, Wix, Webflow, Shopify)? Keep the standard snippet, or move the domain’s DNS to Cloudflare and use a Cloudflare option.
Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!



