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

Better segment editor and fixes #12040

Merged
merged 114 commits into from Oct 3, 2017
Merged

Better segment editor and fixes #12040

merged 114 commits into from Oct 3, 2017

Conversation

tsteur
Copy link
Member

@tsteur tsteur commented Sep 12, 2017

  • Updated segment editor that takes less space now and works fine on mobile
  • Segment editor can now show descriptions for each segment (currently shows accept values, needs to be tweaked later all the accept values descriptions or have separate description)
  • Segment selector can now be easily embedded anywhere in the UI by using <div piwik-segment-generator>
  • Segment selector is now mainly based on angular
  • New segments: actionServerHour, actionServerMinute, visitStartServerHour, visitStartServerMinute, visitEndServerMinute, visitLocalMinute
  • Various fixes in Log Query Builder
  • Easier way to add a segment... all one has to do in a dimension is to specify the segmentName protected $segmentName = 'myConversionSegmentName';.... optionally it is possible to specify a sql segment protected $sqlSegment = 'MINUTE(log_link_visit_action.server_time)'; and protected $acceptValues = '0, 1, 2, 3, ..., 56, 57, 58, 59';
  • More consistency
  • Eg segments now use also Visitors category instead of Visit to be consistent with everything else
  • Fixed some wording eg we showed report "Page titles" but the dimension label said "Page name" instead of "Page title"
  • Dimensions can now describe themselves much better... eg they can define
  • What kind of value they hold (URL, Money, Time, Number, Float, ...)
  • Whether the actual value for that dimension is behind a join
  • Whether there is a database discriminator meaning only when eg log_action.type=1 then it is a page url
  • They can now also define Enums see https://github.com/piwik/piwik/blob/dimensions/plugins/CoreHome/Columns/VisitorReturning.php#L57-L64 which is automatically being used when formatting a dimension, for suggestedValuesCallback for segments, for sqlFilter, and other things.
  • We can use this later to improve auto suggestion for segment editor, and automatically format dimensions that are referenced in a report (will ensure consistency re formatting) etc
  • See eg https://github.com/piwik/piwik/blob/dimensions/plugins/Actions/Columns/PageUrl.php#L24-L37
  • Dimensions can now create metrics that are generated based on those dimensions. This will allow us to generate better documentation for glossary etc
  • Plugins can now define their own "entityNames" eg "idExperiment" so plugins can make use of more core features like Row evolution etc.
  • Fixed segments were not sorted by categories as we do it in the menu, dashboard widget selector etc
  • Because we now know the type of each dimension (eg number, datetime, time, url, ...), we can modify the segment selector in the future to adjust the value field to eg a date field or number field and also adjust the comparisons based on that type.
  • ...

Re developer changelog: There is no breaking API change but we have new ways to define a segment. Can add this to the docs or we do it with Piwik 4.

Related PRs:

In this PR I assumed the next version will be Piwik 3.2.0. If we choose to make it 3.1.1 let's rename all mentions of 3.2.0

@tsteur tsteur added Needs Review PRs that need a code review Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. labels Sep 13, 2017
@mattab mattab modified the milestones: 3.2.0, 3.1.2 Sep 21, 2017
@tsteur
Copy link
Member Author

tsteur commented Oct 3, 2017

Merging now as discussed

@tsteur tsteur merged commit 9af4e95 into 3.x-dev Oct 3, 2017
@tsteur tsteur deleted the dimensions branch October 3, 2017 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants