enterprisemediawiki / Wiretap

User pageview tracking for MediaWiki
4 stars 6 forks source link

Add page counter #6

Closed jamesmontalvo3 closed 9 years ago

jamesmontalvo3 commented 9 years ago

Adds two tables for counting number of hits to pages:

On each page load either or both of these counters can be updated by setting these two variables:

$egWiretapAddToPeriodCounter defaults to false because the "period" table requires the use of the wiretapRecordPageHitCount.php maintenance script to periodically clear out the table and refresh it with data from the wiretap table. Without this refresh (which should be done fairly regularly via a cron job) the period-table data gets out of date.

Additionally, both tables have a count_unique field that counts how many unique hits each page has gotten. This is also only provided by the maintenance script.

jamesmontalvo3 commented 9 years ago

Won't really be able to test this until it's on ops. Appears to be working on local wiki. Merging to master, will re-test next week.