Re: [pmwiki-users] Tracking number of page views statistics

27 views
Skip to first unread message

wri...@creativevirtuosity.com

unread,
Mar 26, 2012, 7:37:54 PM3/26/12
to Patrick R. Michaud, tamouse mailing lists, PmWiki Users
I would like to track the number of times some of the pages in my Wiki
are viewed. Is there a recipe that will allow me to do this? I can't
find any specifically targeted to display reader stats in the cookbook.


Thank you,
Susan Flander
http://www.creativevirtuosity.com
contact no: 877.206.1230


Google: CREATIVE VIRTUOSITY
http://www.linkedin.com/in/creativevirtuosity
http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=1483678

Social Media Committee:
http://www.microsoftalumni.org/About/Volunteers.aspx


> -------- Original Message --------
> Subject: Re: [pmwiki-users] Fwd: using rsync for wiki sync
> From: "Patrick R. Michaud" <pmic...@pobox.com>
> Date: Mon, March 26, 2012 11:05 am
> To: tamouse mailing lists <tamous...@gmail.com>
> Cc: PmWiki Users <pmwiki...@pmichaud.com>
>
>
> On Mon, Mar 26, 2012 at 10:14:07AM -0500, tamouse mailing lists wrote:
> > > rsync should work out okay, yes.
> >
> > I'd like to voice one caveat:
> >
> > If you are using authuser.php script and protecting your pages, be
> > aware the encryptions in SiteAdmin.AuthUser do no translate across
> > installations (at least they haven't in my experience).
>
> Encryptions in SiteAdmin.AuthUser should also translate across
> installations, as long as both installations support the same
> types of encryption. In other words, there's nothing site-specific
> about the encryption -- it simply uses PHP's crypt() function.
>
> Pm
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki...@pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users


_______________________________________________
pmwiki-users mailing list
pmwiki...@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Patrick R. Michaud

unread,
Mar 26, 2012, 9:42:34 PM3/26/12
to wri...@creativevirtuosity.com, PmWiki Users
On Mon, Mar 26, 2012 at 04:37:54PM -0700, wri...@creativevirtuosity.com wrote:
> I would like to track the number of times some of the pages in my Wiki
> are viewed. Is there a recipe that will allow me to do this? I can't
> find any specifically targeted to display reader stats in the cookbook.

For the pmwiki.org site I use Google Analytics (free) to keep
track of page view statistics -- Google Analytics makes it easy
to see page visits, organize by groups, where visitors are coming
from, etc. See http://www.pmwiki.org/wiki/Cookbook/GoogleAnalytics .

(That recipe may need a little updating if Google has changed
their tracking code, but the basic idea is there.)

Hope this helps!

tamouse mailing lists

unread,
Mar 28, 2012, 10:53:13 PM3/28/12
to wri...@creativevirtuosity.com, pmwiki...@pmichaud.com
On Tue, Mar 27, 2012 at 12:14 PM, <wri...@creativevirtuosity.com> wrote:
> Patrick:
>
> I am looking for something closer to what the KNOL unit displays for the
> number of views / reads on articles.  The analytics have to display
> stats externally for each page.  See Attached.

>
> Thank you,
> Susan Flander
> http://www.creativevirtuosity.com
> contact no: 877.206.1230
>
>
> Google: CREATIVE VIRTUOSITY
> http://www.linkedin.com/in/creativevirtuosity
> http://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=1483678
>
> Social Media Committee:
> http://www.microsoftalumni.org/About/Volunteers.aspx
>
>
>
>
>> -------- Original Message --------
>> Subject: Re: Tracking number of page views statistics
>> From: "Patrick R. Michaud" <pmic...@pobox.com>
>> Date: Mon, March 26, 2012 8:42 pm
>> To: wri...@creativevirtuosity.com
>> Cc: tamouse mailing lists <tamous...@gmail.com>, PmWiki Users
>> <pmwiki...@pmichaud.com>
>>
>>
>> On Mon, Mar 26, 2012 at 04:37:54PM -0700, wri...@creativevirtuosity.com wrote:
>> > I would like to track the number of times some of the pages in my Wiki
>> > are viewed.  Is there a recipe that will allow me to do this?  I can't
>> > find any specifically targeted to display reader stats in the cookbook.
>>
>> For the pmwiki.org site I use Google Analytics (free) to keep
>> track of page view statistics -- Google Analytics makes it easy
>> to see page visits, organize by groups, where visitors are coming
>> from, etc.  See http://www.pmwiki.org/wiki/Cookbook/GoogleAnalytics .
>>
>> (That recipe may need a little updating if Google has changed
>> their tracking code, but the basic idea is there.)
>>
>> Hope this helps!
>>
>> Pm

I'm not quite sure what the meaning of the first number on the Knol
page referring to -- what are they pageviews of? Just that page? Or
all your authored pages? By anyone? Or..?

I don't know if PmWiki stores the information directly about who
created a page, it does know who the last person to modify it was, but
that could very well be someone other than the original creator, so
original author stats might be difficult to obtain. Each diff records
the author of that change, but if you don't save your diffs very long
the original author will disappear. I'm not sure if there are hooks
for page creation, but if there are, I suppose you could do something
to record the original author somehow. I'm not altogether clear on the
implications of adding a field to the page structure, or how one can
get access to those fields programmatically.

As pageviews are typically logged by the web server (access_log in
Apache's configuration, typically /var/log/apache2/access_log on many
newer linux distros), and analytics run on that log, perhaps you could
write something that would periodically run through the access log and
build your numbers. This isn't something you want to do on the fly
during a user's browsing session, as it can take quite a bit of
processing time.

On the other hand, you might be able to hook in a page counter
whenever a page is browsed (I don't think you'd really want to count
other actions on a page in your pageview stats?) and store something
appropriately there. I would definitely not store it in the page
itself as that would mean writing a page on every page view. Maybe an
sqlite data base on the side? This may not scale very elegantly though
if your site is hugely popular and large. Hooking into an action is
pretty simple in config.php:

if (action == 'browse') include_once('cookbook/pagecount.php');

would include the pagecount recipe once every time the page is viewed
(as opposed to edited, sourced, attributes changed, etc).
pagecount.php could handle bumping counters for that page.

The results of either (or any) process could be stored in the wiki,
possibly something like Profiles.Author-Pageviews, that could be
(:include:)-ed in author's profile page (Profiles.Author) which seems
like it would emulate what Knol is doing.

Oliver Betz

unread,
Mar 29, 2012, 4:59:47 AM3/29/12
to pmwiki...@pmichaud.com
Hello Susan,

please don't hijack threads by changing the subject of a reply. Create
a fresh mail to start a new topic.

>I would like to track the number of times some of the pages in my Wiki
>are viewed. Is there a recipe that will allow me to do this? I can't

Webalizer or awstats should do the job by analyzing the server log
files.

Google Analytics has privacy issues - you should configure it
"friendly" and offer opt-out.

Consider Piwik and Mint as alternatives.

Oliver

Reply all
Reply to author
Forward
0 new messages