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 API: getSuggestedValuesForSegment to return top suggested values for a particular segment #3906

Closed
mattab opened this issue Apr 20, 2013 · 3 comments
Assignees
Labels
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 Apr 20, 2013

For the segment editor #2135 and for custom alerts #1486 we need an API that returns the suggested values for a given segment.

The API should be simple to use and fast, and return a plain list of unique strings that have been used for the request segment, to assist users in creating segments.

@mattab
Copy link
Member Author

mattab commented Apr 20, 2013

In 35f975a: Fixes #3904:

  • new segment 'siteSearchKeyword'
    Fixes BREAKING API changes: some 'segment' names have been renamed #3903, BREAKING API changes to Live.getLastVisitsDetails parameter and output #3905:
  • adding few fields in the Live API output to accomodate getSuggestedValuesForSegment
  • renamed other fields for consistency with segment names
    Fixes New API: getSuggestedValuesForSegment to return top suggested values for a particular segment #3906:
  • new API: getSuggestedValuesForSegment which returns top suggested values for a particular segment. It uses the Live.getLastVisitsDetails API to fetch the most recently used values, and will show the most used values first
  • Adding tests for everything. The test case actually generates data for all segments so that VisitsSummary.get returns some data for each of the 47 segments being tested returns some data.
    How it works:
    • generate extended data in fixture
    • Tests (1) call getSuggestedValuesForSegment for each segment, check there is some data returned for each segment
    • get the first suggested value from the list,
    • Tests (2) call VisitsSummary.get with this segment value, eg. countryCode==ru.
      • I worked this way for all 47 segments until all tests had some data ==> now we know that all segments have been tested and that the auto suggest works for all segments. TDD FTW!

@mattab
Copy link
Member Author

mattab commented Apr 21, 2013

In ea240af: Refs #3906

  • Speeding up the suggestion list by only requesting actions when they are really needed

@mattab
Copy link
Member Author

mattab commented Apr 21, 2013

In 3069828: Refs #3906

  • Speeding up the suggestion list by only selecting visitors that have a value set for the requested segment

@mattab mattab added this to the 1.12 - The Great 1.x Backlog milestone Jul 8, 2014
@mattab mattab self-assigned this Jul 8, 2014
This issue was closed.
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. 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

1 participant