Forum Discussion

micha80's avatar
micha80
Expert
10 years ago

User Metrics

Hello,

 

we want to rebuild the oublic and private statistics on the "my profile" page. Therefore I am loading the metrics with the following API call:

 

<#assign userMetrics=restadmin("/users/id/${userId.id}/metrics?restapi.response_style=view") />

 

The most values I can find inside the response but some of them I didn't find or I am not sure wether I took the correct values or not. Maybe someone could have a look and give me some feedback?

 

I added an Screen on which I marked all the questions with a number:

 

1. Where to get all received kudos for an user?

2. I could find overall reviews count but not "net" and "delete" value. On the original page these values exists.

3. I could find overall reviews_comments count but not "net" and "delete" value. On the original page these values exists.

4. I used "net_accepted_solutions". Is this the correct value?

5. I used "solutions_marked". Is this the correct value?

6. I used "solutions_unmarked". Is this the correct value?

7. Where to get all given kudos for an user?

8. Where to get the last IP address for an user?

9. Where to get the last used user agent for an user?

 

Many thanks,

Michael


my_profile.png
  • Hallo Michael,

     

    General comment on metrics: Sometimes API metrics are a bit different for some users when you check them on their profile page vs API result. I guess it could happen if they performed actions on private boards or nodes where the "" feature is enabled.

     

    Let me try to answer your questions point by point:

    1. All kudos received: This should be "net_kudos_events_received" (as it's taking the kudo weight of the kudo giving user into account) - "kudos_events_received" are the number of kudo clicks, irregardless of the kudos weight. 
    2. I cannot even find overall reviews count but not "net" and "delete" value on the original profile page. Where do you see it? This metric is only there for replies, blog articles and ideas.
    3. Same as above
    4. "net_accepted_solutions" is correct for the number of accepted solutions this user authored, yes.
    5. "solutions_marked" is correct for the number of solutions this user marked themselves
    6. "solutions_unmarked" is coorect for the number of solutions this user went in and marked as "Not the solution" later, yes.
    7. Isn't that the same as 1.? Or do I misunderstand you here and you mean "Kudos given by this user"? For this there would be again two metrics, one taking the kudos weight into account "net_kudos_weight_given", the other only looking at the number of kudo click event "kudos_events_given"
    8. Don't know where to get the IP from.
    9. Don't know where to get last used agent from.

     

    For 8 and 9 you might want to drop a request in the Lithium product ideation explaining your use case.

    • micha80's avatar
      micha80
      Expert

      Hi Claudius,

       

      thanks for your reply! Below are my answers:

       

      1. When I look into the original page (user/viewprofilepage/user-id/19) my user has 40 Kudos received. But when I have a look into the metrics data the value for "net_kudos_events_received" is 62. So there is a difference. Any other tip how to calc this?

       

      2. I added a screen (CB_Lithium_Point_2_and_3.png) from the original page (user/viewprofilepage/user-id/19) and highlighted the area I mean. (I am logged in as an admin and looking my profile page.)

       

      3. Same as above.

       

      4. Ok.

       

      5. Ok.

       

      6. Ok.

       

      7. Yes, I mean "Kudos given by this user". But as described in 1 I could not find the correct value. On the original page (user/viewprofilepage/user-id/19) the user has 2 Kudos given. In the metrics the value for "net_kudos_weight_given" and "kudos_events_given" are both 18. So I could not calculate anything with the result of 2. Any hints on this?

       

      8. Ok, so I hope a Lithium moderator can answer this.

       

      9. Ok, so I hope a Lithium moderator can answer this.

       

      Thank you very much for your help!

       

      Regards,

      Michael


      CB_Lithium_Point_2_and_3.png