How to Make Usage Analytics Work in SharePoint 2016

In this post I’m going to show you how to fix an issue in SharePoint 2016 that prevents usage reports from being correctly updated.


We have a SharePoint 2016 site and we need to show users the usage reports.


The obvious solution would be to use the out of the box SharePoint 2016 Excel usage reports to do that… Unfortunately when we open them we always find all zeros, no matter how many users have interacted with the site and how many documents have been opened.


Although we have correctly enabled Usage and Health Data Collection for the right events in Central Administration nothing happens.


After some research we found that in our fresh new installation of SharePoint 2016 the usage event receivers assemblies were wrong, version instead of version

A really tricky bug that fortunately in our case was successfully fixed by a few Powershell commands and some patience to wait data to be collected and reports to be updated.


1. Get Usage Analytics Event Receivers

Run the SharePoint 2016 Management Shell as Administrator and run the following Powershell commands to get the “AnalyticsCustomRequestUsageReceiver” and the “ViewRequestUsageReceiver” event receivers.

#Get AnalyticsCustomRequestUsageReceiver event receiver
$ad = Get-SPUsageDefinition | where {$_.Name -like "Analytics*"}
$vru = $ad.Receivers
#Get AnalyticsCustomRequestUsageReceiver event receiver
$pd = Get-SPUsageDefinition | where {$_.Name -like "Page Requests"}
$pru = $pd.Receivers

2. Check Usage Analytics Event Receivers Assembly Version

Once you get the event receivers, check for each one that the “ReceiverAssembly” property contains the correct assembly version.

For a SharePoint 2016 environment the correct assembly version must be as shown in the picture below.


3. Delete the Wrong Event Receivers

If you are in a SharePoint 2016 environment and the event receivers assembly version is not (for example it is you must delete them executing the following Poweshell commands.

#If the receivers assembly is wrong, delete them using the script below

4. Recreate the correct Event Receivers

Now we need to recreate the correct event receivers (assembly version executing the following commands.

#Create the correct event receivers

5. Run Usage Analysis and Import

Finally, we need to start the usage analysis and import as described below.

#Start usage analysis
$a = Get-SPTimerJob -Type Microsoft.Office.Server.Search.Analytics.AnalyticsJobDefinition
$sa = $a.GetAnalysis("Microsoft.Office.Server.Search.Analytics.SearchAnalyticsJob")
#Get Analysis info. Make sure to wait for 15 minutes as this will allow to complete the timer job properly
#Start the usage log file import timer job
$tj = Get-SPTimerJob -Identity ("job-usage-log-file-import")


Having done all the previous steps, we now need only to let the timer job “Microsoft SharePoint Foundation Usage Data Processing” complete as per its schedule (this will not work if you run it manually).

After that, we should be able to view the usage report data correctly updated.


Rumi’s Point







Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s