Generated with the help of an LLM.
Problem/Motivation
For a given path, Matomo's Transitions report shows where visits came from (previous page, search, campaign, referrer) and where they went (next page, exit, download, outlink). Visitors stores each event with visit_id, path, and created, and stores the visit referrer, but it never lines a page up with the previous and next event in the same visit.
The node tab (/node/{node}/visitors) is the right place for "this page". It is not a flow.
Steps to reproduce
Proposed resolution
A report for one path (and the same report for a route).
Incoming: previous path in the same visit, plus the visit referrer type when this path is the entry page. Group and count.
Outgoing: next path in the same visit, or exit when there is no next page view.
Downloads, outlinks, and on-site search appear as outgoing rows when those issues have a hit type to point at. Until then, the report is previous page, next page, entry referrer, and exit.
Implement it as a View with a relationship on visit_id ordered by created, or a small query service if Views cannot see "the next row". Prefer Views.
Link it from the path report. Do not inject an overlay into the public page. The node tab can embed the same display with the node's path as the argument.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork visitors-3640697
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments