【问题标题】:Piwik API: sorting results by "nb_visits" is wrongPiwik API:按“nb_visits”排序结果是错误的
【发布时间】:2015-03-22 10:25:46
【问题描述】:

我在 Piwik 中配置了 2 个自定义变量。我正在使用 API 来获取按“nb_visists”排序的值。 我使用的请求是这样的:

http://localhost/piwik/?module=API&method=CustomVariables.getCustomVariables&idSite=2&period=range&date=2015-01-19,2015-01-20&format=JSON&filter_sort_column=nb_visits&filter_sort_order=asc&expanded=1&token_auth=......&segment=customVariablePageName2==category;customVariablePageValue2=@/maincategory/

问题是结果没有按照“nb_visits”列的值排序。 当我使用参数“filter_sort_column”时,结果以不同的方式排序,但顺序仍然错误。

【问题讨论】:

    标签: matomo


    【解决方案1】:

    排序应该有效,但是在您的示例中,您要求 2 天。所以你会得到 2 个结果,每个都有很多行。

    每个结果中的行都会被排序,但是2个结果不会被排序。

    如果您每天有 1 行可能会令人困惑:在这种情况下,排序似乎不起作用,但请记住排序是每天完成的。

    【讨论】:

    • 感谢重播。我尝试使用此参数执行相同的请求:“date=2015-01-19,2015-01-19”(一天),但结果的顺序仍然错误。这是回复:notepad.cc/kiosoosmi16
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多