Custom site metrics data
-
2012年4月9日 5:18
Hi,
I have a site collection with a pages library.
I need to show a report for all the items in the library in the below manner
Total Hits per file (file refers to the item in the library)
Unique users per file
Likes per file
Comments per file
I guess I need to build a custom web part to fulfill the above requirement. How can I get started?
Need some guidance.
全部回复
-
2012年4月9日 6:26
Hi ,
you can get some information from Web analytics service and Usage data , check this
Regards, Fadi Abdulwahab. http://blogs.msdn.com/b/fabdulwahab http://sqlgoogler.blogspot.com/ Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you
-
2012年4月9日 7:28This is for bringing up the OoB web part but I am looking at doing some customization. I need to restrict the scope to the Pages library and also need to take a metrics of the number of "Likes" each item in the Pages library has received.
-
2012年4月9日 7:38
yes the above solution has limitation but you need to gathering statistics using server object model , for example you can build windows service which collect data from sites and libraries and save it to custom database and then you can show statistics as desired.
Regards, Fadi Abdulwahab. http://blogs.msdn.com/b/fabdulwahab http://sqlgoogler.blogspot.com/ Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you
-
2012年4月9日 8:13I just have to collect data for one site collection's Pages library. For this I dont want to create a windows service but I would like to get the job done with a custom web part that would use server object model. I came across SPUsageReceiver class, can I get some help from this?
-
2012年4月9日 8:30
Hi ,
1- you can start with this
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getusagedata.aspx but as i told you this only give some reports
2- you can't gathering the data and at the same time show the statistics because this will cause performance issues so you have to divide it into two steps (first gathering the data using windows service , job timer ,.. and then show the statistics from the database).
Regards, Fadi Abdulwahab. http://blogs.msdn.com/b/fabdulwahab http://sqlgoogler.blogspot.com/ Please click "Propose As Answer" if a post solves your problem or "Vote As Helpful" if a post has been useful to you
-
2012年4月10日 4:38版主
besides the SPWeb.GetUsageData (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.getusagedata.aspx) method, you also need social data api: http://msdn.microsoft.com/en-us/library/ee559383.aspx;
For example: http://msdn.microsoft.com/en-us/library/ff512779.aspx;
- 已标记为答案 GuYumingMicrosoft Contingent Staff, Moderator 2012年5月1日 9:09
-
2012年4月10日 6:41
Hi GuYuming,
Thanks for your help.
I am good at finding the Likes count and the comments count for each of the aspx pages in my Pages Library.
Now I need to find the hits and unique users for the aspx pages. Will GetUsageData help me out? Can I get unique users from this? -
2012年5月1日 9:08版主
you can build your own metrics from data in WSS_Logging database: http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/8ba7b6e9-0b5d-4c4b-bd66-d2c72bb538b3/
Now, after SQL Server 2012 release, i would suggest you to try column store index (http://msdn.microsoft.com/en-us/library/gg492088.aspx) on WSS_Logging database. And query with T-SQL.

