Docs
← Back to site

Choose how visits reach you

4 min readUpdated November 22, 2026

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.

WayWhat the website owner doesVisitor locationAd blockersBest for
Standard snippetPaste one line into the site’s <head>, or install the WordPress connector pluginCloudflare’s own: the most accurateSome ad blockers block the tracking domain once their lists pick it upGetting started, or sites where a few missed visits do not matter
WordPress connector pluginInstall the plugin, paste the code, turn on Serve from this site. No DNS changesFrom the visitor address the site forwards: a little less exact than Cloudflare’sHardly ever blocked: the script and visits use a random path on the site itselfWordPress sites
Domain in the agency’s CloudflareNothing, if their domain is in your Cloudflare account with proxied (orange-cloud) recordsCloudflare’s ownHardly ever blockedDomains whose DNS you manage, on any platform
Own subdomainAdd one CNAME record, such as go.theirsite.com. Cloudflare issues the certificateCloudflare’s ownHardly 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.

Site settings › Installation with the ways as cards, the chosen way's set-up and Regions and cities

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

Settings › Ways to install: which ways are offered for your own websites and for client websites, and whether clients can set up their own

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):

AttributeWhat 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.

  1. In Site settings › Installation, under WordPress site: use the connector plugin, click Download the connector plugin.
  2. On the client’s WordPress, go to Plugins › Add New › Upload Plugin, upload the zip and activate it.
  3. On that website, open Settings › Site stats.
  4. Back in your site settings, click Copy code, paste the connection code there and press Connect.
  5. 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.
The connector's settings page on a client's WordPress, connected and counting (shown here with a white-label name)

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?