# 17-May-2026 — Create Cloudflare Web Analytics sites from inside NGX [ref #217](https://github.com/nbarrett/ngx-ramblers/issues/217)

## [build 647](https://github.com/nbarrett/ngx-ramblers/actions/runs/26005601269) — [commit 3f4cc96](https://github.com/nbarrett/ngx-ramblers/commit/3f4cc9605edf3e1f91ec80e3c066613629baf1a9)

_____

Switching on Cloudflare Web Analytics for a group used to mean a trip into the Cloudflare dashboard: someone had to create the analytics site by hand, copy two values out of it, and paste them back into NGX. NGX can now create that site for you, straight from the admin area.

## What this changes

A Cloudflare Web Analytics "site" is the thing that records visits to your website. Creating one used to need a Cloudflare login, which only the central NGX administrator holds.

NGX now has a **Create site** button that does the job for you. It contacts Cloudflare, creates the site, and reads back the two values your website needs - the Beacon Token and the Site Tag - filling them in automatically. There are two places to use it, depending on whether you are setting up a single group or several.

## Creating a site for your own group

This is the everyday case, and a group administrator can do it without any Cloudflare access.

In **System Settings**, open the **External Systems** tab and then the **Cloudflare** section. The **Cloudflare Web Analytics** panel now has a **Host** field and a **Create site** button:

1. Type your website address into **Host**, for example `winchester.org.uk`.
2. Click **Create site**. NGX creates the Cloudflare site and fills in the **Beacon Token** and **Site Tag** for you.
3. Turn **Enabled** on, then **Save**.

Two further buttons sit alongside. **Web Analytics Dashboard** opens Cloudflare's analytics view, and **Manage site** opens the Cloudflare page for this particular site. Once a site exists, **Create site** is switched off, since there is nothing left to create.

![](https://ngx-ramblers.org.uk/api/aws/s3/site-content/21c980a7-b055-4b3c-95d5-b88466303ff0.png)

## Creating sites for several groups

An NGX administrator looking after many groups does not have to open each group's settings one by one. The **Environment Management** area now carries a **Cloudflare Web Analytics Sites** panel on its **Settings** tab.

Choose an environment and click **Create site**. NGX works out that group's website address on its own and creates the site, then shows you the new Site Tag and Beacon Token to paste into that group's System Settings. As with the per-group panel, **Create site** is switched off for any environment that already has a site, and a **Manage site** button is offered instead.

![](https://ngx-ramblers.org.uk/api/aws/s3/site-content/b8b19c67-9d5a-40fa-a184-0a12d941cf4e.png)

## Why NGX can create a site but not list existing ones

Cloudflare allows NGX to create a Web Analytics site using the limited, secure key it already holds. It does not allow NGX to read the list of existing sites with that same key - that would need a far more powerful account-wide password, which is not worth storing.

So NGX never shows a list of sites. It offers **Create site** when there is no site yet, and once one exists it switches that button off and points you to Cloudflare with **Manage site** instead. For an environment to be recognised as already having a site, it needs to have been redeployed since the site was created.

## One Cloudflare token for everything

DNS, committee email routing and Web Analytics all now authenticate with the same single Cloudflare API token, set in the global Cloudflare settings. An earlier version briefly had a separate token field just for Web Analytics; that has been removed. There is only ever one Cloudflare token, and a second field only invited pasting it into the wrong box.