Analytics settings
Overview
Section titled “Overview”Analytics settings is where you create and configure the websites you track and everything attached to them: snippets and secrets, API keys, goal alerts, share links, integrations, the prediction model, tracking domains and ad accounts.
Where to find it:
- Toolbar Settings on any analytics page (it opens the settings of the site you are looking at)
- URL:
/t/<workspace>/analytics/settings?tab=<tab>, withtabone ofsites,tracking,keys,alerts,sharing,integrations,prediction,domains,ads
The header has nine tabs: Sites, Tracking, Keys, Alerts, Sharing, Integrations, Prediction, Domains, Ad accounts. The toolbar has a Dashboard link back to the analytics dashboard and, on every tab except Sites, a Site menu: these tabs always act on the selected site. If the workspace has no site yet, every tab shows the Sites tab.
Everyone with analytics access can open the settings. Without the configuration permission a notice says “You can view these settings; changing them needs the analytics configuration permission.” and the buttons that change something are hidden.
How it works
Section titled “How it works”A site is one website (or a group of domains measured together). Each site has:
- its own data, stored separately from every other site, in your Cloudflare account;
- a public site key (
st_…) used by the snippet; - a site secret (
amb_sk_…) for server-side events, of which only a hash is stored; - its settings: hostnames, time zone, currency, retention, cookieless mode, localhost, default attribution model.
Settings changes reach the tracking worker within about a minute.
Data retention
Section titled “Data retention”Every day each site runs a cleanup: raw page views, goals, payments, exit links and sessions older than the site’s Retention (days) are archived as NDJSON files in the installation’s file storage (under analytics-archive/<site id>/) and then deleted from the live database. Hourly and daily totals, visitor records and bot counters are kept, so long-range charts without filters still work after the raw rows are gone. Breakdowns, filters, funnels, insights and visitor timelines need raw rows, so they only cover the retention window. 0 keeps raw data forever.
Time zone and currency
Section titled “Time zone and currency”The Time zone decides what “today” and every day of a range mean, the chart buckets, the daily totals and the purchase heatmap. The Currency decides which payments count as revenue: payments in any other currency are stored but excluded from revenue. See Money and time zones.
Step by step
Section titled “Step by step”Add a site
Section titled “Add a site”-
Open the Sites tab and click New site (or Add a site on the empty analytics page).
-
Fill the Add a site dialog (“Events are accepted only from these hostnames (and their subdomains).”):
- Name, for example Acme;
- Hostnames: type each one and press Enter (or a comma), for example
example.com. You can paste a full URL: only the hostname is kept. Backspace in an empty field removes the last one; - Time zone (default: your browser’s), Currency (default
EUR), Retention (days) (default395), Attribution (default Last non-direct); - Cookieless and Allow localhost switches.
-
Click Create site.
-
The dialog {name} is ready shows the site secret once (“Copy it now: it will not be shown again.”) and the recommended snippet (“Save the site secret for server-side events, then add the snippet to every page.”). Copy both.
-
Install the snippet: see Install the tracker.
Edit a site
Section titled “Edit a site”-
On the Sites tab, click the pencil (Edit) of the site.
-
Change the fields in Edit site and click Save. The toast Site saved confirms.
Change Time zone and Currency only when needed: they decide how every report cuts days and which payments count as revenue.
Roll the site secret
Section titled “Roll the site secret”-
Click Roll secret on the site row.
-
Confirm Roll the secret of “{name}”? (“The current secret stops working immediately: update your server integrations with the new one.”).
-
If asked, confirm your identity (Confirm it is you, “This action needs your second factor again.”).
-
Copy the new secret from New secret for {name} (“Use it as Bearer token for server-side events.”). It is shown once.
A site without a secret shows a No secret pill: roll one to send server-side events.
Delete a site
Section titled “Delete a site”-
Click the trash icon (Delete) on the site row.
-
Confirm Delete the site “{name}”? (“Its analytics data, funnels, alerts and share links are deleted. This cannot be undone.”).
Events sent to a deleted site are rejected (unknown_site).
Create a site API key
Section titled “Create a site API key”-
Open the Keys tab and click New key.
-
In Create an API key (“Give it a name you will recognise and only the scopes it needs.”), enter a Name (up to 100 characters) and tick the Scopes: Read (Query reports of this site.) and/or Write (Send goals, payments and identify calls.). Read is ticked by default; at least one is required.
-
Click Create key and confirm your identity if asked.
-
Copy the key from API key created (“Store it in your secret manager.”). It is shown once. Click Done.
Revoke a site API key
Section titled “Revoke a site API key”Click the trash icon (Revoke key) and confirm Revoke the key “{name}”? (“Requests using it start failing immediately.”). The key stays in the list with a Revoked pill.
Connect an integration
Section titled “Connect an integration”-
Open the Integrations tab.
-
On the card of the integration, click Connect and authorise the account. When you come back, the toast Integration connected confirms.
-
Use Sync now to import data immediately, or Disconnect to stop (“Imported data is removed and syncing stops.”).
See Integrations tab for availability.
Reference
Section titled “Reference”Sites tab
Section titled “Sites tab”The list shows, for each site: name, pills (Cookieless, localhost, No secret), the hostnames, and the line {timezone} · {currency} · retention {retention} · {model} · created {created} (retention is forever or {count} days). Buttons: Roll secret, Edit, Delete (configuration permission only).
| Field | Type | Required | Default | Limits and rules |
|---|---|---|---|---|
| Name | Text | Yes | — | 1–100 characters |
| Hostnames | List | Yes | — | 1–20 valid hostnames, lower case, duplicates removed. Each also covers its subdomains: example.com accepts www.example.com and shop.example.com. |
| Time zone | IANA zone | Yes | Your browser’s zone (UTC through the API) |
Any IANA time zone, for example Europe/Rome |
| Currency | ISO 4217 | Yes | EUR |
Three letters; suggestions: EUR, USD, GBP, CHF, JPY, CAD, AUD, SEK, NOK, DKK, PLN, CZK, BRL, MXN, INR |
| Retention (days) | Number | Yes | 395 |
0 (forever) or 30–3650. “0 keeps raw data forever, otherwise 30–3650.” |
| Attribution | Menu | Yes | Last non-direct | Default model of the dashboard: First touch, Last touch, Last non-direct, Linear, Position based (40/20/40) |
| Cookieless | Switch | — | Off | “No identifier is stored in the browser; visitors are counted with a daily rotating hash.” Applies to snippets already installed too: the standard and hash-routing scripts check the mode at every page load, stop writing cookies and expire the old ones within a few minutes of the change. See Cookies and cookieless mode. |
| Allow localhost | Switch | — | Off | “Accept events from localhost while you develop.” The script tag also needs data-allow-localhost. |
Tracking tab
Section titled “Tracking tab”| Card | Content |
|---|---|
| Installation | Receiving events or Waiting for the first event, Last event, Last URL, Events (24 h), Hostnames, and Check again. |
| Tracking snippet | Tabs Recommended, Script only, Cookieless, Hash routing, each with its hint, the code block with Copy, the Server endpoint with a copy button and the hint “Send goals, payments and identify calls from your backend with the site secret as Bearer token.” |
| AI crawler tracking (server side) | Tabs Worker, Node, PHP with ready-to-paste code that reports crawler visits. |
Everything on this tab is explained step by step in Install the tracker.
Keys tab
Section titled “Keys tab”Site API keys (“Keys let other systems read this site’s reports or send events through the public API.”). Each key works for this site only.
| Item | Content |
|---|---|
| Name | The key name. |
| Prefix | The first characters of the key followed by …, to recognise it. |
| Scope pills | Read, Write (amber). |
| Revoked pill | The key was revoked. |
| Meta line | created {created} · last used {used} (never if unused). |
| Revoke key | Trash icon (configuration permission only). |
Keys have the form amb_ak_<site key>.<secret> and are sent as Authorization: Bearer amb_ak_… to the site API under /api/v2/analytics/ on your app’s address:
| Scope | Endpoints |
|---|---|
| Read | GET overview, timeseries, breakdown/<dimension>, goals, realtime, insights, purchases, visitors, visitors/<id>, funnels, funnels/<id> |
| Write | POST goals, identify, payments |
Query parameters, filters and payloads are described in REST API. For access to every site of the workspace, use a workspace API key with analytics:read instead (see API keys).
Empty state: No API keys yet.
Alerts tab
Section titled “Alerts tab”Goal alerts: an email or a signed webhook when a goal is completed (“at most one delivery per minute per alert”). Fields, list, payload and signature are documented in Alerts.
Sharing tab
Section titled “Sharing tab”The panel Share {site} with the share-link manager: name field, Create link, and the list with Copy link, Open link and Revoke. It is the same manager as the toolbar Share button. See Share links.
Integrations tab
Section titled “Integrations tab”Two integration cards, each with its status pill (Connected, Not connected, Error, or Not configured), the Account and Last sync once connected, and the last error if any:
| Integration | What it imports |
|---|---|
| Meta Ads | “Imports campaign spend, clicks and impressions to compute ROAS per campaign (matched on utm_campaign).” When connected, an Ads performance panel shows totals (Spend, Revenue, ROAS, Clicks, Impressions) and a table per campaign (Campaign, Spend, Clicks, Visitors, Customers, Revenue, ROAS, CPA). |
| Google Search Console | “Imports search queries and landing pages with clicks, impressions, CTR and position.” When connected, a Search performance panel shows totals and the top 50 Queries or Pages with Clicks, Impressions, CTR and Avg. position. |
On this tab the toolbar also shows the Range controls, used by the two panels.
Prediction tab
Section titled “Prediction tab”The Conversion prediction model card: Trained, Samples, Base conversion rate, Accuracy, Average order value, Strongest signals and the Train now button. See Prediction.
Domains tab
Section titled “Domains tab”Tracking domains (“Serve tracking links and the tracker from your own hostname (e.g. track.example.com): first-party cookies, links that match your brand.”). The tab lists the site’s domains with their status (Waiting for DNS, Issuing certificate, Active, Error), the DNS records to create and Check now; Add domain adds one. Setup, the two domain kinds and every error are documented in Tracking domains.
Ad accounts tab
Section titled “Ad accounts tab”Ad accounts (“Connect ad accounts to import spend and send conversions back server-side.”): connect Meta, Google Ads and TikTok accounts, see their status, re-import spend with Backfill, disconnect them, and follow the Conversions sent log with Resend. Everything is documented in Ad accounts.
Limits and permissions
Section titled “Limits and permissions”| Action | Permission | Default roles |
|---|---|---|
| Open every tab, copy snippets, see keys, alerts, shares, integrations, prediction, domains | analytics:read |
Owner, Admin, Marketer, Analyst, Viewer |
| Create, edit and delete sites; roll secrets; create and revoke keys; manage alerts and share links; connect integrations; Train now; manage domains and ad accounts | analytics:configure |
Owner, Admin, Marketer |
| Roll a site secret, create a site key | analytics:configure plus identity confirmation |
Owner, Admin, Marketer |
Limits: 20 hostnames per site, retention 0 or 30–3650 days, names up to 100 characters. Creating sites, rolling secrets, creating keys, alerts and share links are recorded in the workspace audit log.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
| Create site stays disabled | No name, no valid hostname, invalid currency or retention out of range | A hostname is added only when valid: press Enter after typing it. Retention must be 0 or 30–3650. |
| A hostname is not added | It is invalid (spaces, protocol only, underscores) or already in the list, or the site has 20 | Type a plain hostname such as shop.example.com. |
| “Some values are not valid.” | The server rejected a field | Check the time zone, currency and retention. |
| Events still rejected after adding a hostname | Settings reach the tracking worker within about a minute | Wait a minute and reload your page. |
| Server events fail after Roll secret | The old secret no longer works | Update your servers with the new secret. |
| Roll secret asks for a second factor | Sensitive action | Enter your second factor. |
| The settings buttons are missing | Read-only role | Ask an Owner or Admin for the analytics configuration permission. |
| Integrations show Not available on this installation. | Not available yet | Use Ad accounts. |

