Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 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