---
title: "ユーザーインタラクションの追跡"
slug: "tracking-user-interactions"
abstract: "JSデータパッケージSitecore Searchユーザーインタラクションを登録するためのメソッド。"
---
# ユーザーインタラクションの追跡

JSデータパッケージSitecore Search、コンポーネントとのユーザーインタラクションを登録するためのさまざまな方法を提供します。

## ユーザーインタラクションの登録

以下のコードブロックは、ビューイベントやページビューイベントの登録方法を示しています。これらのメソッドには、HTTPを使ってSearchに接続するために必要なすべての情報が含まれています。認証後にこれらのイベントを呼び出す必要があります。

import {
 trackPageViewEvent,
 trackPageViewEvent
} from "@sitecore-search/data";

const widgetPayLoad = { keyphrase: "search word", index: 0 }
const trackViewEventPayload = { rfkid: "rfk\_id", entities: "content", payload: widgetPayLoad }
trackViewEvent ( trackViewEventPayload )

const entityPayload = { id: "i2382", entityType: "content" }
const pageViewPayload = { items:  entityPayload  }
const trackPageViewEventPayload = { name: "detail", pageViewPayload: widgetPayLoad }
trackPageViewEvent ( trackPageViewEventPayload )

## 利用可能な方法

以下の表は、ユーザーインタラクションを登録するためのさまざまな方法を一覧にしています。特定のウィジェットタイプのイベントに加え、グローバルイベントやファネルイベントもリストに含まれています。

イベントインターフェース

イベントの種類

[trackRecommendationClickEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/recommendation-widget-events.html "Recommendation widget events")

推薦イベント

[trackRecommendationClickEntityEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/recommendation-widget-events.html "Recommendation widget events")

推薦イベント

[trackPreviewSearchClickEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/preview-search-widget-events.html "Preview search widget events")

プレビューSearchイベント

[trackSearchResultsClickEntityEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/search-results-widget-events.html "Search results widget events")

Search Results イベント

[trackSearchResultsFacetClickEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/search-results-widget-events.html "Search results widget events")

Search Results イベント

[TrackViewEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/global-events.html "Global events")

グローバルイベント

[trackAddEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-rest-apis/using-the-events-api-to-track-events/funnel-events.html "Funnel events")

ファネルイベント

[trackRemoveEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-rest-apis/using-the-events-api-to-track-events/funnel-events.html "Funnel events")

ファネルイベント

[trackPageViewEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/global-events.html "Global events")

グローバルイベント

[trackEntityPageViewEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/global-events.html "Global events")

グローバルイベント

[\>trackUserLoginEvent](https://doc.sitecore.com/search/ja/developers/search-developer-guide/integrating-using-search-js-data-package/tracking-user-interactions/global-events.html "Global events")

グローバルイベント