Report data missing depending on timeframe queried

Hi there,

I have found that when searching for a URL via the UI or API in the Behaviour->Pages report, sometimes I get results, and other times I don’t.

It seems to depend on the timeframe I pick, and even when dates are overlapping, the results can be missing

For example
Here you can see, if I search for a url on August 7th I get results

But If I change the period to the week 7th - 13th August, then I suddenly have no results
image

And same if I change the period to be the whole month
image

A custom date range strangely does work

But not this larger timeframe
image

I’m finding this happening with lots of different URLs, and I get the same results via the API

Any idea what’s causing it?

I’ve tried to invalidate reports and then run the archive cron manually - but it seems to complete in less than a minute which I find far too fast (we record several million hits a month across 8 sites for context)

I feel like there must some issue with the archiving of reports but I’m not sure how to confirm/fix it

Thank you!

As a follow on, I’ve now also checked the data is definitely in the Matomo tables by running a SQL command to get the same page url using the SQL query


 SELECT name as page_url, COUNT(*) as hits
    FROM matomo_log_visit
    LEFT JOIN matomo_log_link_visit_action ON matomo_log_visit.idvisit = matomo_log_link_visit_action.idvisit
    LEFT JOIN matomo_log_action ON matomo_log_action.idaction = matomo_log_link_visit_action.idaction_url
    WHERE matomo_log_visit.idsite = 8
    AND name LIKE '%[ARTICLE_URL_HERE]%'
    AND type = 1
    AND matomo_log_link_visit_action.server_time >= '2023-08-01'
    AND matomo_log_link_visit_action.server_time < '2023-08-30'
    GROUP BY page_url
    ORDER BY hits DESC;

I also confirmed, if I create a custom report, it also finds the data

So why doesn’t it find it via the API or searching in the UI?