<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>SharePoint IT Pro Blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/tothesharepoint/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/feed.xml</link>
    <description>Brought to you by Microsoft teams working on SharePoint IT Professional content</description>
    <lastBuildDate>Fri, 30 Sep 2016 11:21:46 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>SharePoint IT Pro Blog is being Consolidated</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/sharepoint-it-pro-blog-is-being-consolidated</link>
      <pubDate>Fri, 02 May 2014 13:50:52 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Blog Admin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/05/02/sharepoint-it-pro-blog-is-being-consolidated/</guid>
      <description><![CDATA[To all the loyal SharePoint enthusiasts who have come to know and love the SharePoint IT Pro Blog,...]]></description>
      <content:encoded><![CDATA[<p>To all the loyal SharePoint enthusiasts who have come to know and love the SharePoint IT Pro Blog, thank you for all your past comments and engagement with us. This blog would not have continued to thrive without your participation. However, as Microsoft moves toward frequent updates across all Office products, we&rsquo;ve decided to consolidate our posts into the Office blogs platform to make it easier on you to find information across all Office applications. As of today, there will no longer be new posts to the SharePoint IT Pro Blog. To find the latest news and announcements related to SharePoint, please refer to Office Blogs at <a title="blogs.office.com" href="https://blogs.office.com/" target="_blank">blogs.office.com</a>.<p>Please see <a title="this post " href="https://blogs.office.com/2014/01/20/welcome-to-the-new-office-blogs/" target="_blank">this post </a>on the new Office blog for information on how to filter and personalize the site for the specific content that you want to see.</p><p>Thank you and we look forward to reading and responding to your comments on Office blogs!</p><p>-- The SharePoint IT Pro Blog&nbsp;team</p></p>
]]></content:encoded>
    </item>
    <item>
      <title>Building a disaster recovery environment for SharePoint in Windows Azure--a few things we learned</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/building-a-disaster-recovery-environment-for-sharepoint-in-windows-azure-a-few-things-we-learned</link>
      <pubDate>Thu, 27 Feb 2014 19:31:42 GMT</pubDate>
      <dc:creator><![CDATA[Brenda Carter [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/02/27/building-a-disaster-recovery-environment-for-sharepoint-in-windows-azure-a-few-things-we-learned/</guid>
      <description><![CDATA[My team is wrapping up a proof of concept (POC) build of an intriguing solution&mdash;disaster...]]></description>
      <content:encoded><![CDATA[<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">My team is wrapping up a proof of concept (POC) build of an intriguing solution&mdash;<a href="https://technet.microsoft.com/en-us/library/dn635313(v=office.15).aspx">disaster recovery of a SharePoint on-premises farm to Windows Azure IaaS</a>. We learned a lot about the Azure infrastructure, including how to place a SharePoint environment across the Azure IaaS architecture and how to manage the environment from day-to-day. </span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">The solution requires a site-to-site VPN connection to Windows Azure. SQL Server log shipping and Distributed File System Replication (DFSR) are used to move SharePoint databases from the on-premises environment to Azure. Our Azure environment looks similar to this reference architecture.</span></p>
<p><span style="font-family:Times New Roman;font-size:medium;"> </span><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Blog_AzureDR.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Blog_5F00_AzureDR.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Blog_AzureDR.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Blog_5F00_AzureDR.png" border="0" /></a></p>
<p></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;"><span style="font-size:medium;">The file share serves double duty running both DFSR and serving as the 3</span><sup><span style="font-size:small;">rd</span></sup><span style="font-size:medium;"> node of a Node Majority for SQL Server AlwaysOn.</span></span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">One lesson we learned is to design the entire architecture BEFORE creating VMs in Azure. Hopefully we have done most of the &lsquo;learn by doing&rsquo; for you in this category. For us, changing the configuration of availability sets and cloud services involved throwing away one set of VMs and starting over. There&rsquo;s no need for you to experience this pain. In partnership with the Azure Center of Excellence and a few of our best SharePoint field experts, we settled on some best practices for architecture that are described in <a href="https://technet.microsoft.com/en-us/library/dn635309(v=office.15).aspx">Windows Azure Architectures for SharePoint 2013</a>. These best practices can be applied to any SharePoint solution in Azure.</span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">As we wrap up this project we are capturing some of the operational issues and best practices that we learned. One of them is to monitor and manage time sync issues between the on-premises and Azure environment. We ran into at least one issue that was solved by adhering to best practices in this category. We hope to publish more operational guidance soon.</span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">Finally, I&rsquo;ll reiterate a best practice I learned from Mark Russinovich, Technical Fellow in the Cloud and Enterprise Division at Microsoft. Create the largest VM in your Windows Azure environment that you plan to use first. This ensures your solution lands on a &ldquo;stamp&rdquo; that allows the largest size you need. This size issue may not be a problem at some point in the future of Azure. However, my team confirmed that this was necessary for our environment. </span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">For more information see: <a href="https://technet.microsoft.com/en-us/library/dn635313(v=office.15).aspx">SharePoint Disaster Recovery in Windows Azure</a>. </span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">To learn more about setting up the site-to-site VPN connection, see <a href="https://technet.microsoft.com/en-us/library/dn635310(v=office.15).aspx">Deploy Office 365 Directory Synchronization in Windows Azure</a>. </span></p>
<p style="margin:0in 0in 10pt;"><span style="font-family:Calibri;font-size:medium;">For more information on DR planning, see Brian Lewis&#39; blog series: <a href="https://mythoughtsonit.com/2014/02/intro-to-series-disaster-recovery-planning-for-i-t-pros">Disaster Recovery Planning for IT Pros</a>.<br /></span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>View and configure usage analytics reports in SharePoint Server 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/view-and-configure-usage-analytics-reports-in-sharepoint-server-2013</link>
      <pubDate>Thu, 23 Jan 2014 06:04:14 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/01/28/view-and-configure-usage-analytics-reports-in-sharepoint-server-2013/</guid>
      <description><![CDATA[This is a blog post in the series &ldquo;How to display Recommendations and Popular items on a...]]></description>
      <content:encoded><![CDATA[<p>This is a blog post in the series &ldquo;<a target="_blank" href="/b/tothesharepoint/archive/2014/01/15/how-to-display-recommendations-and-popular-items-on-a-sharepoint-server-2013-site.aspx">How to display Recommendations and Popular items on a website</a>&rdquo;. In the previous post, I showed you how to display recommendations on a website with <a target="_blank" href="/b/tothesharepoint/archive/2014/01/23/use-recommendations-and-popular-items-on-websites-with-anonymous-users-in-sharepoint-server-2013.aspx">anonymous users</a>. In this blog post:</p>
<ul>
<li><a href="#About">About the usage analytics reports</a></li>
<li><a href="#ViewMPI">View the Most Popular Items report for a catalog</a></li>
<li><a href="#TimePeriod">Change the Recent time period for a usage event</a></li>
<li><a href="#Narrow">Narrow the Most Popular Items report to a specific attribute or category</a></li>
<li><a href="#ViewPT">View the Popularity Trends report for an item</a></li>
<li><a href="#TailTrimming">About the TailTrimming parameter</a></li>
</ul>
<p></p>
<p><span style="font-size:medium;color:#333333;"><strong><a id="About"></a>About the usage analytics reports</strong></span><br />The usage analytics reports show statistics of how visitors have interacted with the content on your website, for example which item has been viewed the most. The reports are broken down per usage event. This means that by default you&rsquo;ll be able to see:</p>
<ul>
<li>The number of <em>views</em> for an item.</li>
<li>The number of <em>recommendations displayed</em> per item.</li>
<li>The number of <em>recommendations clicked</em> per item.</li>
</ul>
<p>SharePoint Server 2013 creates two usage analytics reports:</p>
<ul>
<li>Most Popular Items &ndash; shows usage event statistics for all items in a library or list.</li>
<li>Popularity Trends &ndash; shows usage event statistics for an item, a site or a site collection.</li>
</ul>
<p>The reports are automatically updated once every 24 hour when the usage analytics job is run. <br /><br /></p>
<p><a id="ViewMPI"></a><strong><span style="font-size:medium;color:#333333;">View the Most Popular Items report for a catalog</span></strong><br />In a cross-site publishing scenario where you are displaying catalog content on a Publishing site, you view the Most Popular Items report on your authoring site. Do the following:<br /><br />1.&nbsp; On your Authoring site, go to your catalog.<br />2.&nbsp; Click the <strong>LIST</strong> tab &ndash;&gt; <strong>Most Popular Items</strong>.<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/MostPopularItemsIcon.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/MostPopularItemsIcon.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/MostPopularItemsIcon.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/MostPopularItemsIcon.png" alt="Most Popular Items icon" border="0" /></a></p>
<p>3.&nbsp; On the <strong>Most Popular Items</strong> page, use the menu to select which usage event you want to view statistics for.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/UsageEventPullDown.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/UsageEventPullDown.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/UsageEventPullDown.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/UsageEventPullDown.png" alt="Select usage event" border="0" /></a></p>
<p>Note: You can view statistics for the <em>Recommendations Displays</em> usage event in the <a href="#ViewPT">Popularity Trends</a> report.</p>
<p></p>
<p><a id="TimePeriod"></a><strong><span style="font-size:medium;color:#333333;">Change the Recent time period for a usage event</span></strong><br />On the <strong>Most Popular Items</strong> page, there are two time periods: <strong>Recent</strong> and <strong>Ever</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RecentEver.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RecentEver.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RecentEver.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RecentEver.png" alt="Time periods for Most Popular Items report" border="0" /></a></p>
<p>The <strong>Ever</strong> time period shows statistics from the first day a usage event was recorded. The <strong>Recent</strong> time period is by default set to the last 14 days. To view the default settings of a usage event, do the following:</p>
<p>1.&nbsp; On the server where SharePoint Server 2013 is installed, open the <strong>SharePoint 2013 Management Shell</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/4530.Shell.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/4530.Shell.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/4530.Shell.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/4530.Shell.png" alt="SharePoint 2013 Management Shell" border="0" /></a></p>
<p>2.&nbsp; At the Windows PowerShell command prompt, type the following commands:</p>
<p><span style="font-family:courier new,courier;">$SSP = Get-SPEnterpriseSearchServiceApplicationProxy</span><br /><span style="font-family:courier new,courier;">$tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)</span><br /><span style="font-family:courier new,courier;">$event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <span style="background-color:#ffff99;">&lt;EventTypeId&gt;</span> }</span><br /><span style="font-family:courier new,courier;">$event</span><br /><br /></p>
<p><em>&lt;EventTypeId&gt;</em> is the numeric <a target="_blank" href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#DefaultUsageEvents">EventTypeId </a>of the usage event that you want to view. In the example below, I want to view the <em>Views</em> event, so I entered <em>1</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/DefaultRecentPopularityTimeFrame.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/DefaultRecentPopularityTimeFrame.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/DefaultRecentPopularityTimeFrame.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/DefaultRecentPopularityTimeFrame.png" alt="View RecentPopularityTimeframe property" border="0" /></a></p>
<p>The <strong>Recent</strong> time period is defined by the <em>RecentPopularityTimeframe</em> property. You can change the <strong>Recent</strong> time period to be anything between one and 14 days. To change the time period, do the following:</p>
<p>1.&nbsp; In the SharePoint 2013 Management Shell, at the Windows PowerShell command prompt, type these commands:</p>
<p><span style="font-family:courier new,courier;">$SSP = Get-SPEnterpriseSearchServiceApplicationProxy</span><br /><span style="font-family:courier new,courier;">$tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)</span><br /><span style="font-family:courier new,courier;">$event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <span style="background-color:#ffff99;">&lt;EventTypeId&gt;</span> }</span><br /><span style="font-family:courier new,courier;">$event.RecentPopularityTimeFrame = <span style="background-color:#ffff99;">&lt;TimeFrame&gt;</span></span><br /><span style="font-family:courier new,courier;">$tenantConfig.Update($SSP)</span></p>
<p><em>&lt;EventTypeId&gt;</em> is the numeric <a target="_blank" href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#DefaultUsageEvents">EventTypeId </a>of the usage event that you want to change, and <em>&lt;TimeFrame&gt;</em> is the new time period you want to set for the usage event. <br /><br />In the example below, I wanted to change the <em>Views</em> <strong>Recent</strong> time to a week, so I entered <em>1</em> and <em>7</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/5025.SetRecentTo7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/5025.SetRecentTo7.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/5025.SetRecentTo7.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/5025.SetRecentTo7.png" alt="Change ReceRecentPopularityTimeframe property" border="0" /></a></p>
<p>2.&nbsp; To verify the change, at the Windows PowerShell command prompt, type the following command:<br /><span style="font-family:courier new,courier;"><br />$event</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8032.RecentPopularitySetTo7.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8032.RecentPopularitySetTo7.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8032.RecentPopularitySetTo7.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8032.RecentPopularitySetTo7.png" alt="RecentPopularityTimeframe parameter set to 7" border="0" /></a></p>
<p>Notice that the value for the <em>RecentPopularityTimeframe</em> parameter has changed to <em>7</em>.<br /><br /></p>
<p><a id="Narrow"></a><span style="font-size:medium;"><strong><span style="color:#333333;">Narrow the Most Popular Items report to a specific attribute or category</span></strong></span><br />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 <a target="_blank" href="https://msdn.microsoft.com/en-us/library/office/ee558911.aspx">Keyword Query Language (KQL)</a>. If you don&rsquo;t know KQL, don&rsquo;t worry. You can easily narrow your Most Popular Items report without having much knowledge of KQL.</p>
<p>&nbsp;In our Contoso catalog, we have a site column called <em>RetOnSale</em>. For each item, the value of <em>RetOnSale</em> specifies if the item is on sale or not. <br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RetOnSaleColumn.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RetOnSaleColumn.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RetOnSaleColumn.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RetOnSaleColumn.png" alt="RetOnSale site column " border="0" /></a></p>
<p>To narrow the Most Popular Items report to only show items that are on sale, we&rsquo;ll use the managed property that represents the <em>RetOnSale</em> site column. In our Contoso scenario, this is <em>RetOnSale</em> (in <a target="_blank" href="/b/tothesharepoint/archive/2013/09/11/how-to-display-values-from-custom-managed-properties-in-search-results-option-1.aspx#FindMPName">another blog post </a>I explain how you can find a managed property name).<br /><br />In the Search Schema, we can see that the <em>RetOnSale</em> managed property is <em>Queryable</em>. This means that we can use it to narrow the Most Popular Items report.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RetOnSaleQuery.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RetOnSaleQuery.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RetOnSaleQuery.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RetOnSaleQuery.png" alt="RetOnSale queryable " border="0" /></a></p>
<p>To see <em>Views</em> usage event statistics for items that are on sale, on the <strong>Most Popular Items</strong> page, select <strong>Most Views</strong>, and enter <em>RetOnSale=True</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RetOnSaleReport.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RetOnSaleReport.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RetOnSaleReport.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RetOnSaleReport.png" alt="Sort on RetOnSale value" border="0" /></a></p>
<p>And just like that, only items that are on sale are shown.<br /><br />You can also narrow usage event statistics to a specific category, for example all <em>Laptops</em>. In our Contoso scenario, the <em>Item Category</em> site column is used to specify the category for each item.<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemCategorySiteColumn.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemCategorySiteColumn.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemCategorySiteColumn.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemCategorySiteColumn.png" alt="Item Category site colulmn" border="0" /></a></p>
<p>The managed property name of the <em>Item Category</em> column is <em>owstaxIdProductCatalogItemCategory</em>. The <em>owstaxIdProductCatalogItemCategory</em> managed property is <em>queryable</em>, which means that we can use it to narrow the Most Popular Items report.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/owstaxIdProductCatalogItemCategory.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/owstaxIdProductCatalogItemCategory.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/owstaxIdProductCatalogItemCategory.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/owstaxIdProductCatalogItemCategory.png" alt="owstaxIdProductCatalogItemCategory is queryable" border="0" /></a></p>
<p>To see which laptops are viewed most by visitors, on the <strong>Most Popular Items</strong> page, select <strong>Most Views</strong>, and enter <em>owstaxIdProductCatalogItemCategory:Laptops</em></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LaptopViews.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LaptopViews.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LaptopViews.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LaptopViews.png" alt="Sort on owstaxIdProductCatalogItemCategory" border="0" /></a></p>
<p>By narrowing the <em>Views</em> usage event statistics to a specific category, we can verify that the <strong>Popular Items Web Part</strong> is working correctly on our publishing site. For example, on the <em>Laptops</em> page, notice that the three items that are displayed in the<strong> Popular Items Web Part</strong> are the same that are shown to have the most <em>Views</em> in the Most Popular Items report that we just narrowed to <em>Laptops</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsPublishingAndReport.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsPublishingAndReport.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsPublishingAndReport.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsPublishingAndReport.png" alt="Verify  most Views" border="0" /></a></p>
<p></p>
<p><a id="ViewPT"></a><strong><span style="color:#333333;font-size:medium;">View the Popularity Trends report for an item</span></strong><br />There are two ways you can access the Popularity Trends report for an item:</p>
<p>a.&nbsp; On your catalog, select the item for which want to view the Popularity Trends report. In the ribbon, click <strong>ITEMS</strong> --&gt; <strong>Popularity Trends</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularityTrendsIcon.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularityTrendsIcon.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularityTrendsIcon.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularityTrendsIcon.png" alt="Popularity Trends icon" border="0" /></a></p>
<p>b.&nbsp; On the <strong>Most Popular Items</strong> page, click <strong>Popularity Trends</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularityTrendsLink.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularityTrendsLink.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularityTrendsLink.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularityTrendsLink.png" alt="Popularity trends link" border="0" /></a></p>
<p>Both of these options will open a Microsoft Excel sheet where you can view the daily and monthly statistics for the item. Each usage event is shown in a separate tab.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularityTrendsReport.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularityTrendsReport.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularityTrendsReport.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularityTrendsReport.png" alt="Popularity Trends report" border="0" /></a></p>
<p></p>
<p><a id="TailTrimming"></a><span style="font-size:medium;"><strong><span style="color:#333333;">About the TailTrimming parameter</span></strong></span><br />While we&rsquo;re on the subject of usage analytics reports, one usage event parameter that is worth mentioning is <em>TailTrimming</em>. This parameter specifies when the numbers that are shown in the usage analytics reports should be updated. <br /><br /><strong>IMPORTANT:</strong> This parameter does not affect how recommendations are calculated.</p>
<p>For example, for the <em>Views</em> usage event the <em>TailTrimming</em> parameter is by default set to 3.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/TailTrimming3.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/TailTrimming3.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/TailTrimming3.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/TailTrimming3.png" alt="TailTrimming parameter is 3" border="0" /></a></p>
<p>This means that the usage analytics reports will be updated for an item when the item has been viewed <span style="text-decoration:underline;">a minimum three times</span> within the last 24 hours. For example, if the item <em>Fabrikam Laptop16 M6000</em> has been viewed twice within the last 24 hours, these two views won&rsquo;t show up in the usage analytics reports. If within the next 24 hours the <em>Fabrikam Laptop16 M6000</em> item is viewed 4 times, the usage analytics report will be updated with 4 views.</p>
<p>The reason the <em>TailTrimming</em> parameter is set to 3 is to avoid having to update items that almost none of your website visitors are interacting with. By not updating these items, you reduce the load on your system. On the other hand, when the <em>TailTrimming</em> parameter is set to 3, the usage analytics reports can be somewhat inaccurate. In the example with the <em>Fabrikam Laptop16 M6000</em>, the two views in the first 24 hours will not show up in the usage analytic reports. Total number of views of <em>Fabrikam Laptop16 M6000</em> over the last 48 hours will show 4, but in reality, it was viewed 6 times.</p>
<p>If you want the usage analytics reports to be updated regardless of minimum amount of views within the last 24 hours, do the following:</p>
<p>1.&nbsp; In the SharePoint 2013 Management Shell, at the Windows PowerShell command prompt, type these commands:<br /><br /><span style="font-family:courier new,courier;">$SSP = Get-SPEnterpriseSearchServiceApplicationProxy</span><br /><span style="font-family:courier new,courier;">$tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)</span><br /><span style="font-family:courier new,courier;">$event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <span style="background-color:#ffff99;">&lt;EventTypeId&gt;</span> }</span><br /><span style="font-family:courier new,courier;">$event.TailTrimming = <span style="background-color:#ffff99;">&lt;TailTrimming&gt;</span></span><br /><span style="font-family:courier new,courier;">$tenantConfig.Update($SSP)</span><br /><br />Where <em>&lt;EventTypeId&gt;</em> is the numeric <a target="_blank" href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#DefaultUsageEvents">EventTypeId </a>of the usage event that you want to change, and <em>&lt;TailTrimming&gt;</em> is the minimum amount of times the usage event has to occur within 24 hours for the usage analytics reports to be updated.</p>
<p>In the example below I wanted the usage analytics reports for the <em>Views</em> usage event to be updated if a <em>Views</em> usage event occurs within 24 hours, so I entered <em>1</em> and <em>0</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ChangeTailTrimming.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ChangeTailTrimming.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ChangeTailTrimming.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ChangeTailTrimming.png" alt="Change TailTrimming parameter to 0" border="0" /></a></p>
<p>2.&nbsp; To verify the change, at the Windows PowerShell command prompt, type the following command:</p>
<p><span style="font-family:courier new,courier;">$event</span><br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/TailTrimmingChanged.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/TailTrimmingChanged.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/TailTrimmingChanged.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/TailTrimmingChanged.png" alt="Verify new TailTrimming parameter" border="0" /></a></p>
<p>Notice that the value of the <em>TailTrimming</em> parameter has changed to 0.<br /><br /><br /></p>
<p>So with that, this series has come to an end. Hopefully you now have a better understanding of how recommendations and popular items work, and can start adding them to your website.</p>]]></content:encoded>
    </item>
    <item>
      <title>Use recommendations and popular items on websites with anonymous users in SharePoint Server 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/use-recommendations-and-popular-items-on-websites-with-anonymous-users-in-sharepoint-server-2013</link>
      <pubDate>Wed, 22 Jan 2014 00:52:21 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/01/23/use-recommendations-and-popular-items-on-websites-with-anonymous-users-in-sharepoint-server-2013/</guid>
      <description><![CDATA[This is a blog post in the series &ldquo;How to display Recommendations and Popular items on a...]]></description>
      <content:encoded><![CDATA[<p>This is a blog post in the series &ldquo;<a target="_blank" href="/b/tothesharepoint/archive/2014/01/15/how-to-display-recommendations-and-popular-items-on-a-sharepoint-server-2013-site.aspx">How to display Recommendations and Popular items on a website</a>&rdquo;. In the previous post, I showed you how to add and <a target="_blank" href="/b/tothesharepoint/archive/2014/01/22/add-and-configure-the-recommended-items-and-popular-items-web-part-in-sharepoint-server-2013.aspx">configure the Recommended Items and Popular Items Web Part</a>. In this blog post:</p>
<ul>
<li><a href="#EnableCookies">Enable usage cookies to generate unique user IDs</a></li>
<li><a href="#EnableRecording">Enable the recording of a usage event for anonymous users</a><br /><br /></li>
</ul>
<p><strong>Note</strong>: The examples in this blog series are based on an on-premises installation.</p>
<p><a id="EnableCookies"></a><span style="font-size:medium;"><strong><span style="color:#333333;">Enable usage cookies to generate unique user IDs</span></strong></span><br />In an earlier blog post I described how I arranged a &ldquo;<a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#ClickParty">click party</a>&rdquo; to generate usage events. All users that participated in the &ldquo;click party&rdquo; were logged in. When users are logged in, each user has a unique user ID. In the event store file I was therefore able to verify that different user IDs were recorded for the usage events.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3632.ThreeUserIDs.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3632.ThreeUserIDs.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3632.ThreeUserIDs.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3632.ThreeUserIDs.png" alt="Three different user IDs" border="0" /></a></p>
<p>So how can usage events be recorded with a unique user ID when users are not logged in, that is, when they&rsquo;re anonymous visitors? The answer is usage cookies. By default, usage cookies are not enabled for a SharePoint web application, but you can enable them. These usage cookies generate a unique GUID that is used as a user ID when usage event data is processed. The GUID is available for the lifetime of the cookie. The lifetime of the cookie is 14 days.</p>
<p><span style="text-decoration:underline;"><strong>IMPORTANT</strong></span>: Local legal restrictions might apply when you enable usage cookies on websites that have anonymous users.</p>
<p>To enable usage cookies, do the following:</p>
<p>1.&nbsp; In Central Administration, click <strong>Manage web applications</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ManageWebApplications.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ManageWebApplications.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ManageWebApplications.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ManageWebApplications.png" alt="Manage web applications" border="0" /></a></p>
<p>2. Select the web application that contains your publishing site, and click <strong>General Settings</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GeneralSettings.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GeneralSettings.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GeneralSettings.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GeneralSettings.png" alt="General Settings" border="0" /></a></p>
<p>3.&nbsp; In the <strong>Web Application General Settings</strong> dialog box, in the<strong> Usage Cookie</strong> section, for <strong>Usage Cookie Status</strong>, click <strong>On</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/On.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/On.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/On.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/On.png" alt="Usage Cookie Status On" border="0" /></a></p>
<p>4.&nbsp; Click <b>OK</b> to save your changes.</p>
<p>To verify that the <em>Views</em> usage events were correctly recorded on my Contoso website, I asked two colleagues to click around on my Contoso Electronics website. They were both anonymous users. I then started search analytics, and pushed the usage events to the Event store (I showed you how to do this in an <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#PushEvents">earlier blog</a>. In the usage event file, I verified that two different user IDs had been recorded.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/TwoAnonymousUserIDs.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/TwoAnonymousUserIDs.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/TwoAnonymousUserIDs.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/TwoAnonymousUserIDs.png" alt="Two anonymous users" border="0" /></a></p>
<p></p>
<p><a id="EnableRecording"></a><span style="font-size:medium;"><strong><span style="color:#333333;">Enable the recording of a usage event for anonymous users</span></strong></span><br />When you enable usage cookies, only the <em>Views</em> usage event can be recorded for anonymous users. So, before you can record other usage events, for example <em>Recommendation Displays</em>, for anonymous users, you have to change a parameter value on the usage event.</p>
<p>The <em>Options</em> parameter specifies if the usage event can be recorded for anonymous users. For example, for the <em>Views</em> usage event, the <em>Options</em> parameter is set to <em>AllowAnonymousWrite</em> by default.&nbsp; This means that the <em>Views</em> usage event can be recorded for anonymous users. <br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/DefaultSettingsViews.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/DefaultSettingsViews.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/DefaultSettingsViews.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/DefaultSettingsViews.png" alt="Default Options parameter for Views usage event" border="0" /></a></p>
<p>For the<em> Recommendation Displays</em> usage event, the <em>Options</em> parameter is set to <em>None</em> by default.&nbsp; This means that the <em>Recommendation Displays</em> usage event can&rsquo;t be recorded for anonymous users.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/DefaultSettingsRecsDisp.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/DefaultSettingsRecsDisp.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/DefaultSettingsRecsDisp.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/DefaultSettingsRecsDisp.png" alt="Default Options parameter for Recommendation Display usage event " border="0" /></a></p>
<p>To enable the recording of a usage event for anonymous users, do the following:</p>
<p>1.&nbsp; On the server where SharePoint Server 2013 is installed, open the <strong>SharePoint 2013 Management Shell</strong>.<br />2.&nbsp; At the Windows PowerShell command prompt, type the following commands:</p>
<p><span style="font-family:courier new,courier;"># View the EventTypeId&rsquo;s for all usage events:</span><br /><span style="font-family:courier new,courier;">$SSP = Get-SPEnterpriseSearchServiceApplicationProxy</span><br /><span style="font-family:courier new,courier;">$SSP.GetAnalyticsEventTypeDefinitions([Guid]::Empty, 3) | ft</span><br /><br /><span style="font-family:courier new,courier;"># Get a usage event:</span><br /><span style="font-family:courier new,courier;">$tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)</span><br /><span style="font-family:courier new,courier;">$event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <span style="background-color:#ffff99;">&lt;EventTypeId&gt;</span> }</span></p>
<p><em>&lt;EventTypeID&gt;</em> is the number of the usage event that you want to enable for anonymous users, for example <em>2</em>, which is the <em>Recommendation Displays</em> usage event.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GetUsageEvent2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GetUsageEvent2.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GetUsageEvent2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GetUsageEvent2.png" alt="Get usage event 2" border="0" /></a></p>
<p><span style="font-family:courier new,courier;font-size:small;"># Enable the recording of a usage event for anonymous users:</span><br /><span style="font-family:courier new,courier;font-size:small;">$event.Options = [Microsoft.Office.Server.Search.Analytics.EventOptions]::<span style="font-family:arial,helvetica,sans-serif;"><span style="font-family:courier new,courier;">AllowAnonymous</span>Write</span></span><br /><span style="font-family:courier new,courier;font-size:small;">$tenantConfig.Update($SSP)</span></p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/AllowAnonymousWrite.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/AllowAnonymousWrite.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/AllowAnonymousWrite.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/AllowAnonymousWrite.png" alt="Enable recording for usage event 2" border="0" /></a></p>
<p><span style="font-family:courier new,courier;"># Verify that the recording of a usage event for anonymous users has been enabled:</span><br /><span style="font-family:courier new,courier;">$event</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LoggingOfAnonymousWrite.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LoggingOfAnonymousWrite.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LoggingOfAnonymousWrite.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LoggingOfAnonymousWrite.png" alt="Confirm changed Options parameter" border="0" /></a></p>
<p>After I enabled <em>Recommendations Displays</em> and <em>Recommendations Clicked</em> for anonymous users, I wanted to verify that these usage events were recorded. So, I again asked two colleagues to click around on my Contoso website. They were both anonymous users. I then started search analytics, and pushed the usage events to the Event store (I showed you how to do this in <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#PushEvents">an earlier blog)</a>. <br /><br />Remember, in the Event store, each usage event type will be recorded in a separate file. Each file name starts with the <em>EventTypeID</em>, so a file name that starts with <em>1</em> contains the <em>Views</em> usage events. A file name that starts with <em>2</em> contains the <em>Recommendations Displays</em> usage events etc.<br /><br />In the Event store, I verified that three usage event types were logged. Nice!</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ThreeUsageEventsRecorded.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ThreeUsageEventsRecorded.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ThreeUsageEventsRecorded.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ThreeUsageEventsRecorded.png" alt="Three usage event type files" border="0" /></a></p>
<p>So now you know how to configure and display recommendations and popular items on your website. If you want more details about the number of views for a specific item or category, you can do this by looking in the usage analytics reports on your catalog.&nbsp; I&rsquo;ll show you how you can do that in the next blog.</p>
<p><br /><strong>Next blog post in this series</strong><br /><a href="/b/tothesharepoint/archive/2014/01/28/view-and-configure-usage-analytics-reports-in-sharepoint-server-2013.aspx">View and configure usage analytics reports</a><br /><br /></p>]]></content:encoded>
    </item>
    <item>
      <title>Add and configure the Recommended Items and Popular Items Web Part in SharePoint Server 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/add-and-configure-the-recommended-items-and-popular-items-web-part-in-sharepoint-server-2013</link>
      <pubDate>Tue, 21 Jan 2014 02:23:47 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/01/22/add-and-configure-the-recommended-items-and-popular-items-web-part-in-sharepoint-server-2013/</guid>
      <description><![CDATA[This is a blog post in the series &ldquo;How to display Recommendations and Popular items on a...]]></description>
      <content:encoded><![CDATA[<p>This is a blog post in the series &ldquo;<a target="_blank" href="/b/tothesharepoint/archive/2014/01/15/how-to-display-recommendations-and-popular-items-on-a-sharepoint-server-2013-site.aspx">How to display Recommendations and Popular items on a website</a>&rdquo;. In the <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx">previous post</a>, I showed you how to modify the Content Search Web Part (CSWP) to log the <em>Views</em> usage event, and how you can use Windows PowerShell to start Usage analytics. In this blog post:</p>
<ul>
<li><a href="#AddRIWP">Add a Recommended Items Web Part to a page</a></li>
<li><a href="#recommendedfor">About the <em>recommendedfor</em> managed property</a></li>
<li><a href="#ConfigureRIWP">Configure the Recommended Items Web Part</a></li>
<li><a href="#AboutDisplayTemplate">About the display template that is used by the Recommended Items Web Part</a></li>
<li><a href="#AddPIWP">Add a Popular Items Web Part to a page</a></li>
<li><a href="#ConfigurePIWP">Configure the Popular Items Web Part</a></li>
</ul>
<p><strong>Note:</strong> The examples in this blog series are based on an on-premises installation.</p>
<p></p>
<p><a id="AddRIWP"></a><strong><span style="color:#333333;font-size:medium;">Add a Recommended Items Web Part to a page</span></strong><br />Navigate to the page where you want to add the Recommended Items Web Part (RIWP). In our Contoso scenario, we want to add the RIWP to our catalog item page. Do the following:</p>
<p>1.&nbsp; Select the <strong>Settings</strong> menu --&gt; <strong>Edit page</strong>.<br />2.&nbsp; In the Web Part Zone where you want to add the Web Part, select <strong>Add a Web Part</strong>.<br />3.&nbsp; In the <strong>Categories</strong> list, select <strong>Search-Driven Content</strong>.<br />4.&nbsp; In the <strong>Parts</strong> list, select <strong>Recommended Items</strong>, and then <strong>Add</strong>.</p>
<p>In our Contoso scenario, we&lsquo;ll show the RIWP below the CSWP.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RIWPadded.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RIWPadded.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RIWPadded.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RIWPadded.png" alt="RIWP added to item page" border="0" /></a></p>
<p></p>
<p><a id="recommendedfor"></a><span style="font-size:medium;"><strong><span style="color:#333333;">About the <em>recommendedfor</em> managed property</span></strong></span><br />In a previous blog post, I told you about the <a target="_blank" href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#UsageAnalyticsID"><em>UsageAnalyticsId</em></a> managed property that is used by Usage analytics to specify how recommendations between individual items should be calculated<span style="background-color:#00ff00;"></span>. The result of this calculation is sent to the <em>recommendedfor</em> managed property. The RIWP uses the <em>recommendedfor</em> managed property to query for recommendations. You don&rsquo;t need to know about this managed property when you configure the RIWP. But, to understand how the query in the RIWP works, it&rsquo;s important that you keep the <em>recommendedfor</em> managed property in mind.</p>
<p></p>
<p><a id="ConfigureRIWP"></a><strong><span style="color:#333333;font-size:medium;">Configure the Recommended Items Web Part</span></strong><br />When you configure the RIWP, you should configure it on an item details page where recommendations have been generated.&nbsp; Remember, in a previous blog post I told you how I generated recommendations by inviting some co-workers to a <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#ClickParty">&ldquo;click party.&rdquo;</a> <span style="background-color:#00ff00;"></span>At this &ldquo;click party&rdquo; I told my co-workers to click specific items so that recommendations would be generated. So, in our Contoso scenario, I added the RIWP to an item details page where I knew recommendations had been generated through the clicking of my co-workers.</p>
<p>Here&rsquo;s what you should do to configure the RIWP:</p>
<p>1.&nbsp; Select the <strong>Settings</strong> menu --&gt; <strong>Edit page</strong>.<br />2.&nbsp; In the RIWP, select the <strong>Web Part Menu</strong> --&gt; <strong>Edit Web Part</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8004.EditWP.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8004.EditWP.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8004.EditWP.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8004.EditWP.png" alt="Edit Web Part" border="0" /></a></p>
<p>3.&nbsp; In the Web Part tool pane, select <strong>Change query</strong>. This will open a dialog box.<br />4.&nbsp; In the <strong>Build Your Query</strong>dialog box, select the following:</p>
<ul>
<li>In the <strong>Get recommended items for</strong> section, select <strong>A token from the URL</strong> and then select from which URL value you want to get recommendations. In our Contoso scenario, we want to get recommendations from <strong>{URL.Token.2} (number)</strong>.</li>
<li>In the <strong>Restrict by app</strong> section, select <strong>Specify a URL</strong>, and then enter the URL of your catalog.</li>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RIWPQuery.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RIWPQuery.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RIWPQuery.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RIWPQuery.png" alt="Configure query for RIWP" border="0" /></a></p>
<p>So now you might be thinking &quot;OK, that was easy, but what does this actually mean?&quot; Well, understanding what this means is a bit complicated. So, let&rsquo;s take a deep breath and take a closer look.</p>
<ul>
<li><strong>A token from the URL</strong> means that we want to get recommendations for a value that is used in the URL.</li>
<li><strong>{URL.Token.2}</strong> is a query variable that represents the second value in the URL as counted from right to left. For example, in the URL <em>https://www.contoso.com/computers/desktops/5637145799/5637146352</em>, the query variable {URLToken.2} represents the value <em>5637145799</em>.&nbsp; Remember, when we <a target="_blank" href="/b/tothesharepoint/archive/2013/03/07/stage-5-connect-your-publishing-site-to-a-catalog.aspx#HowURLDetails">connected our publishing site to the catalog</a>, we specified that the value of <em>Group Number</em> should be used as the second to last value in the URL of our catalog item page. That means that the query variable<strong> {URL.Token.2}</strong> represents the value of<em> Group Number</em>.&nbsp; Also, we mapped <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#Mapping">UsageAnalyticsID to <em>Group Number</em></a> <span style="background-color:#00ff00;"></span>so that the Usage analytics calculation would be based on <em>Group Number</em>.&nbsp;</li>
<li><strong>Specify a URL</strong> means that we want to specify from which site we want to get recommendations, in this case our Authoring site.</li>
</ul>
<p>But from these settings, it&rsquo;s not clear which managed property is used in the query. So, to view more information about the query, select <strong>TEST</strong>. The query that is issued by the Web Part is shown in the <strong>Query text</strong> section.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/QueryText.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/QueryText.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/QueryText.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/QueryText.png" alt="Query text in RIWP" border="0" /></a></p>
<p>If we break this down, we get the following:</p>
<ul>
<li><strong>recommendedfor</strong> is the managed property that is used in the query.</li>
<li>The colon <strong>:</strong> means &ldquo;contains.&rdquo;</li>
<li><strong>5637145799</strong> is the value of the query variable {URL.Token.2}, which is a <em>Group Number</em> value.</li>
<li><strong>path:&quot;https://ib-perf-8/sites/catalog&quot;</strong> is the URL to our Authoring site.</li>
<li><strong>(IsDocument:&quot;True&quot; OR contentclass:&quot;STS_ListItem&quot;)</strong> narrows the search result down to only documents or list items.</li>
</ul>
<p>If we put all this information together, we can understand that the query means the following: <br /><br />From the <em>URL of the Authoring site</em>, search for <em>document or list items</em> where the value of the managed property <em>recommendedfor</em> contains the value that is currently used as the second value in the URL, counting from right to left. &nbsp;<br /><br />So, now we know what the query means. But we&rsquo;re not quite done with the configuration. In the <strong>SEARCH RESULT PREVIEW</strong> section, we can see that all items in a product group are displayed, for example all <em>SV Keyboard E10</em> (notice that they all have the same value for Group Number in the URL).</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2626.RecommendedItems.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2626.RecommendedItems.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2626.RecommendedItems.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2626.RecommendedItems.png" alt="Recommended items in groups" border="0" /></a></p>
<p>All items in the product group are shown because the Usage analytics calculation is done on the group level (remember, <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#Mapping">we mapped <em>UsageAnalyticsId</em> to <em>ows_ProductCatalogGroupNumber</em></a><span style="background-color:#00ff00;"></span>). But we only want to display one item per product group.</p>
<p>Luckily we can do this by grouping search results. To group search results, do the following:</p>
<p>5.&nbsp; Select <strong>REFINERS</strong> --&gt; <strong>Show more</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8053.ShowMore.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8053.ShowMore.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8053.ShowMore.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8053.ShowMore.png" alt="Select Show more on REFINERS tab" border="0" /></a></p>
<p>6.&nbsp; From the <strong>Group by</strong> menu, select <strong>Show all properties</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ShowAllProperties.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ShowAllProperties.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ShowAllProperties.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ShowAllProperties.png" alt="Show all properties for grouping results" border="0" /></a></p>
<p>7.&nbsp; We want to show only one item per product group, so we select <em>ProductCatalogGroupNumberOWSTEXT</em> (the managed property of <em>Group Number</em>). We only want to display one item per group, so we leave the value in <strong>Show there results </strong>as<strong> 1</strong>.</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GroupByGroupNumber.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GroupByGroupNumber.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GroupByGroupNumber.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GroupByGroupNumber.png" alt="Group by ProductCatalogGroupNumberOWSTEXT" border="0" /></a></p>
<p>In the <strong>SEARCH RESULT PREVIEW</strong>, we can now see that only one item per product group is shown.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/OneItemPerGroeu.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/OneItemPerGroeu.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/OneItemPerGroeu.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/OneItemPerGroeu.png" alt="One item per group is recommended" border="0" /></a></p>
<p>8.&nbsp; Select <strong>OK</strong> to save the changes.<br />9.&nbsp; In the Web Part tool pane, in the <strong>Number of items</strong> to show field, enter how many items you want to display in the Web Part.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/NumberOfItemsToShow.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/NumberOfItemsToShow.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/NumberOfItemsToShow.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/NumberOfItemsToShow.png" alt="Number of items to show" border="0" /></a></p>
<p>10.&nbsp; Select <strong>OK</strong>, and save the page.</p>
<p>Even though it doesn&rsquo;t <em>look</em> good, good recommendations are now displayed on our catalog item page.<br /><br /></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RecsShown.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RecsShown.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RecsShown.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RecsShown.png" alt="Recommendations displayed in Web Part" border="0" /></a></p>
<p></p>
<p><a id="AboutDisplayTemplate"></a><span style="font-size:medium;"><strong><span style="color:#333333;">About the display template that is used by the Recommended Items Web Part</span></strong></span><br />Just as you do with the Content Search Web Part (CSWP), you use display templates to control how content should be displayed in a RIWP. In an earlier blog post, I explained how you can <a target="_blank" href="/b/tothesharepoint/archive/2013/05/28/stage-11-upload-and-apply-display-templates-to-the-content-search-web-part.aspx">upload and apply display templates to the Content Search Web Part</a>. You can do the same for the RIWP, but the display template that is used by the RIWP contains important code that logs the two usage events<em> Recommendation Displayed</em> and <em>Recommendation Clicked</em>.&nbsp;</p>
<p>Remember, in an earlier blog I told you that there are <a target="_blank" href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#DefaultUsageEvents">three default usage events</a> in SharePoint Server 2013. The usage events <em>Recommendation Displayed</em> and <em>Recommendation Clicked</em> are used to record statistics of how visitors have interacted with the content on your website. When an item is displayed as a recommendation, a <em>Recommendation Displayed</em> usage event is recorded. When an item is clicked on when it is displayed as a recommendation, a <em>Recommendation Clicked</em> usage event is recorded. I will show you how you can view these statistics in a later blog post.&nbsp;</p>
<p>In the previous blog <span style="background-color:#00ff00;"></span>we modified the CSWP display template to<a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#ModifyCSWP"> log the <em>Views</em> usage event</a>. The logging of the <em>Recommendation Displayed</em> and <em>Recommendation Clicked</em> usage events are done in the RIWP. The default display template that is used by the RIWP is <em>Item_RecommendationsClickLogging</em>. This display template contains the two functions L<em>ogRecsViewToEventStore</em> and <em>LogRecsClickToEventStore</em>. These two functions log the <em>Recommendation Displayed</em> and <em>Recommendation Clicked</em> usage events.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LogRecsView.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LogRecsView.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LogRecsView.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LogRecsView.png" alt="LogRecsViewToEventStore function" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LogRecsClick.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LogRecsClick.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LogRecsClick.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LogRecsClick.png" alt="LogRecsClickToEventStore function " border="0" /></a></p>
<p>When you change your RIWP display template, you should copy the<em> Item_RecommendationsClickLogging</em> file, make changes to the copied version, and apply it to your RIWP. That way you don&rsquo;t have to worry about adding code in the same way that we did for the CSWP.</p>
<p>After applying the changed display template to the RIWP, the recommended items are displayed nicely.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RecsDisplayTemplateApplied.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RecsDisplayTemplateApplied.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RecsDisplayTemplateApplied.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RecsDisplayTemplateApplied.png" alt="Recommendations displayed with images" border="0" /></a></p>
<p></p>
<p><strong><span style="color:#333333;font-size:medium;"><a id="AddPIWP"></a>Add a Popular Items Web Part to a page</span></strong><br />You can display the most popular, that is, <span style="text-decoration:underline;">the most viewed</span>, items within your catalog by adding a Popular Items Web Part (PIWP) to your category page. It&rsquo;s important to understand that when you add a PIWP to your catalog page, the PIWP will automatically show the most viewed items <span style="text-decoration:underline;">within each category</span>. For example, if a visitor is viewing the <em>Cameras</em> category, the PIWP will show the most viewed items within the <em>Cameras</em> category. If a visitor is viewing the <em>Camcorders</em> category, the PIWP will show the most viewed items within the <em>Camcorders</em> category.</p>
<p>To add a PIWP, navigate to the page where you want to add the PIWP. In our Contoso scenario, we&rsquo;ll add a PIWP to our category page. Do the following:</p>
<p>1.&nbsp; Select the <strong>Settings</strong> menu --&gt; <strong>Edit page</strong>.<br />2.&nbsp; In the Web Part Zone where you want to add the Web Part, select <strong>Add a Web Part</strong>.<br />3.&nbsp; In the <strong>Categories</strong> list, select <strong>Search-Driven Content</strong>.<br />4.&nbsp; In the <strong>Parts</strong> list, select <strong>Popular Items</strong>, and then <strong>Add</strong>.</p>
<p>In our Contoso scenario, we&lsquo;ll show the PIWP above the CSWP.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsAdded.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsAdded.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsAdded.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsAdded.png" alt="PIWP added to page" border="0" /></a></p>
<p></p>
<p><span style="color:#333333;font-size:medium;"><strong><a id="ConfigurePIWP"></a>Configure the Popular Items Web Part</strong></span></p>
<p>1.&nbsp; Select the <strong>Settings</strong> menu --&gt; <strong>Edit page</strong>.<br />2.&nbsp; In the PIWP, select the <strong>Web Part Menu</strong> --&gt; <strong>Edit Web Part</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8666.EditPIWP.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8666.EditPIWP.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8666.EditPIWP.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8666.EditPIWP.png" alt="Edit Web Part" border="0" /></a></p>
<p>3.&nbsp; In the Web Part tool pane, select<strong> Change query</strong>. This will open a dialog box.<br />4.&nbsp; In the<strong> Restrict by app</strong> section, select <strong>Specify a URL</strong> and enter the URL of your Authoring site.<br />5.&nbsp; In the <strong>Restrict by</strong> tag section, select <strong>Restrict by current and child navigation terms</strong>.</p>
<p>No results are displayed in the <strong>SEARCH RESULT PREVIEW</strong> section. What&rsquo;s going on?</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/NoPopularResults2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/NoPopularResults2.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/NoPopularResults2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/NoPopularResults2.png" alt="No popular items returned" border="0" /></a></p>
<p>To find out more about the query that the PIWP issues, select <strong>TEST</strong>. On the <strong>TEST</strong> tab we can see the <strong>Query text</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PIWPQueryText.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PIWPQueryText.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PIWPQueryText.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PIWPQueryText.png" alt="Query text for PIWP" border="0" /></a></p>
<p>The query text means the following:</p>
<ul>
<li><strong>path:&quot;https://ib-perf-8/sites/catalog</strong>&quot; is the URL to our Authoring site.</li>
<li><strong>owstaxIdMetadataAllTagsInfo</strong> is the managed property that is used in the query.</li>
<li>The colon <strong>:</strong> means &ldquo;contains.&rdquo;</li>
<li>#91eb9f0d-3e5a-41a8-8487-78dfe234ca7c is the GUID of the current category. In this example the current category is <em>Cameras</em>.</li>
<li><strong>(IsDocument:&quot;True&quot; OR contentclass:&quot;STS_ListItem&quot;)</strong> narrows the search result down to only documents or list items.</li>
</ul>
<p>If we put this information together, we can understand that the query means the following:</p>
<p>From the <i>URL of the Authoring site</i>, search for <i>document or list items</i> where the value of the managed property <i>owstaxIdMetadataAllTagsInfo</i> contains the GUID of the current navigation category or any of the children of the current navigation.</p>
<p>An important piece of information that we can see in the query text is that the PIWP uses the&nbsp;<em>owstaxIdMetadataAllTagsInfo</em> managed property in its query. You can&rsquo;t change the query in the PIWP to use another managed property. That means that for the query in the PIWP to work correctly, the&nbsp;<em>owstaxIdMetadataAllTagsInfo</em> managed property needs to include the value of the managed property that we use to drive <a target="_blank" href="/b/tothesharepoint/archive/2013/04/17/stage-8-assign-a-category-page-and-a-catalog-item-page-to-a-term.aspx#ManagedNav">managed navigation</a>.&nbsp; In our Contoso scenario, the managed property that drives managed navigation is <em>owstaxIdProductCatalogItemCategory</em>. So, what we need to do is to map the crawled property of <em>owstaxIdProductCatalogItemCategory</em> to the <em>owstaxIdMetadataAllTagsInfo</em> managed property.&nbsp; <br /><br />I showed you how to map a crawled property to a managed property in <a target="_blank" href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx#Mapping">an earlier blog</a>. <br /><br /><span style="text-decoration:underline;"><strong>IMPORTANT:</strong></span> You have to do the mapping on the Authoring site.</p>
<p>In our Contoso scenario, the correctly mapped <em>owstaxIdMetadataAllTagsInfo</em> property looks like this:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/7633.NewMapping.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/7633.NewMapping.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/7633.NewMapping.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/7633.NewMapping.png" alt="New crawled property mapping" border="0" /></a></p>
<p>After you have changed the mapping of the property, you have to start a <a target="_blank" href="/b/tothesharepoint/archive/2013/03/05/stage-4-set-up-search-and-enable-the-crawling-of-your-catalog-content.aspx">full crawl</a>.</p>
<p>But there is one very important thing that you can&rsquo;t see in the query text, and that is how the search results are sorted. The PIWP sorts search results in a descending order on the <em>ViewsRecent</em> managed property. By default, the <em>ViewsRecent</em> managed property contains the number of views for an item within the last 14 days (I&rsquo;ll show you how you can change this to, for example, the last 7 days in another blog article). This means that the query issued by the PIWP will do the following:</p>
<p>From the <em>URL of the Authoring site</em>, search for <em>document or list items</em> where the value of the managed property <em>owstaxIdMetadataAllTagsInfo</em> contains the GUID of the current navigation category, or any of the children of the current navigation. Sort the search results in <em>descending order of views for the last 14 days</em>.</p>
<p>When the full crawl has finished, you&rsquo;ll see search result in the Web Part.<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2781.PopularItemsReturned.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2781.PopularItemsReturned.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2781.PopularItemsReturned.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2781.PopularItemsReturned.png" alt="Popular items are returned" border="0" /></a></p>
<p>6.&nbsp; Select <strong>OK</strong> to save the changes, and save the page.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3554.PopularItemsDisplayed.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3554.PopularItemsDisplayed.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3554.PopularItemsDisplayed.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3554.PopularItemsDisplayed.png" alt="Popular items displayed in the Web Part" border="0" /></a></p>
<p>To display the popular items nicely, you can apply a display template in the same way that you did with the <a target="_blank" href="/b/tothesharepoint/archive/2013/05/28/stage-11-upload-and-apply-display-templates-to-the-content-search-web-part.aspx">CSWP.</a></p>
<p>To check that the PIWP is working correctly, go to the <em>Cameras</em> section. On this page, the most viewed items within the <em>Cameras</em> category are displayed.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsCameras.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsCameras.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsCameras.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsCameras.png" alt="Popular cameras" border="0" /></a></p>
<p>When we go to the <em>Camcorders</em> category, the most viewed items within the <em>Camcorders</em> category are displayed.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsCamcorders.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsCamcorders.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/PopularItemsCamcorders.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/PopularItemsCamcorders.png" alt="Popular camcorders" border="0" /></a></p>
<p>Our PIWP is working the way it should. Nice!</p>
<p>So now you know how to configure the RIWP and the PIWP. You might have noticed that throughout the examples I showed, I was always logged in to my account.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LoggedInUser.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LoggedInUser.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/LoggedInUser.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/LoggedInUser.png" alt="Logged in user" border="0" /></a></p>
<p>In the next blog post, I&rsquo;ll explain how all of this works if the website only has anonymous users, that is, users who&rsquo;re are not logged in.</p>
<p></p>
<p><strong>Next blog post in this series</strong><br /><a href="/b/tothesharepoint/archive/2014/01/23/use-recommendations-and-popular-items-on-websites-with-anonymous-users-in-sharepoint-server-2013.aspx">Use recommendations and popular items on websites with anonymous users</a>.</p>]]></content:encoded>
    </item>
    <item>
      <title>Modify the Content Search Web Part display template and use Windows PowerShell to start Usage analytics in SharePoint Server 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013</link>
      <pubDate>Fri, 17 Jan 2014 00:33:57 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013/</guid>
      <description><![CDATA[This is a blog post in the series &ldquo;How to display Recommendations and Popular items on a...]]></description>
      <content:encoded><![CDATA[<p>This is a blog post in the series &ldquo;<a href="/b/tothesharepoint/archive/2014/01/15/how-to-display-recommendations-and-popular-items-on-a-sharepoint-server-2013-site.aspx" target="_blank">How to display Recommendations and Popular items on a SharePoint Server 2013 site</a>.&rdquo; In the previous post, I introduced you to <a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx" target="_blank">the Usage analytics feature</a>. In this blog post:</p>
<ul>
<li><a href="#Mapping">Change the mapping of the UsageAnalyticsID managed property</a></li>
<li><a href="#ModifyCSWP">Modify a Content Search Web Part display template so that usage events are logged correctly</a></li>
<li><a href="#ClickParty">Why you should simulate the generation of Views usage events</a></li>
<li><a href="#PushEvents">Run Windows PowerShell scripts to start search analytics and push usage events to the Event store</a></li>
<li><a href="#ViewEvents">View usage events in the Event store</a></li>
<li><a href="#PrepareEvents">Prepare usage events files before starting Usage analytics with Windows PowerShell</a></li>
<li><a href="#StartUsageAnalytics">Start the Usage analytics job with Windows PowerShell</a></li>
</ul>
<p><strong>Note:</strong> The examples in this blog series are based on an on-premises installation.</p>
<p></p>
<p></p>
<p><a id="Mapping"></a><strong><span style="color:#333333;font-size:medium;">Change the mapping of the UsageAnalyticsID managed property </span></strong><br />In our Contoso scenario, we want to recommend one product per product group, that is, we want Usage analytics to <a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#GroupNumber" target="_blank">ignore the product color</a>. This means that our recommendations must be calculated on <em>Group Number.</em> We can do this, because <em>Group Number</em> is part of the friendly URL (FURL) on our <a href="/b/tothesharepoint/archive/2013/05/23/stage-10-configure-the-query-in-a-content-search-web-part-on-a-catalog-item-page.aspx" target="_blank">item details page</a>.</p>
<p>In the previous blog post, I told you that the managed property that&rsquo;s used to specify how recommendations between individual catalog items should be calculated is <a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#UsageAnalyticsID" target="_blank"><em>UsageAnalyticsID</em></a>. So, in order for Usage analytics to do its calculation on <em>Group Number</em>, we have to change the mapping of the <em>UsageAnalyticsID</em> property. Here&rsquo;s how you do that:<br /><br /></p>
<p><strong>IMPORTANT</strong>: You have to change the property mapping on the Authoring site.</p>
<p>1.&nbsp; On your authoring site, go to <strong>Site settings</strong> --&gt; <strong>Search Schema</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0447.SearchSchema.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0447.SearchSchema.png"><img alt="Search Schema" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0447.SearchSchema.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/500x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0447.SearchSchema.png" border="0" /></a></p>
<p>2.&nbsp; On the <strong>Managed Properties</strong> page, in the <strong>Managed property</strong> field, type <em>UsageAnalyticsID</em>, and then select the arrow button.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3531.SearchUsageAnalyticsMP.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3531.SearchUsageAnalyticsMP.png"><img alt="Type UsageAnalyticsID" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3531.SearchUsageAnalyticsMP.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3531.SearchUsageAnalyticsMP.png" border="0" /></a></p>
<p>3.&nbsp; From the <strong>Property Name</strong> field, select <strong>Edit/Map Property</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EditProperty.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EditProperty.png"><img alt="Edit/Map Property" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EditProperty.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EditProperty.png" border="0" /></a></p>
<p>4.&nbsp; On the <strong>Edit Managed Property</strong> page, select <strong>Add a Mapping</strong>. Notice that by default, this property is mapped to the crawled property <em>ows_ProductCatalogItemNumber</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/5187.AddAMapping.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/5187.AddAMapping.png"><img alt="Add a Mapping" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/5187.AddAMapping.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/5187.AddAMapping.png" border="0" /></a></p>
<p>5.&nbsp; In the <strong>Crawled property selection</strong> dialog box, use the <strong>Search for crawled property name</strong> field to search for the crawled property that you want to map to this managed property.<br /><br />In our Contoso scenario, we want to map the site column called <em>Group Number</em>. Crawled properties don&rsquo;t contain spaces, so leave out the space, enter <em>GroupNumber</em> and select <strong>Find</strong>.</p>
<p><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Find.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Find.png"><img alt="Find GroupNumber" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Find.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Find.png" border="0" /></a></p>
<p>Two crawled properties are found. Select the crawled property with the<em> ows_ prefix</em>, and select <strong>OK</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/MapProperty.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/MapProperty.png"><img alt="Map crawled property" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/MapProperty.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/MapProperty.png" border="0" /></a></p>
<p>If you are confused because two crawled properties that look about the same are found, then you&rsquo;re not alone. This is quite tricky. In <a href="/b/tothesharepoint/archive/2013/03/06/from-site-column-to-managed-property-what-s-up-with-that.aspx" target="_blank">another blog post</a>, I talk about the naming convention for crawled and managed properties.</p>
<p>If you are interested in a cliff note version of that blog post, here it is: When mapping a crawled property to the <em>UsageAnalyticsID</em> managed property, you should select the crawled property with the <em><strong>ows</strong></em>_ prefix!</p>
<p>6.&nbsp; On the <strong>Edit Managed Property</strong> page, select the <em>ows_ProductCatalogItemNumber</em> crawled property, and then <strong>Remove Mapping</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0361.RemoveMapping.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0361.RemoveMapping.png"><img alt="Remove crawled property mapping" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0361.RemoveMapping.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0361.RemoveMapping.png" border="0" /></a></p>
<p>7.&nbsp; Select <strong>OK</strong> to save the new mapping.</p>
<p><span style="text-decoration:underline;"><strong>IMPORTANT:</strong></span> Map only <span style="text-decoration:underline;">one crawled property</span> to the <em>UsageAnalyticsID</em> managed property. If you map more than one crawled property, the Usage analytics calculation won&rsquo;t work correctly.<br /><br />After you have changed the mapping of the <em>UsageAnalyticsID</em> managed property, you have to do a full crawl of your catalog. I describe how you can do this in <a href="/b/tothesharepoint/archive/2013/03/05/stage-4-set-up-search-and-enable-the-crawling-of-your-catalog-content.aspx" target="_blank">this blog post</a>.</p>
<p></p>
<p></p>
<p><span style="font-size:medium;"><strong><span style="color:#333333;"><a id="ModifyCSWP"></a>Modify a Content Search Web Part display template so that usage events are logged correctly</span></strong></span><br />On our Contoso site, we use a <a href="/b/tothesharepoint/archive/2013/05/23/stage-10-configure-the-query-in-a-content-search-web-part-on-a-catalog-item-page.aspx" target="_blank">Content Search Web Part (CSWP) to display items on the catalog item page</a>. By default, the CSWP does not log usage events. To enable our CSWP to log usage events we have to modify the display template that the CSWP is using. Here&rsquo;s what you need to do:</p>
<p>1.&nbsp; In your <a href="/b/tothesharepoint/archive/2013/04/03/stage-6-upload-and-apply-a-new-master-page-to-a-publishing-site.aspx#MapNetworkDrive" target="_blank">mapped network drive</a>, open the display template that you have applied to your CSWP.<br />2.&nbsp; In the <strong>ManagedPropertyMapping</strong> element, add the following two properties:</p>
<p><br /><span style="font-family:courier new,courier;">&#39;Original Path&#39;{Original Path}:&#39;OriginalPath&#39;,</span><br /><span style="font-family:courier new,courier;">&#39;SiteID&#39;{SiteID}:&#39;SiteID&#39;,</span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3364.TwoMPs.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3364.TwoMPs.png"><img alt="Add tow managed properties" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3364.TwoMPs.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3364.TwoMPs.png" border="0" /></a></p>
<p>3.&nbsp; Add the following Java-Script just above the HTML part of your display template:<br /><br />/<span style="font-family:courier new,courier;">/Log Views usage event on URL of catalog item</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;window.LogViewsToEventStore = function(url, site)</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;{&nbsp;&nbsp; &nbsp;</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SP.SOD.executeFunc(&quot;sp.js&quot;, &quot;SP.ClientContext&quot;, function()</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var spClientContext = SP.ClientContext.get_current();</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(!$isNull(spClientContext))</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var spWeb = spClientContext.get_web();</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var spUser = spWeb.get_currentUser();</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; var spScope = &quot;{00000000-0000-0000-0000-000000000000}&quot;;</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; SP.Analytics.AnalyticsUsageEntry.logAnalyticsEvent2(spClientContext, 1, url, spScope, site, spUser);spClientContext.executeQueryAsync(null, null);</span><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;};</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp;&nbsp; var originalPath = $getItemValue(ctx, &quot;Original Path&quot;);</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;var originalSite = $getItemValue(ctx, &quot;SiteID&quot;);</span><br /><span style="font-family:courier new,courier;">&nbsp;&nbsp; &nbsp;LogViewsToEventStore(originalPath.value, originalSite.value);</span><br /><br /></p>
<p>I want to point out one value in this script. In the previous blog post, I told you about the different <a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#DefaultUsageEvents" target="_blank">EventTypeIDs for the usage events</a>. The value <em>1</em> in this script represents the EventTypeID of the <em>Views</em> usage event. If you want to log a different usage event, you&rsquo;ll have to substitute this value with the EventTypeID of the usage event that you want to log.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/JavaScript.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/JavaScript.png"><img alt="Add Java Script to display template" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/JavaScript.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/JavaScript.png" border="0" /></a></p>
<p>4.&nbsp; Save the file.</p>
<p></p>
<p></p>
<p><strong><span style="color:#333333;font-size:medium;"><a id="ClickParty"></a>Why you should simulate the generation of Views usage events</span></strong><br />Now that our CSWP can correctly log usage events, the next step is to actually generate usage events. In our case, we modified the CSWP to log <em>Views</em>. If the Contoso site was LIVE, visitors would create a <em>Views</em> usage event every time they viewed an item on the website. However, the Contoso site is only a demo site, so it doesn&rsquo;t have any visitors.</p>
<p>When you set up your site, you&rsquo;ll most likely want to test the Usage analytics feature before you put it into production. To be able to test the Usage analytics feature, you&rsquo;ll need to generate usage events. To generate recommendations based on usage events, <span style="text-decoration:underline;"><strong>a minimum of three different users have to click the same items</strong></span>.&nbsp;</p>
<p>There is not one single correct way of simulating the generation of <em>Views</em> usage events. To generate <em>Views</em> usage events for the Contoso site, I invited some of my co-workers to a &ldquo;click party&rdquo; (they were bribed with candy). To ensure that recommendations were generated, I gave all users a list of items that they had to click. That way I ensured that at least three different users clicked the same items.</p>
<p>Here&rsquo;s an example of the instructions that I gave my co-workers:</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Instructions.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Instructions.png"><img alt="Click-party instructions" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Instructions.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Instructions.png" border="0" /></a></p>
<p>When Usage analytics is run, <em>SV Keyboard E10</em> will generate a recommendation for <em>WWI Desktop PC2.30 M2300</em> (people who viewed <em>WWI Desktop PC2.30 M2300</em> also viewed <em>SV Keyboard E10</em>) and <em>WWI Desktop PC2.30 M2300</em> will generate a recommendation for <em>SV Keyboard E10</em> (people who viewed <em>SV Keyboard E10</em> also viewed <em>WWI Desktop PC2.30 M2300</em>).</p>
<p></p>
<p><strong><span style="color:#333333;font-size:medium;"><a id="PushEvents"></a>Run Windows PowerShell scripts to start search analytics and push usage events to the Event store</span></strong><br />After you have generated <em>Views</em> usage events, you have two options on how to proceed. The Usage analytics timer job runs once every 24 hours. If you are a patient person you can now relax, go home, and let Usage analytics work its magic overnight.</p>
<p>On the other hand, if you are more of an &ldquo;I want results now&rdquo; type of person, you can use some Windows PowerShell scripts to speed up the process. Here&rsquo;s what you need to do:<br /><br /></p>
<p>1.&nbsp; Verify that you meet the following minimum <a href="https://technet.microsoft.com/en-us/library/ee806878.aspx#section3" target="_blank">permission requirements</a>.<br />2.&nbsp; On the server where SharePoint Server 2013 is installed, open the <strong>SharePoint 2013 Management Shell</strong> as an Administrator.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RunAsAdministrator.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RunAsAdministrator.png"><img alt="Run as administrator" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/RunAsAdministrator.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/RunAsAdministrator.png" border="0" /></a></p>
<p>3.&nbsp; At the Windows PowerShell command prompt, t<span></span>ype the following commands to start Search analytics. The output from Search analytics is used by Usage analytics to map usage events against the actual items in the search index.<br /><br /><span style="font-family:courier new,courier;">$a = Get-SPTimerJob -Type Microsoft.Office.Server.Search.Analytics.AnalyticsJobDefinition</span><br /><span style="font-family:courier new,courier;">$sa = $a.GetAnalysis(&quot;Microsoft.Office.Server.Search.Analytics.SearchAnalyticsJob&quot;)</span><br /><span style="font-family:courier new,courier;">$sa.StartAnalysis()</span><br /><br /></p>
<p>4.&nbsp; Wait for the search analytics job to finish. To check the status of the search analytics job, type the following command:<br /><br /><span style="font-family:courier new,courier;">$sa.GetAnalysisInfo()</span></p>
<p>As long as the search analytics job is running, <strong>State</strong> is<strong> Running</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3250.SARunning.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3250.SARunning.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3250.SARunning.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3250.SARunning.png" border="0" /></a></p>
<p>The search analytics job is finished when <strong>State</strong> is <strong>Stopped</strong> and <strong>Status</strong> is <strong>100</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/SAstoped.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/SAstoped.png"><img alt="Search analytics stopped" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/SAstoped.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/SAstoped.png" border="0" /></a></p>
<p>5.&nbsp; The usage events are added to the Event store within a 10 minute interval. To push the usage events to the Event store, type the following commands:<br /><br /><span style="font-family:courier new,courier;">$tj = Get-SPTimerJob -Identity (&quot;job-usage-log-file-import&quot;)</span><br /><span style="font-family:courier new,courier;">$tj.RunNow()</span><br /><br /><br /><br /></p>
<p><a id="ViewEvents"></a><span style="font-size:medium;"><strong><span style="color:#333333;">View usage events in the Event store</span></strong></span><br />After you have pushed the usage events into the Event store, you should verify that the usage events are recorded correctly. To do that, on the machine where SharePoint Server 2013 is installed, go to the Event store. In most cases you can find the Event store in this file directory:</p>
<p><em>C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server\Analytics_&lt;GUID&gt;\EventStore</em><br /><br /><a id="myevents"></a>In the Event store, the usage events of each day are stored in a separate folder. In our scenario, we can see that a folder has been added.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EventStoreFolder.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EventStoreFolder.png"><img alt="Folder in event store" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EventStoreFolder.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EventStoreFolder.png" border="0" /></a></p>
<p>In this folder, you&rsquo;ll see some text files. These files contain our usage events. Notice that all file names start with 1_.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EventLogFiles.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EventLogFiles.png"><img alt="Usage event log files" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EventLogFiles.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EventLogFiles.png" border="0" /></a></p>
<p>This number is the EventTypeID of the usage event that is logged in the file. Remember, 1 is the <a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#DefaultUsageEvents" target="_blank">EventTypeID</a> of the <em>Views</em> usage event. At this point the only usage event that we are logging is the <em>Views</em> event, so this is a good sign that we are doing things right.</p>
<p>Open one of the files in a text editor, for example Notepad++. This file contains quite a bit of information, but you should really only be looking for two things:</p>
<ul>
<li>Verify that the usage events are logged correctly.</li>
<li>Verify that different users have generated the usage event.</li>
</ul>
<p>In the previous blog post, I explained that for Usage analytics to work, the usage event must be recorded <a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx#XSPrecording" target="_blank">on the URL of the item</a>. In the Event store file, you&rsquo;ll see many URLs. Look for URLs that end in <em>dispform.aspx?id=</em> followed by a number. In our file, we can see that it contains many entries with such URLs. <br /><br /></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemURLs.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemURLs.png"><img alt="Item URLs in log file" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemURLs.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemURLs.png" border="0" /></a></p>
<p>This is a very good sign, because it means that the usage events are being recorded correctly. To verify that the URLs actually belong to one of our catalog items, copy one of the URLs from this file, and paste it into your browser.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/VerifyItemURL.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/VerifyItemURL.png"><img alt="Verify item URL in log file" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/VerifyItemURL.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/VerifyItemURL.png" border="0" /></a></p>
<p>To verify that different users have generated the usage event, look in the third column of the file. In our scenario, we can see that we have at least three different user IDs.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ThreeUserIDs.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ThreeUserIDs.png"><img alt="Three user IDs in log file" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ThreeUserIDs.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ThreeUserIDs.png" border="0" /></a></p>
<p>Now that we have verified that the usage events are correctly logged, you could be tempted to think that we are ready to run the Usage analytics job.&nbsp; But remember, by using Windows PowerShell to start Usage analytics, we are actually kick-starting timer jobs. <br /><br />When the Usage analytics timer job kicks off, it&rsquo;ll take the usage events from <em>yesterday</em> and process them. Since we want to process the files from <em>today</em>, we&rsquo;ll use a simple trick so that the correct files can be processed by Usage analytics. <br /><br /></p>
<p></p>
<p><strong><span style="color:#333333;font-size:medium;"><a id="PrepareEvents"></a>Prepare usage events files before starting Usage analytics with Windows PowerShell</span></strong></p>
<p>1.&nbsp; In your EventStore file directory, create a new folder called <em>myevents</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/myevents.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/myevents.png"><img alt="myevents folder" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/myevents.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/myevents.png" border="0" /></a></p>
<p>2.&nbsp; Copy the usage event files that you want Usage analytics to process into your <em>myevents</em> folder.<br /><br />In our scenario, I copied all files from the <a href="#myevents"><em>20131206</em></a> folder into <em>myevents</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1234.CopiedMyEvents.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1234.CopiedMyEvents.png"><img alt="Usage event files copied to myevents" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1234.CopiedMyEvents.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/450x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1234.CopiedMyEvents.png" border="0" /></a></p>
<p>3.&nbsp; Right-click on your <em>myevents</em> folder and select <strong>Properties</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Properties.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Properties.png"><img alt="myevents Properties" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Properties.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Properties.png" border="0" /></a></p>
<p>4.&nbsp; In the <strong>Attributes</strong> section, select <strong>Read-only (Only applies to files in folder)</strong>, and then <strong>OK</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8206.SetAsReadOnly.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8206.SetAsReadOnly.png"><img alt="Set myevents to Read-only" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8206.SetAsReadOnly.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/350x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8206.SetAsReadOnly.png" border="0" /></a></p>
<p>5.&nbsp; In the <strong>Confirm Attribute Changes</strong>, select <strong>Apply changes to this folder, subfolder and files</strong> and then<strong> OK</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ApplyToFolders.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ApplyToFolders.png"><img alt="Apply to all folders" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ApplyToFolders.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ApplyToFolders.png" border="0" /></a></p>
<p>Now we&rsquo;re ready to start the Usage analytics job.</p>
<p></p>
<p><strong><span style="color:#333333;font-size:medium;"><a id="StartUsageAnalytics"></a>Start the Usage analytics job with Windows PowerShell</span></strong></p>
<p>1.&nbsp; At the Windows PowerShell command prompt, type the following commands:<br /><br /><span style="font-family:courier new,courier;">$tj = get-sptimerjob -type microsoft.office.server.search.analytics.usageanalyticsjobdefinition </span><br /><span style="font-family:courier new,courier;">$tj.DisableTimerJobSchedule() </span><br /><span style="font-family:courier new,courier;">$tj.StartAnalysis(&ldquo;\\<span style="background-color:#ffff99;">&lt;hostname&gt;</span>\Analytics_<span style="background-color:#ffff99;">&lt;guid&gt;</span>\EventStore\myevents&rdquo;) </span><br /><span style="font-family:courier new,courier;">$tj.EnableTimerJobSchedule()</span></p>
<p>Notice that one command contains two placeholders: <em>hostname</em> and <em>guid</em>. The hostname is the name of the server where SharePoint Server 2013 is installed. You can see the guid in the file path to your EventStore.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GUID.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GUID.png"><img alt="GUID" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/GUID.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/GUID.png" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0574.RunUA.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0574.RunUA.png"><img alt="Run Usage analytics" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0574.RunUA.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0574.RunUA.png" border="0" /></a><br /><br /></p>
<p>2.&nbsp; Check the status of the Usage analytics job by entering the following command:<br /><br /><span style="font-family:courier new,courier;"><span style="font-family:courier new,courier;">$tj</span>.GetAnalysisInfo()</span></p>
<p>The Usage analytics job is finished when <strong>State</strong> is <strong>Stopped</strong> and <strong>Status</strong> is <strong>100</strong>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/UAstopped.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/UAstopped.png"><img alt="Usage analytics stopped" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/UAstopped.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/UAstopped.png" border="0" /></a></p>
<p>Now that Usage analytics have processed the usage events, the next step is to display the results of the analysis on our Publishing site. To do that, we&rsquo;ll add and configure two Web Parts. I&rsquo;ll show you how to do that in the next blog post.</p>
<p></p>
<p><strong>Next blog post in this series:</strong><br /><a href="/b/tothesharepoint/archive/2014/01/22/add-and-configure-the-recommended-items-and-popular-items-web-part-in-sharepoint-server-2013.aspx">Add and configure the Recommended Items and Popular Items Web Part</a></p>]]></content:encoded>
    </item>
    <item>
      <title>An introduction to recommendations and popular items in SharePoint Server 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013</link>
      <pubDate>Tue, 14 Jan 2014 01:45:56 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013/</guid>
      <description><![CDATA[In SharePoint Server 2013, recommendations and popular items can be displayed because a feature...]]></description>
      <content:encoded><![CDATA[<p>In SharePoint Server 2013, recommendations and popular items can be displayed because a feature called <em>Usage analytics</em> tracks and analyzes how visitors interact with your website. You can use the results that Usage analytics produces to add content to your website, for example &ldquo;People who viewed this item also viewed&rdquo; or &ldquo;Popular items in this category.&rdquo;</p>
<p>Here&rsquo;s how Usage analytics works: &nbsp;</p>
<ol>
<li>Visitors do something on your website, for example, they view an item. This generates a <strong>usage event</strong>.</li>
<li>The usage event is recorded in the <strong>Event store</strong>.</li>
<li>The usage events are sent to the <strong>Analytics Processing Component</strong> where they are analyzed. The result is sent to the <strong>Search index</strong>.</li>
<li>When visitors navigate to a page that contains a <strong>Recommendations</strong> or <strong>Popular Items Web Part</strong>, a query is automatically issued and sent to the search index.</li>
<li>The query results are returned from the search index and displayed in the <strong>Recommendations</strong> and <strong>Popular Items Web Part</strong> on your website.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/UsageAnalyticsOverview.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/UsageAnalyticsOverview.png"><img alt="How Usage analytics works" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/UsageAnalyticsOverview.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/UsageAnalyticsOverview.png" border="0" /></a></p>
<p></p>
<p><strong><span style="font-size:medium;color:#333333;">&nbsp;</span></strong></p>
<p><strong><span style="font-size:medium;color:#333333;">View the usage event definitions</span></strong><br />There are three default usage events in SharePoint Server 2013:</p>
<ul>
<li>Views &ndash; a usage event is registered when a visitor views an item on your site.</li>
<li>Recommendation Displayed &ndash; a usage event is registered when an item is displayed as a recommendation on your site.</li>
<li>Recommendation Clicked &ndash; a usage event is registered when a visitor clicks an item that is displayed as a recommendation on your site.</li>
</ul>
<p><a id="DefaultUsageEvents"></a>To view the usage event definitions, do the following:</p>
<p>1.&nbsp; On the server where SharePoint Server 2013 is installed, open the <strong>SharePoint 2013 Management Shell.</strong><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Shell.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Shell.png"><br /><br /><img alt="SharePoint 2013 Management Shell" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Shell.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/200x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Shell.png" border="0" /></a></p>
<p style="padding:0;margin:0;"></p>
<p>2.&nbsp; At the Windows PowerShell command prompt, type the following commands:<br /><br /><span style="font-family:courier new,courier;">$SSP = Get-SPEnterpriseSearchServiceApplicationProxy</span><br /><span style="font-family:courier new,courier;">$SSP.GetAnalyticsEventTypeDefinitions([Guid]::Empty, 3) | ft</span></p>
<p>The default usage event definitions are displayed. I&rsquo;ll explain some of the usage event settings in later blog posts, but for now, just notice that each event has an <strong>EventTypeId</strong> and an <strong>EventName</strong>. &nbsp;<br /><br /><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EventTypeId.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EventTypeId.png"><img alt="Usage event types" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/EventTypeId.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/EventTypeId.png" border="0" /></a></p>
<p>The default usage events have the following EventTypeID values:</p>
<p style="padding:0;margin:0;"></p>
<table border="1" cellpadding="3">
<tbody>
<tr>
<td><strong>EventTypeID</strong></td>
<td><strong>EventName</strong></td>
</tr>
<tr>
<td>1</td>
<td>Views</td>
</tr>
<tr>
<td>2</td>
<td>Recommendation Displayed</td>
</tr>
<tr>
<td>3</td>
<td>Recommendation Clicked</td>
</tr>
</tbody>
</table>
<p></p>
<p><strong><span style="font-size:medium;">&nbsp;</span></strong></p>
<p><strong><span style="font-size:medium;"><a id="XSPrecording"></a>About Usage analytics in a cross-site publishing scenario</span></strong><br />One important step in how Usage analytics works is step 2: <em>The usage event is recorded in the Event store</em>. In the Event store, each usage event must be recorded using the URL of the item. I&rsquo;ll repeat this, because this is really important:<br /><br />In the Event store, each usage event must be recorded using <span style="text-decoration:underline;">the URL of the item</span>.</p>
<p>This is especially important in a <a href="/b/tothesharepoint/archive/2013/02/19/an-introduction-to-cross-site-publishing.aspx" target="_blank">cross-site publishing scenario</a>. With cross-site publishing, content is stored in an Authoring site collection and displayed in a Publishing site collection.&nbsp; <a href="/b/tothesharepoint/archive/2013/04/17/stage-8-assign-a-category-page-and-a-catalog-item-page-to-a-term.aspx" target="_blank">Managed navigation is used together with category pages and catalog item pages</a> to display content. This means that when visitors view an item on the Publishing site, the usage event takes place on the catalog item page, for example <em>https://www.contoso/sites/Pages/ContosoItemPage.aspx</em>. Because the same catalog item page is used to display many items, the usage event can&rsquo;t be recorded using the URL of the catalog item page. For Usage analytics to work in a cross-site publishing scenario, the usage event must be recorded using the URL of the item in the Authoring site collection, for example: <em>https://www.contoso/sites/catalog/Lists/Products/DispForm.aspx?ID=12</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/URLinEventStore.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/URLinEventStore.png"><img alt="Record usage event on URL of the item" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/URLinEventStore.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/URLinEventStore.png" border="0" /></a></p>
<p></p>
<p>Depending on how you&rsquo;ve set up your website, SharePoint Server 2013 can automatically record the usage event on the URL of the item in the Authoring site. Here&rsquo;s the question you have to ask yourself: Which Web Part are you using to display items on your catalog item page? If your answer is &ldquo;Catalog Item Reuse Web Parts&rdquo;, then you have nothing to worry about. The Catalog Item Reuse Web Part will automatically ensure that usage events are recorded correctly in the Event store. However, if you&rsquo;re using a Content Search Web Part to display items on your catalog item page, you&rsquo;ll have to do some extra configuration steps. But not to worry: I&rsquo;ll explain all these steps in the next blog articles.<br /><br />But before we move on, there&rsquo;s one more thing that you need to know about: The <em>UsageAnalyticsID</em> managed property.</p>
<p></p>
<p></p>
<p><strong><span style="color:#333333;font-size:medium;"><a id="UsageAnalyticsID"></a>About the UsageAnalyticsID managed property </span></strong><br />The items on our Contoso website are available in different colors. For example, the item <em>Southridge Video Laptop15.4W M1548</em> is available in four different colors. On the Authoring site, color versions are grouped under a common <em>Group Number</em>.</p>
<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemAuthoring.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemAuthoring.png"><img alt="Items with same Group Number" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemAuthoring.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemAuthoring.png" border="0" /></a></p>
<p>On the Publishing site, we use the value of both <em>Group Number</em> and <em>Item Number</em> in the friendly URL (FURL). Visitors can easily see that the product exists in other colors, and they can quickly view details about the product in another color without having to go back to the category page.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemsPublishing.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemsPublishing.png"><img alt="Item with different color variants " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemsPublishing.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemsPublishing.png" border="0" /></a></p>
<p>The default Usage analytics calculation will consider the color of the items when calculating recommendations. For example, recommendations for a white <em>Southridge Video Laptop15.4W M1548</em> could turn out to be a white <em>Litware Laptop Keyboard X105</em>, a blue <em>Litware Laptop Keyboard X105</em>, a white <em>Litware Wireless Laser Mouse M55</em> and a blue<em> Litware Wireless Laser Mouse M55</em>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemRecommendations.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemRecommendations.png"><img alt="Not good recommendations" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemRecommendations.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemRecommendations.png" border="0" /></a></p>
<p><a id="GroupNumber"></a>The two recommended keyboards are the same product, and so are the two mice. These are not good recommendations. To get recommendations that will ignore the product color, we have to change the mapping of the <em>UsageAnalyticsID</em> managed property.</p>
<p>By default, <em>UsageAnalyticsID</em> is mapped to the crawled property <em>ows_ProductCatalogItemNumber</em>. If you used the Product Catalog site template when you <a href="/b/tothesharepoint/archive/2013/02/20/stage-1-create-site-collections-for-cross-site-publishing.aspx" target="_blank">created your Authoring site collection</a>, this crawled property represents the site column <em>Item Number</em> in your <em>Products</em> list.</p>
<p>If you didn&rsquo;t use the Product Catalog site template when you created your Authoring site collection, or, if you don&rsquo;t want to use the site column <em>Item Number</em> in the Usage analytics calculation, you&rsquo;ll have to change the mapping of the <em>UsageAnalyticsID</em> managed property. However, when you change the mapping, you&rsquo;ll have to make sure that the property you map to <em>UsageAnalyticsID</em> is used in the friendly URL (FURL) of your catalog item page (most likely, you specified this FURL when you <a href="/b/tothesharepoint/archive/2013/03/07/stage-5-connect-your-publishing-site-to-a-catalog.aspx#HowURLDetails" target="_blank">connected your publishing site to your catalog</a>). This is because the <strong>Recommended Items Web Part</strong> uses a value from the FURL to show the correct recommendations (I will show you how to configure the Recommended Items Web Part in a later blog post).</p>
<p>Remember, the color versions of our products are grouped under a common <em>Group Number</em>, and we use the value of <em>Group Number</em> in the FURL of our catalog item page.&nbsp; So, by mapping <em>UsageAnalyticsID</em> to the crawled property of <em>Group Number</em>, the Usage analytics calculation will be done on a group level. This means that we can display one product per product group as recommendations. <br /><br /></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemRecommendations2.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemRecommendations2.png"><img alt="Good recommendations" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/ItemRecommendations2.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/ItemRecommendations2.png" border="0" /></a></p>
<p>There is of course more to it than this, so if you&rsquo;re confused, I hope you&rsquo;ll hang in there. In the next blog posts, I&rsquo;ll walk you through all the steps that you have to do to display recommendations and popular items on your website.</p>
<p></p>
<p></p>
<p></p>
<p><span style="color:#333333;"><strong><span style="font-size:small;">Next blog post in this series:</span></strong></span><br /><a href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx">Modify the Content Search Web Part display template and use Windows PowerShell to start Usage analytic</a>s</p>]]></content:encoded>
    </item>
    <item>
      <title>How to display recommendations and popular items on a SharePoint Server 2013 site</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/how-to-display-recommendations-and-popular-items-on-a-sharepoint-server-2013-site</link>
      <pubDate>Tue, 14 Jan 2014 01:32:15 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2014/01/15/how-to-display-recommendations-and-popular-items-on-a-sharepoint-server-2013-site/</guid>
      <description><![CDATA[In this blog series, I&rsquo;ll describe how you can use the new Usage analytics feature in...]]></description>
      <content:encoded><![CDATA[<p>In this blog series, I&rsquo;ll describe how you can use the new Usage analytics feature in SharePoint Server 2013 to display &ldquo;smart content&rdquo; on your website.&nbsp; By &ldquo;smart content&rdquo; I mean content such as recommendations and popular items.&nbsp; Recommendations are based on how other visitors have interacted with your site. For example, on a product page, you can display &ldquo;People who viewed this product also viewed.&rdquo; Popular items are the most viewed items on the entire site or within a specific category, for example the most viewed laptops on a site that sells technology products.</p>
<p>To help explain, I&rsquo;ll use examples from a fictitious company called Contoso. Here&rsquo;s what the website will look like once we&rsquo;re done.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Examples.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Examples.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/Examples.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/Examples.png" alt="Recommendations and Popular items on a website" border="0" /></a></p>
<p><strong>Note:</strong> The examples in this blog series are based on an on-premises installation.</p>
<p></p>
<p></p>
<p><span style="color:#333333;font-size:small;"><strong>Blog posts in this series:</strong></span></p>
<ul>
<li><a href="/b/tothesharepoint/archive/2014/01/16/an-introduction-to-recommendations-and-popular-items-in-sharepoint-server-2013.aspx">An introduction to recommendations and popular items</a></li>
<li><a href="/b/tothesharepoint/archive/2014/01/21/modify-the-content-search-web-part-display-template-and-use-windows-powershell-to-start-usage-analytics-in-sharepoint-server-2013.aspx">Modify the Content Search Web Part display template and use Windows PowerShell to start Usage analytics</a></li>
<li><a href="/b/tothesharepoint/archive/2014/01/22/add-and-configure-the-recommended-items-and-popular-items-web-part-in-sharepoint-server-2013.aspx">Add and configure the Recommended Items and Popular Items Web Part</a></li>
<li><a href="/b/tothesharepoint/archive/2014/01/23/use-recommendations-and-popular-items-on-websites-with-anonymous-users-in-sharepoint-server-2013.aspx">Use recommendations and popular items on websites with anonymous users</a></li>
<li><a href="/b/tothesharepoint/archive/2014/01/28/view-and-configure-usage-analytics-reports-in-sharepoint-server-2013.aspx">View and configure usage analytics reports</a></li>
</ul>
<p></p>
<p><span style="font-size:small;"><strong><span style="color:#333333;">&nbsp;</span></strong></span></p>
<p><span style="font-size:small;"><strong><span style="color:#333333;">Why this series is like Season 2 in a TV series</span></strong></span><br />The Contoso website that I&rsquo;ll use as an example throughout this series is a cross-site publishing website. If the story of how the Contoso site was set up were a TV series, the blog series <a target="_blank" href="/b/tothesharepoint/archive/2013/02/14/how-to-set-up-a-product-centric-web-site-in-sharepoint-2013.aspx">How to set up a product-centric website in SharePoint Server 2013</a> would be Season 1. This series would therefore be Season 2.</p>
<p>Throughout this series, I&rsquo;ll refer to many concepts and features that I explained in the previous blog series (Season 1). You should read the first series before continuing with this one. As with a TV series, knowing the story from the beginning makes things not just easier to understand, but also more interesting.</p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Invitation to Design Time sessions at the SharePoint Conference 2014</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/invitation-to-design-time-sessions-at-the-sharepoint-conference-2014</link>
      <pubDate>Thu, 19 Dec 2013 15:13:26 GMT</pubDate>
      <dc:creator><![CDATA[SharePoint Blog Admin]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2013/12/19/invitation-to-design-time-sessions-at-the-sharepoint-conference-2014/</guid>
      <description><![CDATA[Are you going to the SharePoint Conference&nbsp;this year?
We are once again offering a limited...]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/SPC14.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/SPC14.png"></a><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/SPC14.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/SPC14.png"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/SPC14.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/SPC14.png" border="0" /></a></p>
<p>Are you going to the <a href="https://www.sharepointconference.com/">SharePoint Conference</a>&nbsp;this year?</p>
<p>We are once again offering a limited number of dedicated solution-design sessions for individual customers.</p>
<p>These <b>Design Time</b> <b>sessions </b>are intended to help IT professionals and developers envision and plan a solution based on the SharePoint 2013 products or Office 365.</p>
<p>Sessions will last 60 minutes. If you are selected, you will meet with one or more product experts (Microsoft product team members, consultants, or MVPs) and one or more SharePoint documentation team members to discuss your solution goals, get advice on current challenges, and envision how to enhance your solution using SharePoint 2013 products and Office 365. Design sessions are offered for the categories listed in the table below.</p>
<p>&nbsp;</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="158" valign="top">
<p><strong>Focus Area</strong></p>
</td>
<td width="417" valign="top">
<p><strong>Description</strong></p>
</td>
</tr>
<tr>
<td width="158" valign="top">
<p>Enterprise Social</p>
</td>
<td width="417" valign="top">
<p>Are you planning or already implementing the enterprise social computing features and functionality of SharePoint Server 2013 and Yammer? Come share and discuss your plans for your infrastructure and challenges to implementing and adopting enterprise social in your environment.</p>
</td>
</tr>
<tr>
<td width="158" valign="top">
<p>Hybrid environments</p>
</td>
<td width="417" valign="top">
<p>Are you designing a solution that integrates an on-premises SharePoint farm and Office 365? Come share your plans and get expert advice on a strategy for your hybrid SharePoint 2013 solution.</p>
</td>
</tr>
<tr>
<td width="158" valign="top">
<p>Cloud app model (Developer)</p>
</td>
<td width="417" valign="top">
<p>The new cloud app model allows organizations to quickly add functionality to the SharePoint sites in their environment. Come talk with us about how to create apps for SharePoint.</p>
</td>
</tr>
<tr>
<td width="158" valign="top">
<p>SharePoint and Azure</p>
</td>
<td width="417" valign="top">
<p>Are you designing a SharePoint solution for Windows Azure? Which design decisions are you wrestling with? Tell us about your solution and challenges and we&rsquo;ll bring an expert to the discussion. These sessions focus on IT Pro aspects of design and deployment.</p>
</td>
</tr>
<tr>
<td width="158" valign="top">
<p>Public Internet sites</p>
</td>
<td width="417" valign="top">
<p>Are you planning or already implementing a public Internet site based on SharePoint or Office 365? Come share and discuss your plans and challenges. This session is open to any platform: SharePoint on-premises, Office 365, and Windows Azure.</p>
</td>
</tr>
</tbody>
</table>
<p>If you are selected for a focus area, you will meet with product experts who specialize in your focus area and your session will focus on your design and implementation choices.</p>
<p>To be <b>eligible </b>to participate, you must meet the following criteria:</p>
<ul>
<li>Your organization must be planning or maintaining a solution that fits a focus area.</li>
</ul>
<ul>
<li>You must bring either a draft of your intended solution or a representation of your existing SharePoint solution. For example, your draft can include the proposed physical topology, logical farm architecture, hierarchy of sites, plan for database sizing and settings, search settings, plan for security and isolation, etc.</li>
</ul>
<p>To <b>nominate</b> your company or organization for a design session, send email to <a href="mailto:spcdesign@microsoft.com">spcdesign@microsoft.com</a> by <b>January <span style="text-decoration:line-through;">20</span> <span style="background-color:#ffff00;">30 (extended!)</span>, 2014</b>, and include the following information:</p>
<ul>
<li>Name of your company or organization</li>
<li>Contact information: name and title or role in your organization</li>
<li>One or two focus area(s) you are interested in and any specific questions you have about that area now</li>
<li>Brief description of your solution goals and the challenges you&rsquo;d like to discuss in the Design Time session</li>
</ul>
<p>Due to a limited number of available sessions for each focus area, not every nomination will be accepted. We will review nominations and select those that best fit the focus area and that look like they will lead to a meaningful discussion for both the organization and Microsoft.</p>
<p>Information that you share with the product experts and documentation team either in e-mail or during a design session will be treated confidentially. If you are selected, a member of the SharePoint conference team will contact you with the day and time of your session by <b>February 14, 2014</b>.</p>
<p>We look forward to seeing you in March!</p>
<p>- The SharePoint Content Team</p>]]></content:encoded>
    </item>
    <item>
      <title>Create and import query suggestions in SharePoint 2013</title>
      <link>https://docs.microsoft.com/archive/blogs/tothesharepoint/create-and-import-query-suggestions-in-sharepoint-2013</link>
      <pubDate>Thu, 05 Dec 2013 00:10:00 GMT</pubDate>
      <dc:creator><![CDATA[Bella_Engen]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/tothesharepoint/2013/12/05/create-and-import-query-suggestions-in-sharepoint-2013/</guid>
      <description><![CDATA[An easy way to help users search for information in SharePoint is to create query suggestions. Query...]]></description>
      <content:encoded><![CDATA[<p>An easy way to help users search for information in SharePoint is to create <em>query suggestions</em>. Query suggestions are words that appear under the search box as users type a query.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2043.coffee_suggestion.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2043.coffee_5F00_suggestion.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2043.coffee_suggestion.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2043.coffee_5F00_suggestion.png" alt="Example of query suggestion" border="0" /></a></p>
<p>SharePoint automatically creates a query suggestion when users have clicked a search result for a query at least six times. For example, if users have entered the query word &ldquo;coffee&rdquo; and then clicked on a search result six times, then &ldquo;coffee&rdquo; automatically becomes a query suggestion.</p>
<p>You can also create query spelling suggestions manually. In this blog post I&rsquo;ll use a simple example to show how you can do that. In this blog post I&rsquo;ll explain:</p>
<ul>
<li><a href="#HowCreate">How to create a query suggestions file</a></li>
<li><a href="#ImportSPO">How to import a query suggestions file to SharePoint Online</a>&nbsp;</li>
<li><a href="#ImportServer">How to import a query suggestions file to SharePoint Server 2013</a></li>
<li><a href="#Verify">How to verify that your query suggestions are working</a><br />&nbsp;</li>
</ul>
<p><span style="color: #333333;"><strong><span style="font-size: medium;"><a name="HowCreate"></a>How to create a query suggestions file</span></strong></span></p>
<ol>
<li>Open a text editor, for example Notepad.</li>
<li>Enter the query spelling suggestions that you want to add. Add one word or phrase per line.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3377.QuerySuggestionList.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3377.QuerySuggestionList.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/3377.QuerySuggestionList.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/200x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/3377.QuerySuggestionList.png" alt="Example of query suggestion list" border="0" /></a></p>
<ol start="3">
<li>Save the file as a <strong>.txt</strong> file and encoding <strong>UTF-8</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1586.SaveTXT.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1586.SaveTXT.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1586.SaveTXT.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1586.SaveTXT.png" alt="Save query suggestion list" border="0" /></a></p>
<p>Now that you have your query suggestions file, the next step is to import it to SharePoint.</p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong><span style="color: #333333;"><a name="ImportSPO"></a>How to import a query suggestions file to SharePoint Online</span></strong></span></p>
<ol>
<li>From the O365 Admin menu, select <strong>SharePoint</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/7532.SharePointMenu.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/7532.SharePointMenu.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/7532.SharePointMenu.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/200x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/7532.SharePointMenu.png" alt="O365 Admin menu" border="0" /></a></p>
<ol start="2">
<li>On the <strong>SharePoint admin center</strong>, select <strong>search</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/4314.search.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/4314.search.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/4314.search.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/300x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/4314.search.png" alt="SharePoint admin center" border="0" /></a></p>
<p>&nbsp;</p>
<ol start="3">
<li>On the <strong>search administration</strong> page, select <strong>Query Suggestion Settings</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8054.QuerySuggestionSettings.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8054.QuerySuggestionSettings.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8054.QuerySuggestionSettings.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/400x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8054.QuerySuggestionSettings.png" alt="Query Suggestion Settings" border="0" /></a></p>
<ol start="4">
<li>In the <strong>Language for suggestions phrases</strong> section, select the language of your query suggestions. In the <strong>Always suggest phrases</strong> section, select <strong>Import from text file</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/6114.AlwaysSuggest.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/6114.AlwaysSuggest.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/6114.AlwaysSuggest.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/6114.AlwaysSuggest.png" alt="Select Import from text file" border="0" /></a></p>
<ol start="5">
<li>In the <strong>Text file with phrases</strong> section, select <strong>Choose File</strong>, and import your query suggestions file.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0407.ChooseFile.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0407.ChooseFile.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0407.ChooseFile.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0407.ChooseFile.png" alt="Select Choose File" border="0" /></a></p>
<ol start="6">
<li>Select <strong>OK</strong>, and then <strong>Save Settings</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2047.SaveSettings.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2047.SaveSettings.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2047.SaveSettings.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2047.SaveSettings.png" alt="Save Settings" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>IMPORTANT:</strong></span> When you import query suggestions, existing query suggestions will be overwritten. If you haven&rsquo;t previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions will not be overwritten when you import new ones. However, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then re-import it.</p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong><span style="color: #333333;"><a name="ImportServer"></a>How to import a query suggestions file to SharePoint Server 2013</span></strong></span></p>
<ol>
<li>Go to <strong>Central Administration</strong> --&gt; <strong>Manage service applications</strong> --&gt; <strong>Search Service Application</strong> --&gt; <strong>Query Suggestions</strong>.</li>
<li>On the <strong>Query Suggestion Settings</strong> page, in the <strong>Always suggest phases</strong> section, select <strong>Import from text file</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1581.CA_ImportFromTextFile.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1581.CA_5F00_ImportFromTextFile.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1581.CA_ImportFromTextFile.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1581.CA_5F00_ImportFromTextFile.png" alt="Import query suggestions file" border="0" /></a></p>
<ol start="3">
<li>On the <strong>Import phrases for query suggestions</strong> page, select <strong>Browse</strong>, and import your query suggestions file.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0842.Browse.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0842.Browse.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/0842.Browse.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/0842.Browse.png" alt="Browse for your query suggestions file" border="0" /></a></p>
<ol start="4">
<li>Select <strong>OK</strong>, and then <strong>Save Settings</strong>.</li>
</ol>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2705.CA_SaveSettings.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2705.CA_5F00_SaveSettings.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/2705.CA_SaveSettings.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/2705.CA_5F00_SaveSettings.png" alt="Save Settings" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="text-decoration: underline;"><strong>IMPORTANT:</strong></span> When you import query suggestions, existing query suggestions will be overwritten. If you haven&rsquo;t previously imported any query suggestions, you have nothing to worry about. Automatically created query suggestions will not be overwritten when you import new ones. However, if you want to import additional query suggestions, you should export the existing query suggestions file, update it, and then re-import it.</p>
<p>&nbsp;</p>
<p><span style="font-size: medium;"><strong><span style="color: #333333;"><a name="Verify"></a>How to verify that your query suggestions are working<br /></span></strong></span><br /><span style="text-decoration: underline;"><strong>IMPORTANT</strong></span>: After you have uploaded your query suggestions file, it might take a few hours before your query suggestions are displayed. <br /><br />To verify that your query suggestions are working correctly, in a search box, type two letters of a phrase from your query suggestions file. The query suggestions appear under the search box.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8304.CupOfJoe.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8304.CupOfJoe.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/8304.CupOfJoe.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/8304.CupOfJoe.png" alt="Cup of Joe query suggestion" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1440.CaffeLatte.png" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1440.CaffeLatte.png"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/66/12/1440.CaffeLatte.png" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-00-66-12/1440.CaffeLatte.png" alt="Caffe Latte query suggestion" border="0" /></a></p>
<p>&nbsp;</p>
<p><span style="font-size: small;"><strong><span style="color: #808080;">Additional resources</span></strong></span></p>
<ul>
<li><a href="https://technet.microsoft.com/library/jj721441.aspx" target="_blank">Manage query suggestions in SharePoint Server 2013</a></li>
<li><a href="https://office.microsoft.com/en-us/office365-sharepoint-online-enterprise-help/how-to-customize-query-suggestions-for-sharepoint-search-HA103639759.aspx" target="_blank">How to customize query suggestions for SharePoint search</a></li>
</ul>
<p>&nbsp;</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/telligent.evolution.components.attachments/01/6612/00/00/03/61/60/67/QuerySuggestions_coffee.txt" original-url="https://blogs.technet.com/cfs-filesystemfile.ashx/__key/telligent-evolution-components-attachments/01-6612-00-00-03-61-60-67/QuerySuggestions_5F00_coffee.txt">QuerySuggestions_coffee.txt</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>