Analytics
The Analytics module: visitors, sources, pages, a click map and individual visits on the site itself, with no third-party counter.
The module counts visits on its own: where visitors came from, which pages they open, what they click and how each visit goes. The data stays in the site's database, so you don't need a third-party counter. Reports live in the admin under the "Visitor behaviour" row, and visit charts are added to the admin home and to "All analytics".

| Dependencies | Games | Permissions | Studio blocks | Bot commands | Cron tasks |
|---|---|---|---|---|---|
| Flute 2.0 | any | admin.analytics, admin.analytics.view, admin.analytics.visits.view | none, there is a visitors data source | none | three, below |
Install and first setup
Install the module from the marketplace. The counter starts right away: it goes on every page of the site except the admin panel. Staff are not counted by default, so your own visits stay out of the reports.
Check the cookie banner
If "Show cookie banner" is on, a visit is recorded only after the visitor allows analytics. Until then the reports are empty, and the table says "Visits appear once visitors allow analytics in the cookie banner; daily totals are recomputed every 10 minutes.". The banner is set up in Documents and cookies.
Start the queue worker
Visits are written through the queue. Without a running worker the scheduler takes 25 jobs a minute, and on a busy site clicks start to get lost. Until a worker runs, the admin home shows the "Start the queue worker" step. How to run php flute queue:work is covered in Scheduler.
Open the report
AdminVisitor behaviourPages. The first numbers show up within 10 minutes, which is how often the "Analytics: daily totals" task recomputes the summary.
What the reports show
Every tab has a "Period" picker: "Day", "7 days", "30 days" or "90 days". The summary on top compares it with the previous period of the same length: "Pageviews", "Visitors", "Average visit", "Bounce rate".
| Tab | What it holds |
|---|---|
| "Pages" | a table of pages: pageviews, visitors, average time, scroll depth, entries and exits. A page opens with "Where visitors come from" and "Where they go next" |
| "Clicks" | "What visitors click": "In vain", "Left for another site", "Forms sent", "Ordinary clicks", and for each page a "Click map" and "How far they read" |
| "Visits" | the list of visits: who, when, how many pages, device, source and "Risk". A visit opens with "Course of the visit" and "The account meanwhile" |

Only holders of admin.analytics.visits.view see the "Visits" tab. Visits of staff accounts are shown there to the owner only. Each visit has "Delete the visit", and the "Visits" tab of the player card has "Delete every visit of the account".

A click in vain is a click after which nothing happened on the page.
Suspicious visits
Every 10 minutes the "Analytics: suspicion of visits" task checks new visits and gives them a "Risk". The reasons are shown on the visit:
- "Clicks without a single mouse move or touch"
- "Clicks faster than a person clicks"
- "The browser is driven by a program"
- "Many visits from one address within an hour"
- "The address changed during the visit"
The "Suspicious only" filter on the "Visits" tab leaves just those. The module blocks nobody, it only marks visits.
Goals and funnel
A goal in "Goals" is an address (/shop: the visit opened that page or one under it) or the name of a marked element. A button or form with data-analytics-goal="buy" is the goal buy:
<button data-analytics-goal="buy">Buy</button>The "Funnel" is a list of steps in order, written like goals, for example /, /shop, buy. Each step counts the visits that reached it after the one before. The results are on the "Goals: visits that reached the address" and "Funnel: visits at each step" charts.
Where the module shows up
| Place | What is there |
|---|---|
| AdminVisitor behaviour | the "Pages", "Clicks", "Visits" and "Settings" tabs |
| Admin home | the "Visitors today" tile |
"All analytics" (/admin/analytics) | the "Visits" chart group: visitors, visits, sources, devices, countries, UTM campaigns and more, see Admin home |
| Player card in the admin | the "Visits" tab with the account's visits |
| Studio | the visitors data source for your own components: today, online, pageviews_today, week |
Settings
AdminVisitor behaviourSettings. The fields are grouped into "Collection", "Retention", "Limits" and "Suspicion". Changing them needs admin.analytics.

| Field | What it changes | Default |
|---|---|---|
| Count visits | off: the counter is not put on pages and whatever arrives is dropped | on |
| Count signed-in visitors | off: only guests are counted | on |
| Count the staff | accounts with access to the admin panel; the panel itself is never counted | off |
| Do not count bots | search crawlers, link previews and headless browsers, by User-Agent | on |
| Share of visits whose clicks are written, % | the rest count pages only, at 0 no clicks are written | 100 |
| Addresses not counted | the start of a path, such as /rules, up to 50 | empty |
| A visit ends after quiet of, min | the next page after such a pause starts a new visit, 5 to 720 | 30 |
| Header with the visitor's country | the header a CDN or proxy sets, such as CF-IPCountry on Cloudflare | empty, no country |
| Goals | up to 20 goals | empty |
| Funnel | up to 8 steps | empty |
| Keep clicks, days | clicks and other events of a visit | 30 |
| Keep visits, days | visits and their pages; daily totals stay | 90 |
| Keep daily totals, days | 0 keeps them for good | 0 |
| Field | Default |
|---|---|
| New visits from one address per hour | 60 |
| New visits of one account per day | 200 |
| Pages one visit records, at most | 100 |
| Events one visit records, at most | 500 |
| Queue length after which clicks are dropped | 5000 |
| Clicks per second that are "too fast" | 3 |
| Visits per address per hour that are "a burst" | 20 |
Visits, pages and events over the limits are not written. While more batches wait in the queue than "Queue length after which clicks are dropped" allows, the module writes pages only.
The IP address and the browser id are stored only as a hash keyed by the site; the address itself never reaches the database. A signed-in user's visit is tied to the account only if the user accepted the privacy policy. Visits are part of the user's personal data export, and when the account is erased they stay as guest visits without the address hash.
Permissions
| Permission | What it gives |
|---|---|
admin.analytics | "Analytics: delete visits and settings", includes the two below |
admin.analytics.view | "Analytics: summary, pages and clicks" |
admin.analytics.visits.view | "Analytics: visits of individual visitors" |
Background tasks
The tasks are listed in AdminScheduler.
| Task | How often |
|---|---|
| Analytics: daily totals | every 10 minutes |
| Analytics: suspicion of visits | every 10 minutes |
| Analytics: removal of old visits and events | daily at 04:00 |
For developers
With the analytics:read scope the API gives daily totals (GET /api/v1/analytics) and period summaries: GET /api/v1/analytics/report/overview, /report/pages, /report/sources. Individual visits are never given out through the API. Keys are issued in API access.
With Flute AI installed, the assistant answers questions about traffic: this week against the last, the page table, clicks in vain, the collection settings.
How the core side works: API keys and the REST API, Module REST API.
Troubleshooting
For any other message, use the error lookup.
Clicks are not being recorded
Data comes in faster than the site can save it, and the queue is full. Start php flute queue:work and check that the scheduler runs: the "Open the scheduler" button leads straight there.
Collection is turned off
"Count visits" is off in the settings. New visits are not recorded, the reports show older data only. Click "Turn on collection".
If the chosen period is empty but there was data before, the screen says "No visits in this period" with the date of the latest visit and a button to show a wider period. If it is always empty, check the cookie banner and "Addresses not counted".