Sharepoint - SharePoint 2013 Usage Reports - where are the details?

I think the Usage Service Application (on which the Usage Report is based) is still in there in 2013, which (once configured) will pile lots of information - amongst other things, Requests - into a SQL Database called 'WSS_Logging', and included is a view called RequestUsage.

If you use this for usage analytics, you might have to build upon that SQL view though, (write another that selects from it) that will exclude irrelevant data - as this captures EVERYTHING requested - images, css, javascript, web services, etc. from all accounts in the farm.

Here's more info on that Database from TechNet. Note it's referring to SP2010, but I think the service app is still there in SP2013... http://technet.microsoft.com/en-us/library/hh769360(v=office.14).aspx


I received official word from Microsoft that this is all we get: multiple reports for search queries and "Popular Items". The "Usage" report only displays the number of users per week/month.

For other reports where there are gaps with 2010, there are a couple of ways that you could consider providing alternatives. One would be to create reports of the logging DB, the other would be to look at creating one or more custom analytics events. This requires writing code that inherits from the AnalyticsEventTypeDefinition class and when you have an event occur that you want added to the analytics system, write an entry to the .usage file. It will then get rolled up and we provide a COUNT of them per item, site and tenant (by default there’s one tenant per on-premise farm).

Yet another way I have found is to leverage the IIS logs for more in depth reporting. Quite interesting for that purpose is the SharePoint flavored Weblog reader which aggregates stuff nicely. There might be other third party tools, but I was surprised how much information the tool could already gather in its simple form.

Of course it is always possible to include a web based analytics system such as Piwik - all we'd have to do is include the JavaScript in the master page and we'd be good to go.


in 2010 in WSS_logging database there is an StoredProcedure which teaches you a lot:

[dbo].[proc_GetMostActiveUsers]

for example from this i created below custom report which i needed to get the last access or loggin time of almost all users:

DECLARE @StartTime DATETIME     = DATEADD(MONTH, -12, GETDATE()) ,
    @EndTime DATETIME     = GETDATE();

SELECT  UserLogin AS [User] ,
        COUNT(RowId) AS Hits ,
        MAX(LogTime) AS LastAccessTime
FROM    [dbo].[RequestUsage] WITH ( READPAST )
WHERE   PartitionId IN (
        SELECT  PartitionId
        FROM    dbo.fn_PartitionIdRangeMonthly(@StartTime, @EndTime) )
        AND LogTime BETWEEN @StartTime AND @EndTime
        AND WebApplicationId IN ( '7de7dd3e-fda6-4ec2-9f39-dfc80c735cd1',
                                  'df6fd2f3-9311-4e63-8bb2-1e4190c9029d' )
        AND UserLogin IS NOT NULL
        AND DATALENGTH(UserLogin) > 0
GROUP BY UserLogIn
ORDER BY lastaccesstime DESC

Tags: