On 2/25/06, Stephen Schaub <stephen_schaub_88(a)hotmail.com> wrote:
How does one obtain stats on the number of times an
XWiki page has been
visited?
I've tried
$doc.getCurrentMonthPageStats("view").getVisits()
but all I get is 0. Perhaps I'm passign the wrong parameter ("view") --
I'm
just guessing at what it should be -- or perhaps I have to do something to
enable collection of stats?
Also, does xwiki track the number of times an attachment has been
downloaded?
Hi,
have you tried this:
#set($docstats = $tdoc.getCurrentMonthPageStats("view"))
$msg.get("pageviews"): $docstats.getPageViews()
#set($docstats = $tdoc.getCurrentMonthWebStats("view"))
$msg.get("webpageviews"): $docstats.getPageViews()
#set($docstats = $xwiki.getCurrentMonthXWikiStats("view"))
$msg.get("xwikipageviews"): $docstats.getPageViews()
$msg.get("xwikivisits"): $docstats.getVisits()
For the download, i'm not sure, but i think it counts the number of
download action in a page. For seeing it, you have to replace "view"
by "download"
Jérémi
--
Blog:
http://www.jeremi.info
LinkedIn:
https://www.linkedin.com/profile?viewProfile=&key=1437724
Project Manager XWiki:
http://www.xwiki.org
skype: jeremi23 -- msn et gtalk : jeremi23(a)gmail.com