From quite some time, I was trying to find ways to customize the SharePoint 2010 Web Analytics to capture the usage of Internal SharePoint solutions.
With SharePoint Web Analytics, Users will be able to find the following three categories of reports out of the box from SP2010 (More Details) but I wanted to find out the customization details of this functionality so I can capture the data my way and create my own reports.
- Number of Page Views
- Top Referrers
- Top Visitors
- Number of Daily Unique Visitors, Top Destinations, Top Browsers, etc.
- Top Queries
- Number of Queries
- Failed Queries
- Best Bet Usage, Search keywords, etc.
- Total disk drive space usage
- Number of Site Collections
- Top Site Product Versions, Top Site Languages, etc.
The web analytics data comes from the request usage & It implements a usage receiver. From reflector we can see that SPUsageReceiver is an abstract class and we can write our own solution to override this class. We can create an usage receiver so that we can check every incoming request and store the statistics that we would like to. The receiver is going to be called when Usage Import job is executed.
Custom Usage Receiver
You can register your custom usage receiver like below,