Statistics Plugin

Creating and modifying plugins.
Post Reply
stephanbrunker
Regular
Posts: 15
Joined: Sat Nov 25, 2017 1:08 am

Statistics Plugin

Post by stephanbrunker » Thu Aug 23, 2018 2:22 am

Hello,

I took a look into the statistics plugin and into the according tables in the db. I have two issues: first, some IPs get different (2 up to 10) sessionIDs in a timespan of less than a minute, they appear multiple in the visitors table. I cannot think that a human will access a blog simultaneously in different sessions in such a small timeframe, so these should not be counted. For this check, the timestamp of the visit should be saved in the table too because that is easier to calculate with.

The second one is a bigger one: I want to know which pages are shown how often, and in which language because on a multilingual blog, I don't know which language is preferred. That would mean an extension of the plugin. I think I already know the answer: This is an open project, If you want it, do it yourself …

I think i could do it - the $server variable has the GET-Value which has the page information, the language is either saved in the $serendipity array or in the session cookie, or in the GET value too. That would mean to save the visited pages too and probably also make a routine for deleting the data after some time to avoid an bloated database. (that should be done too for the visitor tables, the raw count is enough to be saved). That is very much straightforward PHP without the need to know the inner workings of s9y.

Looks like a matter of time, competing with my host of other projects and my company ...

User avatar
onli
Regular
Posts: 2160
Joined: Tue Sep 09, 2008 10:04 pm
Contact:

Re: Statistics Plugin

Post by onli » Sat Aug 25, 2018 1:07 am

That would mean an extension of the plugin. I think I already know the answer: This is an open project, If you want it, do it yourself …
;)

You know that's not always the case. But the statistics plugin could indeed need some love. Most of the time though when people get interested in those analytics they go afterwards with piwik, and you could also try out some tools to analyze the webserver log files.

There is the dbclean plugin, it should prune the statistics table. It getting to big is caused by the structure of the database tables sadly.

Post Reply