Set Up NetWise Site Statistics¶
Use this procedure to connect NetWise Site Stats to a client's WordPress website.
The procedure differs slightly depending on whether the website uses V2 or V3.
V3 website: NetWise Site Stats should already be installed. Check that the plugin is present and active, then continue to Step 2.
V2 website: The plugin will not normally be installed. Complete Step 1 first.
1. V2 websites — install NetWise Site Stats¶
The plugin is maintained in the private NetWise GitHub repository:
NetWise-UK → nw-site-stats
Open the NetWise Site Stats repository
You must be logged into GitHub with an account that has access to the NetWise-UK organisation.
Open the repository, click Code, then Download ZIP.
Install the plugin¶
Log in to the client's WordPress admin.
Go to:
Plugins → Add New Plugin → Upload Plugin
Select the ZIP file you just downloaded and click Install Now.
When installation has finished, click Activate Plugin.
You should now see NetWise Site Stats on the Plugins page and Website Statistics in the WordPress admin menu.
If this is a V3 website¶
You shouldn't normally need to install the plugin.
Go to Plugins and confirm that NetWise Site Stats is installed and active.
If it's missing from a V3 website, investigate why rather than treating that as normal.
2. Open Cloudflare Web Analytics¶
Log in to Cloudflare and open Web Analytics.
Web Analytics is an account-level service, so don't look for it inside the individual website's Cloudflare zone.
From the Cloudflare dashboard go to:
Analytics & logs → Web Analytics
Open NetWise Cloudflare Web Analytics
3. Find the website¶
Find the client's domain in the Web Analytics list.
Click Manage site.
If the website isn't listed, click Add a site, enter the client's domain and add it first.
4. Enable Real User Measurements¶
Find Real User Measurements (RUM).
Select Enable and click Update.
Important
Do not select Enable, excluding visitor data in the EU.
Despite the wording, this also excludes UK visitors and will result in significantly incomplete statistics.
5. Copy the Site Tag¶
While you're on the website's Web Analytics management page, look at the address in your browser.
Towards the end of the address you'll see web-analytics/edit/.
Immediately after that is a 32-character code.
That code is the Site Tag.
Copy it.
Don't copy the wrong code
Cloudflare also displays a token inside its JavaScript tracking snippet.
Do not use that token.
NetWise Stats requires the Site Tag from the browser address.
6. Register the website with NetWise Stats¶
Open the NetWise Stats administration system:
Click Add a site.
Enter:
- Domain: the client's domain name.
- Site Tag: paste the 32-character Cloudflare Site Tag.
- Date: leave this set to today's date unless there's a specific reason to use another date.
Click Add and get key.
The system will generate a key.
Copy the generated key.
7. Connect WordPress¶
Return to the client's WordPress admin.
Open Website Statistics.
Paste the key generated by NetWise Stats.
Click Save & Verify.
The connection should verify successfully.
8. Allow the first statistics to arrive¶
Immediately after setup, Website Statistics may display No figures yet.
This is normal.
NetWise Stats updates its figures overnight, so a newly connected website won't necessarily show statistics immediately.
Check it again after the next overnight update.
If Cloudflare had previously been configured to exclude EU visitors, allow a couple of nights before deciding whether the figures look correct.
Historical statistics are limited by when Cloudflare began collecting Web Analytics data for the website.
Troubleshooting¶
"No Cloudflare zone found"¶
If NetWise Stats reports No Cloudflare zone found, don't repeatedly try to add the website.
Check that the domain exists within the NetWise Cloudflare account and that the Cloudflare API access used by NetWise Stats can see that zone.
Statistics look unusually low¶
Go to:
Cloudflare → Web Analytics → Manage site → Real User Measurements
Make sure it is set to Enable.
Make sure Enable, excluding visitor data in the EU has not been selected.
Website Statistics isn't available in WordPress¶
Go to Plugins.
On a V2 website, confirm that NetWise Site Stats has been installed and activated.
On V3, the plugin should normally already be installed and active.
Unexpected plugin error¶
Check the installed NetWise Site Stats version against the current production version.
When this procedure was originally documented, the expected version was 0.3.2.
This version number is only a historical reference. The current production version should always be treated as authoritative.
Final check¶
Before considering Site Statistics setup complete, confirm:
- NetWise Site Stats is installed and active.
- The domain exists in Cloudflare Web Analytics.
- Real User Measurements is enabled.
- Enable, excluding visitor data in the EU is not enabled.
- The correct 32-character Site Tag was copied.
- The website is registered with NetWise Stats.
- The generated key has been entered into WordPress.
- Save & Verify completes successfully.
- The plugin is the expected current production version.
Once these checks pass, NetWise Site Statistics is set up.
Statistics should begin appearing following the overnight update.