I am trying to use the Live.getLastVisitsDetails method to fetch all the visit information from Matomo. I have a loop over two-week periods and an inner loop using filter_limit=500 and changing filter_offset 0, 500, … until no more data is returned. I understand this should fetch all the visits.
I am seeing something very strange, though. For instance, with parameters
the last visit I get has timestamp 2019-12-18 19:39:28, but when I increase filter_offset by 500,
the first visit has timestamp 2019-12-16 07:02:58, leaving hundreds of visits between these two times unaccounted for. This seems to happen whenever I am fetching the last batch of a time period, but I’m not completely sure about that.
I noticed that if I increase filter_limit to 1000 in that latter call, I get the correct results back, continuing immediately after the previous batch, but that’s a cumbersome workaround to implement and since I don’t understand this situation, I can’t be sure it works.
Has anyone seen something like this? Any advice on what I could do to fix my problem? I cannot increase filter_limit because in general I start hitting server resource limits if I go much above 500 (that’s another reason why I’m not confident that increasing it to 1000 temporarily would be a good idea).
The Matomo version is 3.13.1.