On the Most Popular Items page, there are two time periods: Recent and Ever.
The Ever time period shows statistics from the first day a usage event was recorded. The Recent time period is by default set to the last 14 days. To view the default settings of a usage event, do the following:
1. On the server where SharePoint Server 2013 is installed, open the SharePoint 2013 Management Shell.
2. At the Windows PowerShell command prompt, type the following commands:
$SSP = Get-SPEnterpriseSearchServiceApplicationProxy
$tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)
$event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <EventTypeId> }
$event
<EventTypeId> is the numeric EventTypeId of the usage event that you want to view. In the example below, I want to view the Views event, so I entered 1.
The Recent time period is defined by the RecentPopularityTimeframe property. You can change the Recent time period to be anything between one and 14 days. To change the time period, do the following:
1. In the SharePoint 2013 Management Shell, at the Windows PowerShell command prompt, type these commands:
$SSP = Get-SPEnterpriseSearchServiceApplicationProxy
$tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)
$event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <EventTypeId> }
$event.RecentPopularityTimeFrame = <TimeFrame>
$tenantConfig.Update($SSP)
<EventTypeId> is the numeric EventTypeId of the usage event that you want to change, and <TimeFrame> is the new time period you want to set for the usage event.
In the example below, I wanted to change the Views Recent time to a week, so I entered 1 and 7.
2. To verify the change, at the Windows PowerShell command prompt, type the following command:
$event
Notice that the value for the RecentPopularityTimeframe parameter has changed to 7.
Narrow the Most Popular Items report to a specific attribute or category
Viewing
usage reports per usage event is useful when you want to find out how
visitors are interacting with your site. But many times you want to
narrow the report to a specific attribute or category, for example all
items that are on sale or all Laptops. To do this, you can use Keyword Query Language (KQL). If you don’t know KQL, don’t worry. You can easily narrow your Most Popular Items report without having much knowledge of KQL.In our Contoso catalog, we have a site column called RetOnSale. For each item, the value of RetOnSale specifies if the item is on sale or not.
To narrow the Most Popular Items report to only show items that are on sale, we’ll use the managed property that represents the RetOnSale site column. In our Contoso scenario, this is RetOnSale
In the Search Schema, we can see that the RetOnSale managed property is Queryable. This means that we can use it to narrow the Most Popular Items report.