I am invoking Matomo API to display Total Views on a POST Page and Top Views for the week on every page in the sidebar. However, I observed that the Total Count for a Post and Top Views for the same Post are different.
Note: This has started to happen after I have re-processed my data (Invalidate entire data and trigger re-process)
Same code works (meaning top views and total Views for a post are same) well for other sites for which re-processing is NOT triggered.
Following are my queries :
I am trying to show top stories of the week based of Top Views. For which my query is as follows:
Eg : Startdate = 14th June End Date = 21st June
module=API&method=Actions.getPageUrls&filter_sort_column=nb_hits&filter_sort_order=desc&idSite=’ . $idSite . ‘&period=range&date=’ . $params[‘start-date’] . ‘,’ . $params[‘end-date’] . ‘&format=json&token_auth=’ . $this->auth_token
Total Views :
‘module=API&method=Actions.getPageUrl&pageUrl=’ . $pageUrl . ‘&idSite=’ . $idSite . ‘&period=range&date=’ . $atts[‘start_date’] . ‘,’ . $atts[‘end_date’] . ‘&format=json&token_auth=’ . $auth_token;
I have done following steps :
Reference URL - https://matomo.org/faq/troubleshooting/faq_141/
DB Snapshot / Backup that way we can revert when needed.
Update Matomo Version - Done
Re-Process Data - Ref URL : https://matomo.org/faq/how-to/faq_59/
a. Invalidate Historical Reports for a Site (with LOW Traffic) using Invalidte Reports Plugin (Al Historical Data) OR via
Console path - var/www/matomo
b. Re-Process Data using Console - https://matomo.org/faq/how-to/faq_59/
./console core:archive --force-idsites=1,3,5 --url=https://analytics.sophiamedia.com/
Helpful Command for Console - cd /var/www/matomo > ./console help core:archive
Setup auto archiving for your reports - Done in Crontab already
What could have gone wrong in the processing ? Anything else remains in triggering re-processing ?