Skip to content

New icon in all reports: let me segment by visitors matching this row's criteria #4633

@mattab

Description

@mattab

The goal of this ticket is to create a mechanism to let user view the Visitor Log report filtered to only show visitors matching a given criteria that the Piwik user is interested in.

In particular, in each datatable report that supports it, eg. in the Browsers table, next to the labels eg. "Firefox 33" there is an icon. On click, it opens a popover that shows all visitors that match the segment 'visitor uses browser firefox 33'.

Another example: viewing the custom variables report you can directly see all users using this particular custom var. Will work the same for Screen resolutions, Keywords, campaigns or any other report.

Tasks
  • API: Update Metadata APIs to include the information whether a particular metadata report is linked to a segment. For example Referrers.getKeywords returns data from the segment keyword.
    • Proposed: Add a new "segment" entry in the metadata array
  • For each datatable row, if necessary, include the segment value that will match this row (in case it's not simply the label value eg. for browsers a code is used)
  • UX: Add new icon in all report tables. The icon is added for all reports where the metadata indicates the report has an equivalent "segment".
  • The icon has a tooltip such as "View all Visitors with this Keyword" or "View all visitors who visited this Page URL".
  • When clicked, the Visitor Log, segmented to show only those matching the clicked row label, are displayed in the popover.
    • The popover should have meaningful title,
    • maybe include the Segment Editor pre-set to this custom segment?,
    • display the current segment value eg. Browser is 'Firefox 33'
Implementation

The Visitor Log is filtered to show only visitors matching a given segmentation string: learn more about segmentation capability of Piwik. Our Metadata API also is full featured and in many ways useful.

For this issue we will

  • extend the metadata API to make it provide a new flag that says whether the report supports segmentation.
  • provide for each row, the segment value that will match this particular row / dimension.

Note: this was inspired from the plugin in #3861

Metadata

Metadata

Assignees

Labels

EnhancementFor new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.MajorIndicates the severity or impact or benefit of an issue is much higher than normal but not critical.c: UsabilityFor issues that let users achieve a defined goal more effectively or efficiently.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions