[xwiki-users] User activity log
Hi all! Our organization have Xwiki set up and working. Some pages are business instructions. Now management asked for report: who viewed which instructions and when. We have authorization required to view those pages, so Xwiki always know login name. Is there way set up some log of visits by user and page? Better if without setting up dev tools and changing code! A text file or table in DB will be enough as log Thanks all who will reply/
Hi, On 19 May 2015 at 13:15:55, Яковлев Павел Владимирович ([email protected](mailto:[email protected])) wrote:
Hi all!
Our organization have Xwiki set up and working. Some pages are business instructions.
Now management asked for report: who viewed which instructions and when.
We have authorization required to view those pages, so Xwiki always know login name.
Is there way set up some log of visits by user and page?
Better if without setting up dev tools and changing code!
A text file or table in DB will be enough as log
Thanks all who will reply/
Maybe http://extensions.xwiki.org/xwiki/bin/view/Extension/Statistics+Application would help you? Thanks -Vincent
Vincent, Unfortunately as I see this extension does not collect info which pages where visited by which user( Business task is like this: to know which required instructions this guy or that guy have read From: Vincent Massol [mailto:[email protected]] On Behalf Of [email protected] Sent: Tuesday, May 19, 2015 2:23 PM To: XWiki Users Cc: Яковлев Павел Владимирович Subject: Re: [xwiki-users] User activity log Hi, On 19 May 2015 at 13:15:55, Яковлев Павел Владимирович ([email protected](mailto:[email protected]))<mailto:[email protected](mailto:[email protected]))> wrote:
Hi all!
Our organization have Xwiki set up and working. Some pages are business instructions.
Now management asked for report: who viewed which instructions and when.
We have authorization required to view those pages, so Xwiki always know login name.
Is there way set up some log of visits by user and page?
Better if without setting up dev tools and changing code!
A text file or table in DB will be enough as log
Thanks all who will reply/
Maybe http://extensions.xwiki.org/xwiki/bin/view/Extension/Statistics+Application would help you? Thanks -Vincent
On 19 May 2015 at 13:30:32, Яковлев Павел Владимирович ([email protected](mailto:[email protected])) wrote:
Vincent,
Unfortunately as I see this extension does not collect info which pages where visited by which user(
Indeed
Business task is like this: to know which required instructions this guy or that guy have read
You could do that by having some web server (apache for ex) in front of xwiki and then checking the access logs. You’d need to ensure to log the username from the cookie for example (for ex using http://httpd.apache.org/docs/2.2/mod/mod_log_config.html). Alternatively (and better IMO), you can have some custom sheet with a checkbox that the user has to click to signify he’s read the page (since viewing the page doesn’t mean he’s read it!). Hope it helps, -Vincent
From: Vincent Massol [mailto:[email protected]] On Behalf Of [email protected] Sent: Tuesday, May 19, 2015 2:23 PM To: XWiki Users Cc: Яковлев Павел Владимирович Subject: Re: [xwiki-users] User activity log
Hi,
On 19 May 2015 at 13:15:55, Яковлев Павел Владимирович ([email protected](mailto:[email protected]))(mailto:[email protected](mailto:[email protected]))) wrote:
Hi all!
Our organization have Xwiki set up and working. Some pages are business instructions.
Now management asked for report: who viewed which instructions and when.
We have authorization required to view those pages, so Xwiki always know login name.
Is there way set up some log of visits by user and page?
Better if without setting up dev tools and changing code!
A text file or table in DB will be enough as log
Thanks all who will reply/
Maybe http://extensions.xwiki.org/xwiki/bin/view/Extension/Statistics+Application would help you?
Thanks
-Vincent
Vincent, thanks so far for ideas, we will investigate them I see great "activitystream_events" table there... Can you have a quick look - is it easy to write there ase_type="view" record each time page viewed? May be you can find or make a kind of flag to enable it? -----Original Message----- From: Vincent Massol [mailto:[email protected]] On Behalf Of [email protected] Sent: Tuesday, May 19, 2015 2:36 PM To: XWiki Users Cc: Яковлев Павел Владимирович Subject: RE: [xwiki-users] User activity log On 19 May 2015 at 13:30:32, Яковлев Павел Владимирович ([email protected](mailto:[email protected])) wrote:
Vincent,
Unfortunately as I see this extension does not collect info which pages where visited by which user(
Indeed
Business task is like this: to know which required instructions this guy or that guy have read
You could do that by having some web server (apache for ex) in front of xwiki and then checking the access logs. You’d need to ensure to log the username from the cookie for example (for ex using http://httpd.apache.org/docs/2.2/mod/mod_log_config.html). Alternatively (and better IMO), you can have some custom sheet with a checkbox that the user has to click to signify he’s read the page (since viewing the page doesn’t mean he’s read it!). Hope it helps, -Vincent
From: Vincent Massol [mailto:[email protected]] On Behalf Of [email protected] Sent: Tuesday, May 19, 2015 2:23 PM To: XWiki Users Cc: Яковлев Павел Владимирович Subject: Re: [xwiki-users] User activity log
Hi,
On 19 May 2015 at 13:15:55, Яковлев Павел Владимирович ([email protected](mailto:[email protected]))(mailto:[email protected](mailto:[email protected]))) wrote:
Hi all!
Our organization have Xwiki set up and working. Some pages are business instructions.
Now management asked for report: who viewed which instructions and when.
We have authorization required to view those pages, so Xwiki always know login name.
Is there way set up some log of visits by user and page?
Better if without setting up dev tools and changing code!
A text file or table in DB will be enough as log
Thanks all who will reply/
Maybe http://extensions.xwiki.org/xwiki/bin/view/Extension/Statistics+Application would help you?
Thanks
-Vincent
Finally set up registration into *activitystream_events* table by creating a page with groovy as source and calling it from footer.vm *CALL FROM footer.vm:* #set($g=$xwiki.parseGroovyFromPage("UserActivity.ViewEventRegistrationMacro")) #set($s=$g.log($xwiki,$doc)) $s *PAGE SOURCE OF ViewEventRegistrationMacro PAGE:* import java.util.Date; import com.xpn.xwiki.plugin.activitystream.impl.ActivityStreamImpl; import com.xpn.xwiki.plugin.activitystream.impl.ActivityEventImpl; import com.xpn.xwiki.plugin.activitystream.api.ActivityEventPriority; class ViewEventRegistrationMacro { String log(xwiki,doc) { def xcontext=doc.getXWikiContext(); def action=""; try { action=xcontext.getContext().action } catch(e) {} def ast=new ActivityStreamImpl(); def event = new ActivityEventImpl(); event.setStream(""); event.setPage(doc.getFullName()); event.setDate(new Date()); event.setPriority(ActivityEventPriority.NOTIFICATION); event.setType("view"); event.setTitle(""); event.setBody(""); event.setVersion(doc.getVersion()); event.setUser(xcontext.getLocalUser()); event.setHidden(false); event.setParam1(xcontext.getContext().toString()); ast.addActivityEvent(event, doc.getDocument(), xcontext); return "<div style='font-size: 8px; color: rgb(204, 204, 204);'>View stat is on</div>"; } } -- View this message in context: http://xwiki.475771.n2.nabble.com/User-activity-log-tp7594888p7594978.html Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (4)
-
easkr -
vincent@massol.net -
Яковлев Павел Владимиро вич -
Яковлев Павел Владимирович