Install and set up
Setup takes about 15 minutes: install the plugin, choose a tracking domain, give it a Cloudflare token, and it builds your platform for you. After that you add websites (see Websites & tracking).
1. Install and activate the plugin#
- In WordPress, go to Plugins › Add New › Upload Plugin, choose
nahnu-analytics-<version>.zipand click Install Now. - Click Activate. A Nahnu Analytics menu appears in wp-admin.
- Go to Platform › License, paste the license key from your purchase email and click Activate. Updates now come through Dashboard › Updates like any other plugin.

To use the license on another WordPress later, click Deactivate first. That frees the activation.
2. Choose your tracking domain#
The tracking domain is where your clients’ websites load the tracking script from and send their visits to. Use a subdomain on a domain you own, for example go.youragency.com or cdn.youragency.net.
- Go to Settings › Tracking.
- Under Tracking domain, type the domain without
https://and without a path. - Click Save.
The plugin also makes script names: a random file name for the script and a random path for visits, such as /k/x7b2m9.js. They contain no word an ad blocker looks for. If a name you type contains such a word (like analytics or track), the screen gives you a heads-up.

Pick a domain name without the words analytics, stats, metrics or track if you can. The big ad-block lists allow them on your own domain, but some smaller blockers do not.
3. Create a Cloudflare API token#
The plugin builds everything in your Cloudflare account with an API token you create.
- Go to Platform › Cloudflare. The page shows the steps and a button to Cloudflare.
- In Cloudflare, open My Profile › API Tokens, choose Create Token, then Create Custom Token.
- Add these permissions:
| Scope | Permission | Needed for |
|---|---|---|
| Account | Workers Scripts: Edit | Required |
| Account | Workers KV Storage: Edit | Required |
| Account | D1: Edit | Required |
| Account | Account Analytics: Read | Required |
| Account | Workers R2 Storage: Edit | Optional: long-term history and backups |
| Zone | Zone: Read | Required |
| Zone | DNS: Edit | Required |
| Zone | Workers Routes: Edit | Required |
| Zone | Transform Rules: Edit | Required |
- Under Account Resources, choose your account. Under Zone Resources, choose the zone of your tracking domain.
- Create the token and copy it.
- Back in WordPress, paste it under Paste it here and click Check token.
The plugin checks each permission and shows a green dot for each one it has. A missing permission is named, so you can edit the token in Cloudflare and check again.

The token is encrypted and stays on your server. You can have it forgotten once setup finishes, or keep it in wp-config.php instead of the database:
define( 'NAHNU_ANALYTICS_CF_TOKEN', 'your-cloudflare-token' ); A saved token lets the platform update by itself and makes domain changes one click. Without one, you are asked for a token each time.
4. Choose where to keep the data#
Before building, choose Where to keep the data:
- Nearest to visitors. Cloudflare chooses, usually where most visits come from.
- European Union only. For GDPR: the database, each website’s stats and the backups are stored only in Cloudflare’s EU data centers.
This cannot be changed later for data already stored. To change it afterwards, use Move the platform (Maintenance & help).
5. Build the platform#
Click Build platform. The page shows each step as it runs:
- Token verified
- KV namespace created
- D1 database created
- Database tables ready
- R2 bucket for history (skipped if the token has no R2 permission)
- Private connection key created
- Edge Worker deployed
- Domain on your Worker
- Health check
- Connector secrets kept per website
- Regions and cities for client sites
- Website script settings published
It takes one to three minutes. You can leave the page: setup keeps going in the background. A step that fails says why and offers Try again.

If the Cloudflare account already has a Nahnu Analytics platform (from a WordPress you used before), setup says This account already has a platform and offers Link to this platform instead of building a new one. Linking keeps every website counting. See Moving to a new WordPress in Maintenance & help.
6. Check that it works#
When setup finishes, Platform › Cloudflare shows your tracking domain, the resources it made and Live on Cloudflare with the platform’s version. Go to All sites and add your first website (Websites & tracking).

Was this helpful?
Thanks for your feedback!
✓ Feedback received. Thank you!



