BREAKING API changes to Live.getLastVisitsDetails parameter and output #3905

mattab opened this Issue Apr 20, 2013 · 2 comments

1 participant

Piwik Open Source Analytics member

We had to make some changes to the Live.getLastVisitsDetails introducing some API output change:

  • a site search keyword now appears as siteSearchKeyword --- it used to be called the pageTitle
    • custom variables of "page" scope now appear as:
    • names are customVariablePageName1 (it used to be customVariableName1
    • values are customVariablePageValue1 (it used to be customVariableValue1
  • The API used to have a parameter 'maxIdVisit' parameter. Now we have made the API easier to use and introduced instead a filter_offset parameter, which can be used instead.
Piwik Open Source Analytics member

In 35f975a: Fixes #3904:

  • new segment 'siteSearchKeyword' Fixes #3903, #3905:
  • adding few fields in the Live API output to accomodate getSuggestedValuesForSegment
  • renamed other fields for consistency with segment names Fixes #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!
Piwik Open Source Analytics member

In bc4486e: Refs #3905
Fixing visitor Log to follow the new API format

@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