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

Let Live.getVisitorProfile API returns more than 500 actionDetails #13671

Closed
Tennyleaz opened this issue Nov 6, 2018 · 5 comments
Closed

Let Live.getVisitorProfile API returns more than 500 actionDetails #13671

Tennyleaz opened this issue Nov 6, 2018 · 5 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@Tennyleaz
Copy link

For example, my http request is like:

index.php?module=API&method=Live.getVisitorProfile&format=json&expanded=1&limitVisits=1000&period=day&visitorId=xxxx&date=2018-10-07&idSite=1&filter_limit=-1

However, I could only get max actionDetails to 500 per visit.
Could you add an parameter to override the 500 limit?

@sgiehl
Copy link
Member

sgiehl commented Nov 6, 2018

That is defined in Matomo config. You can simply overwrite that in your config. But keep in mind, that this will also affect the UI, so if you set it to a very high number, the visitor profile might load forever:

https://github.com/matomo-org/matomo/blob/3.x-dev/config/global.ini.php#L495

@Tennyleaz
Copy link
Author

Could I set visitor_log_maximum_actions_per_visit at a smaller number when using web UI, but override with a larger number when using API to query?

@sgiehl
Copy link
Member

sgiehl commented Nov 6, 2018

No. Both is currently using the same config value. Might be worth at some point to change that. Would be better if API would allow to overwrite it

@Tennyleaz
Copy link
Author

Hope that an overwrite feature could be add to do this.

@tsteur
Copy link
Member

tsteur commented Nov 7, 2018

We're likely not going to develop this, but in case you know a wee bit of PHP, you could write your own plugin that does this.

You could create a config/config.php file containing code like this:

return array(
    'Piwik\Config' => DI\decorate(function ($previous) {
       if (!empty($_GET['module']) && $_GET['module'] === 'API') {
          $general = $previous->General;
         $general['visitor_log_maximum_actions_per_visit'] = 10000000;
         $previous->General = $general;
      }
        return $previous;
    }),
);

@tsteur tsteur closed this as completed Nov 7, 2018
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Nov 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants