Issue - Popularity trends or usage data is not working in any SharePoint 2016 environment.

All the search related reports are showing the data but no Analytics related data is getting displayed in the report. We are getting 0s in every report.

We learned that SharePoint 2013 Analytics is now the part of Search Service Application. The process of how analytics works -

Troubleshooting

Root Cause

As we have seen in the ULS logs that Event Receivers for both the usage definitions are disabled. I think this is because we do not have the Search service application in the content farm so SharePoint does not enable these event receivers as these required search service application.

Resolution

We have to enable both the Event Receivers and attach it to Usage Service application in the Content Farm. Please follow these steps.

Enabling the Event Receivers

Let's enable the event receivers, We have to run the command in the Content Farm.

Page Requests

Run the below PowerShell in Content farm: for enabling the event receivers,

  1. $prud = Get - SPUsageDefinition | where {
  2. $_.Name - like "Page Requests"
  3. }
  4. $prud.EnableReceivers = $true
  5. $prud.Enabled = $true
  6. $prud.Update()
  7. $aud = Get - SPUsageDefinition | where {
  8. $_.Name - like "Page Requests*"
  9. }
  10. $aud | fl
SharePoint

For Analytics

Attaching Event Receivers

Page Requests

For Analytics,

Now, let us wait for 24 hours and everything will be working as expected.