檢視及設定 SharePoint Server 中的流量分析報告View and configure usage analytics reports in SharePoint Server

摘要:了解如何檢視及 SharePoint Server 2016 和 SharePoint Server 2013 中設定流量分析報告。Summary: Learn how to view and configure usage analytics reports in SharePoint Server 2016 and SharePoint Server 2013.

使用建議和常用項目在具有匿名使用者在 SharePoint Server 中的網站上,本系列中前一篇文章說明如何在網站上顯示建議與匿名使用者。本文中您將了解:The previous article in this series, Use recommendations and popular items on websites with anonymous users in SharePoint Server, explained how to display recommendations on a website with anonymous users. In this article you'll learn:

注意

[!附註] 本系列中的範例是根據內部部署的 SharePoint Server 部署。The examples in this series are based on an on-premises SharePoint Server deployment.

關於流量分析報告About the usage analytics reports

流量分析報告顯示的統計資料的方式訪客具有與其互動您的網站上的內容,例如哪些項目來檢視最。報表會細分每個流量事件。根據預設,這表示您將能看到:The usage analytics reports show statistics of how visitors have interacted with the content on your website, for example which item is viewed the most. The reports are broken down per usage event. By default, this means that you'll be able to see:

  • 檢視項目數目The number of views for an item

  • 建議顯示每個項目數目The number of recommendations displayed per item

  • 建議按一下每個項目數目The number of recommendations clicked per item

SharePoint Server 會建立兩個流量分析報告:SharePoint Server creates two usage analytics reports:

  • 最常用項目顯示文件庫或清單中的所有項目的使用事件統計資料。Most Popular Items shows usage event statistics for all items in a library or list.

  • 常用性趨勢] 會顯示項目、 網站或網站集合的流量事件統計的資料。Popularity Trends shows usage event statistics for an item, a site or a site collection.

報表會自動更新每隔 24 小時、 使用狀況分析工作執行時間。The reports are automatically updated every 24 hours, when the Usage analytics job is run.

在其中您要顯示目錄內容發佈的跨網站發佈的案例網站,您在製作網站上檢視最常用項目報告。步驟如下: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. Here are the steps:

  1. 在您製作的網站] 移至您的目錄。On your authoring site, go to your catalog.

  2. 按一下 [清單] 索引標籤-> [最常用項目Click the LIST tab -> Most Popular Items.

    最常用項目圖示

  3. 在 [最常用項目] 頁面上使用] 功能表選取您要檢視的統計資料的流量事件。On the Most Popular Items page, use the menu to select the usage event for which you want to view statistics.

    使用事件下拉式清單

    注意

    您可以檢視項目的 「 常用性趨勢 」 報告中檢視建議會顯示使用事件統計的資料。You can view statistics for the Recommendations Displays usage event in the View the Popularity Trends report for an item.

變更使用事件的最近時間週期Change the Recent time period for a usage event

在 [最常用項目] 頁面上有兩個時間週期:最近使用全部On the Most Popular Items page, there are two time periods: Recent and Ever.

最近曾經

全部時段顯示第一天記錄使用事件統計資料。根據預設的最近時間週期設定的最後一個 14 天。T 分配的步驟如下檢視使用事件的預設設定:The Ever time period shows statistics from the first day a usage event was recorded. By default, the Recent time period is set to the last 14 days. T Here are the steps to view the default settings of a usage event:

  1. 在伺服器上安裝 SharePoint Server,開啟SharePoint 2013 管理命令介面On the server where SharePoint Server is installed, open the SharePoint 2013 Management Shell.

    SharePoint 2013 管理命令介面

  2. 在 Microsoft PowerShell 命令提示字元處,輸入下列命令:At the Microsoft PowerShell command prompt, type the following commands:

    $SSP = Get-SPEnterpriseSearchServiceApplicationProxy
    $tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)
    $event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <EventTypeId> }
    $event
    

    <EventTypeId>為數值檢視流量事件定義您想要檢視使用事件。在下列範例中,我們將檢視檢視事件。因此,我們將輸入1<EventTypeId> is the numeric View the usage event definitions of the usage event that you want to view. In the following example, we'll view the Views event. Therefore, we'll enter 1 .

    預設最近常用性時間範圍

最近使用時間週期是RecentPopularityTimeframe屬性所定義。我們可以變更最近使用時間週期的任何項目還是其中一個 14 天。若要變更的時間週期的步驟如下:The Recent time period is defined by the RecentPopularityTimeframe property. We can change the Recent time period to anything between one and 14 days. Here are the steps to change the time period:

  1. 在 SharePoint 2016 管理命令介面,在 Microsoft PowerShell 命令提示字元處輸入下列命令:In the SharePoint 2016 Management Shell, at the Microsoft PowerShell command prompt, type the following commands:

    $SSP = Get-SPEnterpriseSearchServiceApplicationProxy
    $tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)
    $event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <EventTypeId> }
    $event.RecentPopularityTimeFrame = <TimeFrame>
    $tenantConfig.Update($SSP)
    

    <EventTypeId>為數值檢視流量事件定義我們想要變更使用事件。 <TimeFrame>是我們想要設定的流量事件的新時間週期。<EventTypeId> is the numeric View the usage event definitions of the usage event that we want to change. <TimeFrame> is the new time period we want to set for the usage event.

    在下列範例中,若要變更一週檢視最近使用時間,輸入17In the following example, to change the Views Recent time to a week, enter 1 and 7 .

    將最近設定為 7

  2. 若要確認的變更,在 Microsoft PowerShell 命令提示字元處輸入下列命令:To verify the change, at the Microsoft PowerShell command prompt, type the following command:

    $event
    

    最近常用性設定為 7

請注意RecentPopularityTimeframe參數的值已變更為7Notice that the value for the RecentPopularityTimeframe parameter has changed to 7 .

當我們想要查看訪客如何互動我們網站,檢視每個流量事件的使用情形報告特別有用。但我們想要縮小報表以特定的屬性或類別,例如所有的項目上銷售或所有的筆記型電腦的次數。若要這樣做,我們可以使用關鍵字查詢語言 (KQL)如果您不知道 KQL、 不要擔心。您可以輕鬆地將最常用項目報告縮小而不需要太多的 KQL 語法的知識。Viewing usage reports per usage event is useful when we want to see how visitors are interacting with our site. But many times we 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, we can use Keyword Query Language (KQL) If you don't know KQL, don't worry. You can easily narrow your Most Popular Items report without having much knowledge of the KQL syntax.

在我們的 Contoso 目錄,我們有呼叫RetOnSale的網站欄。每個項目RetOnSale的值會指定的項目是否在銷售或不。In our Contoso catalog, we have a site column called RetOnSale . For each item, the value of RetOnSale specifies whether the item is on sale or not.

Ret On Sale 欄

若要縮小到只顯示銷售上的項目最常用項目報告,我們將使用 managed 的屬性代表RetOnSale網站欄。在 Contoso 案例中,這是RetOnSale (請參閱如何尋找 managed 的屬性名稱)。To narrow the Most Popular Items report to only show items that are on sale, we'll use the managed property that represents the RetOnSale site column. In our Contoso scenario, this is RetOnSale (see How to find a managed property name).

搜尋結構描述中我們可以看到RetOnSale managed 屬性是設定為 Queryable 。這表示即可使用它來縮減最常用項目報告。In the Search Schema, we can see that the RetOnSale managed property is Queryable . This means that we can use it to narrow the Most Popular Items report.

Ret On Sale 查詢

請參閱檢視使用事件統計資料的銷售,在 [最常用項目] 頁面上的項目選取最常用的檢視,並輸入RetOnSale = TrueTo see Views usage event statistics for items that are on sale, on the Most Popular Items page, select Most Views, and enter RetOnSale=True .

Ret On Sale 報告

並且像這樣只顯示在銷售相關的項目。And just like that, only items that are on sale are shown.

您也可以將縮小至特定的類別,例如所有筆記型電腦使用事件統計資料。在 Contoso 案例中,項目類別網站欄用來指定每個項目的類別。You can also narrow usage event statistics to a specific category, for example all Laptops . In our Contoso scenario, the Item Category site column is used to specify the category for each item.

項目類別網站欄

項目類別] 欄中的 managed 的屬性名稱是owstaxIdProductCatalogItemCategoryOwstaxIdProductCatalogItemCategory managed 屬性是設為可查詢,這表示即可使用它來縮減最常用項目報告。The managed property name of the Item Category column is owstaxIdProductCatalogItemCategory . The owstaxIdProductCatalogItemCategory managed property is queryable , which means that we can use it to narrow the Most Popular Items report.

owstax 識別碼產品目錄項目類別

若要查看哪些筆記型電腦中檢視最訪客 [最常用項目] 頁面上選取 [最常用的檢視,並輸入owstaxIdProductCatalogItemCategory:LaptopsTo see which laptops are viewed most by visitors, on the Most Popular Items page, select Most Views, and enter owstaxIdProductCatalogItemCategory:Laptops

膝上型電腦檢視

藉由縮小至特定的類別檢視使用事件統計資料,我們可以驗證熱門項目網頁組件在我們的發佈網站上正確運作。例如,[筆記型電腦] 頁面上發現熱門項目網頁組件中顯示的三個項目相同顯示我們剛縮小至筆記型電腦最常用項目報告中有最常檢視By narrowing the Views usage event statistics to a specific category, we can verify that the Popular Items Web Part is working correctly on our publishing site. For example, on the Laptops page, notice that the three items that are displayed in the Popular Items Web Part are the same that are shown to have the most Views in the Most Popular Items report that we just narrowed to Laptops .

常用項目發行和報告

有兩種方式您可以存取項目的 「 常用性趨勢報告:There are two ways that you can access the Popularity Trends report for an item:

  • 在您目錄、 選取的項目要檢視 「 常用性趨勢 」 報告。在功能區上,按一下 [項目 --> 常用性趨勢 」On your catalog, select the item for which want to view the Popularity Trends report. In the ribbon, click ITEMS --> Popularity Trends.

    常用性趨勢圖示

  • 按一下 [最常用項目] 索引標籤的 [常用性趨勢]。On the Most Popular Items page, click Popularity Trends.

    常用性趨勢連結

這兩個選項會開啟 Microsoft Excel 工作表您可以在其中檢視之項目的每日及每月統計資料。每個流量事件會顯示在不同的索引標籤。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.

常用性趨勢報告

TailTrimming 參數的相關About the TailTrimming parameter

我們活躍的流量分析報告,一個是值得的流量事件參數會為TailTrimming 。此參數會指定在流量分析報表中顯示的號碼應該已更新。While we're on the subject of usage analytics reports, one usage event parameter that is worth mentioning is TailTrimming . This parameter specifies when the numbers that are shown in the usage analytics reports should be updated.

重要

此參數不會影響建議的計算方式。This parameter does not affect how recommendations are calculated.

例如,對於檢視流量事件TailTrimming參數預設會設為 3。For example, for the Views usage event the TailTrimming parameter is by default set to 3.

結尾整理 3

這表示該報告的項目時會更新該項目流量分析內加以檢視至少要有三次過去 24 小時。例如Fabrikam Laptop16 M6000的項目已檢視兩次過去 24 小時內,如果這兩種檢視不會顯示在流量分析報告。如果後續的 24 小時內Fabrikam Laptop16 M6000項目來檢視 4 倍,流量分析報表會更新 4 的檢視。This means that the usage analytics reports will be updated for an item when the item was viewed a minimum three times within the past 24 hours. For example, if the item Fabrikam Laptop16 M6000 was viewed two times within the past 24 hours, these two views won't be displayed in the usage analytics reports. If within the next 24 hours the Fabrikam Laptop16 M6000 item is viewed 4 times, the usage analytics report will be updated with 4 views.

若要避免擁有更新幾乎沒有任何一個網站訪客互動的項目是TailTrimming參數設為 3 的原因。未更新這些項目,可以減少負載系統。反之,當TailTrimming參數設為 3,流量分析報告可以是很準確。在與Fabrikam Laptop16 M6000範例中,兩個檢視中第一個 24 小時將不會顯示設定流量分析報告中。總數的Fabrikam Laptop16 M6000過去最後一個 48 小時的檢視會顯示 4,但事實上,它檢視 6 次。The reason the TailTrimming 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 TailTrimming parameter is set to 3, the usage analytics reports can be somewhat inaccurate. In the example with the Fabrikam Laptop16 M6000 , the two views in the first 24 hours won't be displayed up in the usage analytic reports. Total number of views of Fabrikam Laptop16 M6000 over the last 48 hours will show 4, but in reality, it was viewed 6 times.

如果您想要檢視的長度下限不論更新過去 24 小時內流量分析報告,請執行下列動作:If you want the usage analytics reports to be updated regardless of minimum amount of views within the last 24 hours, do the following:

  1. SharePoint 2016 管理命令介面中,在 Microsoft PowerShell 命令提示字元處輸入下列命令:In the SharePoint 2016 Management Shell, at the Microsoft PowerShell command prompt, type these commands:

    $SSP = Get-SPEnterpriseSearchServiceApplicationProxy
    $tenantConfig = $SSP.GetAnalyticsTenantConfiguration([Guid]::Empty)
    $event = $tenantConfig.EventTypeDefinitions | where-object { $_.EventTypeId -eq <EventTypeId> }
    $event.TailTrimming = <TailTrimming>
    $tenantConfig.Update($SSP)
    

    其中 < EventTypeId> 是數字檢視流量事件定義您想要變更的流量事件及 < TailTrimming> 是最小的數字的流量事件必須針對所要更新的流量分析報告的 24 小時內發生的次數.Where < EventTypeId> is the numeric View the usage event definitions of the usage event that you want to change, and < TailTrimming> is the minimum number of times the usage event has to occur within 24 hours for the usage analytics reports to be updated.

    在下列範例中,我們想要檢視流量事件 24 小時內的檢視流量事件發生時要更新的流量分析報告。因此,我們1及輸入0In the following example, we wanted the usage analytics reports for the Views usage event to be updated if a Views usage event occurs within 24 hours. Therefore, we entered 1 and 0 .

    變更結尾整理

  2. 若要確認的變更,在 Microsoft PowerShell 命令提示字元處輸入下列命令:To verify the change, at the Microsoft PowerShell command prompt, type the following command:

    $event
    

    已變更結尾整理

請注意TailTrimming參數的值已變更為 0。Notice that the value of the TailTrimming parameter has changed to 0.

所以這,這一系列有跳結束。希望您現在能夠更了解的建議和常用項目運作方式,且可以開始將它們新增至您的網站。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.