Pageview information is not available in the database and so this issue has been separated from #9 . Here pageview means how many times pages that include certain Scribunto modules have been viewed. Pageview thus can be used as a metric to measure the frequency of the use of a Scribunto modules.
Similarly, other such analytics information can be collected from API and database for the modules too.
- Get page view of all pages that transclude a module
- Save pageview for previous days (as much available)
- Change code to use REST API which has pageview count for longer time
- Add pageviews for each subsequent day
- Test fetching (both daily and overall)
- Add cron job (to fetch pageview for the latest day)
Both REST and PHP APIs were tested. Although the PHP api provides data for last 60 days only (REST gives pageviews from ~2015) it seemed to be more reliable and robust to multiple calls. Whereras REST API started giving 404s really fast and so getting pageviews for *that many* pages would take forever.
TIll now, the pageviews script seems to be running without errors but is taking over a week to fetch all data. Timing will be updated when script finishes running.
Draft notebook for analysis Aishas Notebook III