Skip to Content
author's profile photo Former Member
Former Member

Statistics

Hello,

somebody know if exists a standard implementation to do statistics about how many times one user visit one specific document?

thanks in advance!

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2008 at 11:19 AM

    Hi Anna,

    since SP 14 it's possible.

    Look at: http://help.sap.com/saphelp_nw70/helpdata/en/45/74eeda9ba26975e10000000a114a6b/content.htm

    Kind Regards,

    Thorsten

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 20, 2008 at 11:51 AM

    Can i do a statistic of how many times one specific user visit one specific document?

    Now i use a statistics of KM, but i only make statistics about how many times all users visit one specific document.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Anna Maria,

      You can

      1. create a property for example.. hitCounter

      https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/4147

      2. ... then you have to program a repository service that use that property

      https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30143cc1-d176-2a10-55a3-ea498211e424

      and in the received method, count the hits (or users or whatever your need) for this specific resource.

      public void received(IEvent event) {

      IResourceEvent myEvent = (IResourceEvent) event;

      try {

      PropertyName propertyNameHitCount = new PropertyName(<NAMESPACE>,<HITCOUNT>);

      IResource res = myEvent.getResource();

      if (res.getProperty(propertyNameHitCount)!=null) {

      IProperty oldHitCount = res.getProperty(propertyNameHitCount);

      String sOldHitCount = oldHitCount.getValueAsString();

      int iOldHitCount = Integer.parseInt(sOldHitCount);

      iOldHitCount++;

      Property propHitCount = new Property(propertyNameHitCount,new Integer(iOldHitCount));

      res.setProperty(propHitCount);

      }else{

      Property propHitCount = new Property(propertyNameHitCount,new Integer(1));

      res.setProperty(propHitCount);

      }

      Regads

      DV

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.