Skip to content

MultiSites evolution metrics not shown when parameter period=range or date=(last*/previous*) is used #4068

@tsteur

Description

@tsteur

Compare those two API requests:

http://demo.piwik.org/index.php?period=day&date=today&showColumns=nb_visits%2Cvisits_evolution&filter_limit=50&sortOrderColumn=nb_visits&filter_sort_column=nb_visits&module=API&token_auth=anonymous&format=json&method=MultiSites.getAll&language=de&

[{"label":"Piwik Forums","nb_visits":898,"visits_evolution":"153,7%","idsite":7},{"label":"Crowdfunding","nb_visits":53,"visits_evolution":"65,6%","idsite":32},{"label":"virtual-drums.com","nb_visits":28,"visits_evolution":"-22,2%","idsite":3}]

http://demo.piwik.org/index.php?period=range&date=last7&showColumns=nb_visits%2Cvisits_evolution&filter_limit=50&sortOrderColumn=nb_visits&filter_sort_column=nb_visits&module=API&token_auth=anonymous&format=json&method=MultiSites.getAll&language=de&

[{"label":"Piwik Forums","nb_visits":5368,"idsite":7},{"label":"Crowdfunding","nb_visits":395,"idsite":32},{"label":"virtual-drums.com","nb_visits":275,"idsite":3}]

The second call does not contain the evolution metric. The only difference is the date and period parameter.

Background: I'm using this API call in Piwik Mobile 2 to fetch the list of all websites for the All Websites Dashboard. I'm displaying only the number of visits and evolution there. To reduce the amount of transferred data and to improve performance I'm using the showColumns parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    TaskIndicates an issue is neither a feature nor a bug and it's purely a "technical" change.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions