New icon in all reports: let me segment by visitors matching this row's criteria · Issue #4633 · matomo-org/matomo · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
5 tasks done
mattab opened this issue Feb 6, 2014 · 14 comments
Closed
5 tasks done
Assignees
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Feb 6, 2014

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

@mattab mattab added this to the 2.x - The Great Piwik 2.x Backlog milestone Jul 8, 2014
@mattab mattab removed the Major label Aug 3, 2014
@mattab mattab changed the title Show new icon, in all Report tables, next to Row Evolution: "Display all Visitors with this $dimension" New icon in all reports: let me view all visitors matching this criteria Sep 5, 2014
@mattab mattab added the Major label Sep 5, 2014
@mattab mattab added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. and removed c: UI - UX (AngularJS twig less) labels Oct 12, 2014
@mattab mattab changed the title New icon in all reports: let me view all visitors matching this criteria New icon in all reports: let me segment by visitors matching this row's criteria Dec 1, 2014
@mattab mattab modified the milestones: Piwik 2.11.0, Short term Dec 1, 2014
@mattab
Copy link
Member Author

mattab commented Dec 1, 2014

This whole feature would ideally be added in a new plugin eg. SegmentOneClick

@tsteur tsteur assigned tsteur and unassigned tsteur Jan 23, 2015
tsteur added a commit that referenced this issue Jan 28, 2015
@tsteur
Copy link
Member

tsteur commented Jan 28, 2015

Be aware that some reports have multiple segments, eg UserCountry:

segments: ["countryCode","continentCode"],

In this case we will use the first one. It is not guaranteed that the correct one is always defined first but must do for now

tsteur added a commit that referenced this issue Jan 29, 2015
… are rather a hack right now as a proof of concept whether it works at all. Also I do not think it belongs in a separate plugin. Should be ok in Live plugin but leave it in extra plugin for now
@tsteur
Copy link
Member

tsteur commented Jan 29, 2015

I created an issue asking designers to create icons for it

tsteur added a commit that referenced this issue Jan 30, 2015
Trying to hack segment value into core (for each datatable row)
but this is basically impossible. We will most likely need a solution
for each report separately in case it is possible at all. Also a
few more features and bugfixes for the overlay and detection when
we can use oneClickSegment and when not
@tsteur
Copy link
Member

tsteur commented Feb 1, 2015

I will stop working on this issue and discuss further steps with @mattab as a generic solution seems to be not possible. Might work with some changes to Segmentation but then there would be still problems eg how to get the Segmentation display name when a subtable is requested (eg 'test' in '/foo/test' should display '/foo/test' in segmentation title and not only '/test' in case of a subtable). Also metadata in API response gets pretty big etc. Manually defining the segmentation value in row metadata with additional filters is quite hard as well.

@mattab
Copy link
Member Author

mattab commented Feb 9, 2015

It's very good we're making progress on this awesome feature. It will take more time to get it right but it's really worth the effort :-) When you have time maybe you can list the next actions and blockers and we will hopefully be able to solve in next few sprints. Exciting!

tsteur added a commit that referenced this issue Feb 11, 2015
@mattab
Copy link
Member Author

mattab commented Feb 13, 2015

Amazing feature!

Feedback (WIP):

  • I want to open the Visitor profile from the popover -> how could we make this work well?
  • I somehow want to create in one click, a segment like the one used in the popover, to learn more about this segment of visitors
  • maybe i want to click on the popover somewhere so it opens the visitor log in the main window rather than the popover
  • Rows with Unknown (eg. unknown cities, regions) don't have the icon

@mattab
Copy link
Member Author

mattab commented Feb 13, 2015

Got this error:

tsteur added a commit that referenced this issue Feb 13, 2015
tsteur added a commit that referenced this issue Feb 13, 2015
@tsteur
Copy link
Member

tsteur commented Feb 13, 2015

Re Feedback (WIP)

I suggest to create new issues for all those.

Rows with Unknown (eg. unknown cities, regions) don't have the icon

That's currently on purpose as some segments don't work when passing an empty label eg deviceType== shows "Unknown" and "Desktop". So for the first version the easiest way is to disable it for them instead of showing wrong results in the visitor log. In the next step we can fix the actual segments.

@tsteur
Copy link
Member

tsteur commented Feb 13, 2015

The visitTime error is fixed in a new branch, will pull request once tests are green

@mattab
Copy link
Member Author

mattab commented Feb 15, 2015

Further feedback:

  • When clicking in a sub-table such as Event subtable, the popover such as this one says Visitor Log showing visits where is "click" but we expected to be Visitor Log showing visits where Event action is "click"
  • The following reports don't have an icon as they don't have yet a segment. We need to create a segment for these:
  • Icon doesn't display in the following reports
    • Provider (segment provider)
    • Visits per visit duration (segment visitDuration)
    • Visits by Visit Number (segment visitCount)
    • Visits per number of pages (segment actions)
    • Visits by days since last visit (segment daysSinceLastVisit)
    • Page title (segment pageTitle)
    • Site Search (segment siteSearchKeyword)
    • Referrer type (segment referrerType)
  • The popover does not show data when a URL contains exotic characters eg in this report the popover does not show data for /piwik日本ユーザー会について, this is the loaded popover URL
  • In the "Referrers > Search engines" the Keyword not defined popover shows all kinds of referrers. Maybe it should segment for Visitors with referrerType==search
  • Could we display the icon in the sub-tables of the "Referrers" reports such as Search engines, Search keyword, Websites URLs and Campaign keywords

(I'll create issues for those if you want)

@tsteur
Copy link
Member

tsteur commented Feb 15, 2015

If a segment exists but doesn't show in UI it is either define in /core and not in the column directly, or the dimension is not linked with a report, or it is not easy to implement eg in case of pageTitles as it has weird subtables constructions but no url metadata. You can create separate issues for all those.

Re search engines will see if it is possible to disable it for Keyword not defined unless segments support to filter exactly this. Filtering for referrerType==search would be wrong.

Displaying them in subtables would be a new issue as well as the others.

Re event action this looks like a regression, it was not supposed to be displayed in the subtables there and will remove it again.

I will have a look re the exotic characters but already mentioned to you last week that there is a problem and how Piwik stores them etc.

@tsteur
Copy link
Member

tsteur commented Feb 15, 2015

Re search engine I think what you meant is we always need to append/prepend referrerType==search to all of the segment filters

tsteur added a commit that referenced this issue Feb 15, 2015
…re a search, do not display segment icon in subtables of events
tsteur added a commit that referenced this issue Feb 15, 2015
…ilter within a filter and run them recursive. not sure if recursive is a good idea though
tsteur added a commit that referenced this issue Feb 15, 2015
…ubtables since they can belong to different repots and need different segments
tsteur added a commit that referenced this issue Feb 15, 2015
…re queued filters are applied which allows us to use the prependSegment filter in combination with AddSegmentValue
@mattab
Copy link
Member Author

mattab commented Feb 15, 2015

Created follow up issues:

@mattab
Copy link
Member Author

mattab commented Feb 15, 2015

Re event action this looks like a regression, it was not supposed to be displayed in the subtables there and will remove it again.

Ok

tsteur added a commit that referenced this issue Feb 16, 2015
…e run, otherwise it would not be converted
tsteur added a commit that referenced this issue Feb 16, 2015
* No longer any segmentValue in subtables, this was a bug
* Referer.getReferrerType should not have any segments
* Order of some segments slightly changed in metadata output since we
  do process them earlier now
* Append segemnt refererType=search to keywords
tsteur added a commit that referenced this issue Feb 16, 2015
…referrer.

location.href and top.document.referer are both already URL encoded.
To prevent double encoding we need to decode them.
tsteur added a commit that referenced this issue Feb 16, 2015
@tsteur tsteur closed this as completed Feb 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical.
Projects
None yet
Development

No branches or pull requests

2 participants