建議與 SharePoint Server 中的熱門項目簡介An introduction to recommendations and popular items in SharePoint Server

摘要:取得建議和常用項目功能在 SharePoint Server 2013 和 SharePoint Server 2016 簡介。Summary:Get an introduction to recommendations and popular items features in SharePoint Server 2013 and SharePoint Server 2016.

在 SharePoint Server 中的建議和常用項目可以顯示因為稱為 「流量分析的功能來追蹤及分析訪客與您的網站之間的互動方式。您可以使用流量分析將內容新增至您的網站,例如 「 檢視此項目的人員也檢視 」 或 「 常用項目在此類別中的。 」 所產生的結果In SharePoint Server, recommendations and popular items can be displayed because a feature known as Usage analytics 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 "People who viewed this item also viewed" or "Popular items in this category."

注意

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

以下是如何使用狀況分析功能 (英文) 的工作:Here's how the Usage analytics features work:

流量分析建議

  1. 訪客不要在我們的網站上的某個項目,例如檢視項目。這會產生流量事件Visitors do something on our website, for example, they view an item. This generates a usage event.

  2. 流量事件會記錄在事件存放區The usage event is recorded in the Event store.

  3. 流量事件傳送至分析處理元件,這些分析的位置。將結果傳送至搜尋索引The usage events are sent to the Analytics Processing Component, where they are analyzed. The result is sent to the Search index.

  4. 當訪客瀏覽至包含建議熱門項目網頁組件] 頁面上時,查詢會自動發出並傳送至搜尋索引。When visitors browse to a page that contains a Recommendations or Popular Items Web Part, a query is automatically issued and sent to the search index.

  5. 查詢結果所傳回的搜尋索引和您的網站上顯示建議常用項目網頁組件中。The query results are returned from the search index and displayed in the Recommendations and Popular Items Web Part on your website.

檢視流量事件定義View the usage event definitions

在 SharePoint Server 中有三個預設流量事件:There are three default usage events in SharePoint Server:

  • 檢視-流量事件被註冊訪客在網站上檢視項目時。Views - a usage event is registered when a visitor views an item on your site.

  • 建議顯示-流量事件已登錄項目顯示為建議在網站上時。Recommendation Displayed - a usage event is registered when an item is displayed as a recommendation on your site.

  • 當訪客按一下顯示為建議在網站上的項目已登錄建議 Clicked-使用事件。Recommendation Clicked - a usage event is registered when a visitor clicks an item that is displayed as a recommendation on your site.

若要檢視流量事件定義,請執行下列動作:To view the usage event definitions, do the following:

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

    SharePoint 2013 管理命令介面

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

    $SSP = Get-SPEnterpriseSearchServiceApplicationProxy
    $SSP.GetAnalyticsEventTypeDefinitions([Guid]::Empty, 3) | ft
    

    會顯示預設流量事件定義。流量事件設定的部分將說明稍後的這一系列。現在,剛注意到每個事件有EventTypeIdEventNameThe default usage event definitions are displayed. Some of the usage event settings will be explained later in this series. For now, just notice that each event has an EventTypeId and an EventName.

    事件類型 ID

    預設流量事件有下列 EventTypeID 值:The default usage events have the following EventTypeID values:

EventTypeIDEventTypeID EventNameEventName
11
檢視Views
22
顯示的建議Recommendation Displayed
33
按下的建議Recommendation Clicked

關於流量分析中的跨網站發佈案例About Usage analytics in a cross-site publishing scenario

重要

流量分析的運作方式是一個重要環節步驟的概觀 (英文) 2:記錄使用事件的事件儲存。在事件存放區,必須使用項目的 URL會記錄每個流量事件。One important aspect of how Usage analytics works is step 2 of the overview: The usage event is recorded in the Event store . In the Event store, each usage event must be recorded using the URL of the item .

這是特別重要的跨網站發佈案例中 (請參閱SharePoint Server 中的跨網站發佈簡介)。跨網站發佈與內容儲存在製作網站集合並顯示在發佈網站集合。受管理的導覽搭配類別頁面和目錄項目頁面來顯示的內容 (請參閱階段 8: 將類別頁面和目錄項目頁面指派給 SharePoint Server 中某個字詞)。這表示該當訪客檢視發佈網站上的項目、 流量事件發生在目錄項目] 頁面上,例如http://www.contoso/sites/Pages/ContosoItemPage.aspx。相同的目錄項目頁面用於顯示的項目數量,因為無法使用目錄項目頁面的 URL 記錄使用事件。針對在跨網站發佈的案例中運作的流量分析、 流量事件必須會記錄在製作網站集合中,例如使用項目的 URL: http://www.contoso/sites/catalog/Lists/Products/DispForm.aspx?ID=12This is especially important in a cross-site publishing scenario (see An introduction to cross-site publishing in SharePoint Server). With cross-site publishing, content is stored in an Authoring site collection and displayed in a Publishing site collection. Managed navigation is used together with category pages and catalog item pages to display content (see Stage 8: Assign a category page and a catalog item page to a term in SharePoint Server). This means that when a visitor views an item on the publishing site, the usage event happens on the catalog item page, for example http://www.contoso/sites/Pages/ContosoItemPage.aspx . Because the same catalog item page is used to display many items, the usage event cannot 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: http://www.contoso/sites/catalog/Lists/Products/DispForm.aspx?ID=12 .

使用 URL 所記錄的流量事件

根據如何您已設定好您的網站,SharePoint Server 自動記錄使用事件之項目的 URL 在製作網站中。以下是您必須自問的問題: 此網頁組件是您以目錄項目] 頁面上顯示的項目?如果答案是目錄項目重複使用網頁組件,然後您必須 nothing 擔心。目錄項目重複使用網頁組件將會自動確定的流量事件會記錄正確的事件儲存。但是,如果您要用於內容搜尋網頁組件顯示的項目在目錄項目] 頁面上,您必須執行一些額外設定步驟。但不要擔心,所有這些步驟將稍後述這一系列。Depending on how you've set up your website, SharePoint Server can automatically record the usage event on the URL of the item in the authoring site. Here's the question that you must ask yourself: which Web Part are you using to display items on your catalog item page? If the answer is Catalog Item Reuse Web Parts, then you have nothing to worry about. The Catalog Item Reuse Web Part will automatically make sure that usage events are recorded correctly in the Event store. But, if you are using a Content Search Web Part to display items on your catalog item page, you must do some additional configuration steps. But don't worry, all these steps will be explained later in this series.

我們繼續之前,是一件事,您需要了解: UsageAnalyticsID managed 屬性。Before we move on, there's one more thing that you need to know about: the UsageAnalyticsID managed property.

關於 UsageAnalyticsID managed 屬性About the UsageAnalyticsID managed property

在我們的 Contoso 網站上的項目都可以在不同的色彩。例如項目台灣視訊 Laptop15.4W M1548位在四個色彩。在製作網站上色彩版本進行分組常見群組編號The items on our Contoso website are available in different colors. For example, the item Southridge Video Laptop15.4W M1548 is available in four colors. On the authoring site, color versions are grouped under a common Group Number .

項目編寫

在發佈網站上,我們使用群組編號項目編號的易記 URL (FURL) 的值。訪客可以輕鬆看見的產品提供其他色彩,以及他們可以快速檢視相關之產品的詳細資料中另一個色彩不必回到 [類別] 頁面上。On the publishing site, we use the value of both Group Number and Item Number in the friendly URL (FURL). Visitors can easily see that the product is available in other colors, and they can quickly view details about the product in another color without having to go back to the category page.

項目發佈

計算建議時預設流量分析計算會考量色彩的項目。例如,建議白色台灣視訊 Laptop15.4W M1548無法證明設為白色Litware 筆記型電腦鍵盤 X105 、 藍色Litware 筆記型電腦鍵盤 X105 、 白色Litware 無線雷射滑鼠 M55及藍色Litware 無線雷射滑鼠 M55The default Usage analytics calculation will consider the color of items when calculating recommendations. For example, recommendations for a white Southridge Video Laptop15.4W M1548 could prove to be a white Litware Laptop Keyboard X105 , a blue Litware Laptop Keyboard X105 , a white Litware Wireless Laser Mouse M55 and a blue Litware Wireless Laser Mouse M55 .

項目建議

兩個建議的鍵盤相同的產品,且讓兩個滑鼠裝置。這些不是很好的建議。若要將略過產品色彩的建議,我們需要變更UsageAnalyticsID managed 屬性的對應。The two recommended keyboards are the same product, and so are the two mouse devices. These are not good recommendations. To get recommendations that will ignore the product color, we have to change the mapping of the UsageAnalyticsID managed property.

根據預設, UsageAnalyticsID會對應至編目的屬性ows_ProductCatalogItemNumber 。如果您是建立製作網站集合時使用產品型錄網站範本 (所述階段 1: 建立跨網站發佈 SharePoint Server 中的網站集合),此編目的屬性代表網站欄項目數字產品] 清單中。By default, UsageAnalyticsID is mapped to the crawled property ows_ProductCatalogItemNumber . If you used the Product Catalog site template when you created your authoring site collection (as explained in Stage 1: Create site collections for cross-site publishing in SharePoint Server), this crawled property represents the site column Item Number in your Products list.

如果您未使用產品型錄網站範本時所建立製作網站集合,或者如果您不想要使用流量分析計算中的 [網站] 欄項目編號,您必須變更UsageAnalyticsID的對應 受管理的屬性。但是,對應變更後,您必須確保您將對應至UsageAnalyticsID屬性用於在易記 URL (FURL) 的目錄項目] 頁面。很有可能您指定此 FURL 何時您的產品] 頁面上的指定 URL 詳細資料。這是因為建議項目網頁組件顯示正確的建議使用介於 FURL 值。此系列中更新的文章將說明如何設定建議項目網頁組件If you didn't use the Product Catalog site template when you created your authoring site collection, or, if you don't want to use the site column Item Number in the Usage analytics calculation, you must change the mapping of the UsageAnalyticsID managed property. But, when you change the mapping, you must make sure that the property that you map to UsageAnalyticsID is used in the friendly URL (FURL) of your catalog item page. Most likely, you specified this FURL when you Specify URL details for a product page. This is because the Recommended Items Web Part uses a value from the FURL to show the correct recommendations. A later article in this series will explain how to configure the Recommended Items Web Part.

請記住,我們產品的色彩版本的群組] 之下常見群組編號和我們用於 FURL 我們目錄項目] 頁面上的群組數的值。因此由至群組編號的編目屬性對應UsageAnalyticsID ,流量分析計算將待完成的群組層次。這表示我們可以顯示為建議的產品群組每項產品。Remember, the color versions of our products are grouped under a common Group Number , and we use the value of Group Number in the FURL of our catalog item page. So, by mapping UsageAnalyticsID to the crawled property of Group Number , the Usage analytics calculation will be done on a group level. This means we can display one product per product group as a recommendation.

項目建議 2

沒有當然,它大於這個更多。如果您是混淆、 hang 發生。功能將會說明逐步範例,我們移動到這一系列。There is of course, more to it than this. If you're confused, hang in there. The features will be described with step-by-step examples as we move through this series.

本系列中的下一篇文章Next article in this series

[變更的內容搜尋網頁組件顯示範本和使用 Windows PowerShell 來啟動 SharePoint Server 中的 流量分析Change the Content Search Web Part display template and use Windows PowerShell to start Usage analytics in SharePoint Server