---
title: "最初の統合を作成する"
slug: "create-your-first-integration"
abstract: "JS SDK for React、Dataパッケージ、またはAPIを用いてアプリケーションをSitecore Searchと統合するために必要なステップを説明します。"
---
# 最初の統合を作成する

これは [「はじめに」](https://doc.sitecore.com/search/ja/users/search-user-guide/get-started.html "Get started") ウォークスルーシリーズの第3部です。

ウォークスルーシリーズの前半では、特定の要件に合わせたエンティティや体験の設定方法を説明しています。

このウォークスルーでは、開発者がどのように [アプリケーションをSearchと統合するか](https://doc.sitecore.com/search/ja/users/search-user-guide/integrate-the-application.html "Integrate the application") を説明します。開発者は[Sitecore Cloud SDK](https://doc.sitecore.com/sdk/en/developers/005/cloud-sdk/sitecore-cloud-sdk-for-javascript.html)、ReactのSDK、JS Dataパッケージ、またはAPIのいずれかを選択できます。

![Integrate your application using the JS SDK to match the designs.](https://doc.sitecore.com/api/markdown-image/search/ja/users/search-user-guide/images/getstarted-5.PNG)

このウォークスルーでは、以下の方法を説明します:

:::攻略

1.  [ホストと経路に関する情報を取得する](https://doc.sitecore.com/search/ja/users/search-user-guide/get-started/create-your-first-integration.html#retrieve-information-on-hosts-and-paths)
2.  [サブドメインの設定](https://doc.sitecore.com/search/ja/users/search-user-guide/get-started/create-your-first-integration.html#set-up-a-subdomain)
3.  [ウェブサイトやアプリケーションに統合してください](https://doc.sitecore.com/search/ja/users/search-user-guide/get-started/create-your-first-integration.html#integrate-into-a-website-or-an-application):::

## ホストと経路に関する情報を取得する

ホストとパスに関する情報を取得するには:

-   メニューバーで **Developer Resources**をクリックします。 **API Access** タブでは、 **開発者がServer**、 **Authentication**、 **Search and Recommendation**、 **Events**、 **Incremental Feed**のエンドポイントをコピーできます。

## サブドメインの設定

実装用のサブドメインを設定することができます。これには [ドメインとCNAMEレコード](https://doc.sitecore.com/search/ja/users/search-user-guide/integrate-the-application/cname-records-and-subdomain-delegation.html "CNAME records and subdomain delegation")の設定が必要です。

部分ドメインを使用することには以下の利点があります:

-   **トラッキングブロックの回避** - 広告ブロッカーやインテリジェントトラッキング防止(ITP)技術は、サードパーティドメインからのクッキーをブロックすることが一般的であり、匿名訪問者追跡にクッキーを利用するサービスSearchに影響を及ぼします。これを回避するために、 *rfk.yourdomain.com*のようなサブドメインを作成し、Searchがあなたのドメインの下にクッキーを保存できるようにします。この方法により、Searchクッキーがサードパーティとしてフラグを立てられず、専用サブドメインを通じて途切れることなく追跡と報告が可能になります。
-   **認証を簡素化** - サブドメインでSearchを実行することで自動的に信頼され、追加の [認証](https://doc.sitecore.com/search/en/developers/search-developer-guide/en/api-authentication-and-authorization.html) 手順が不要になります。

ドメイン委任を設定するには、以下のいずれかを行います:

-   [Sitecoreの証明書を使いましょう](https://doc.sitecore.com/search/ja/users/search-user-guide/integrate-the-application/cname-records-and-subdomain-delegation/configure-using-sitecore-certificates.html "Configure using Sitecore certificates")
-   [自分の証明書を使ってください](https://doc.sitecore.com/search/ja/users/search-user-guide/integrate-the-application/cname-records-and-subdomain-delegation/configure-using-your-own-certificates.html "Configure using your own certificates")

## ウェブサイトやアプリケーションに統合する

Sitecore Searchは、エンティティ*Content*、*Product*、*Category*、*Store*を用いた[体験で事前に設定](https://doc.sitecore.com/search/ja/users/search-user-guide/ai-driven-experiences.html "AI-driven experiences")されています。これらの体験は、インデックス作成が完了するとすぐにウェブサイトやアプリケーションにSearchと統合されて表示されます。

> !重要事前に設定されたページに関連付けられたURLやURLパターンを、アプリケーションに合わせて更新する必要があります。

検索体験統合のオプションやイベントトラッキングについては、Sitecore Search開発者ドキュメントで詳しく学べます。これには訪問者とのやり取りの追跡も含まれ、パーソナライズを促進し分析インサイトを生成するために使われます。実装したい内容によって、統合のカスタマイズに必要な労力は異なります。

ウェブサイトやアプリケーションをSearchに統合するには、現在のセットアップに応じて以下のオプションのいずれかを選択してください。

-   React実装としては、Search JS SDK for ReactとUI Components CLIをインストールし、CLIを使ってウェブサイトやアプリケーションにウィジェットを追加してください。
-   React JavaScript以外のフレームワークなら、JS Dataパッケージをインストールしてから [最初のクエリで](https://doc.sitecore.com/search/en/developers/search-developer-guide/en/make-your-first-query.html) データ取得を行ってください。
-   その他の実装については、 [APIドキュメント](https://doc.sitecore.com/search/en/developers/search-and-recommentation-api/index.html) を使って [検索体験を作成し、イベントを送信](https://doc.sitecore.com/search/en/developers/search-developer-guide/en/walkthrough--using-apis-to-create-a-search-experience-and-send-events.html)してください。

> !注さまざまな統合方法の詳細については開発者ガイドを参照してください。

## 今後のステップ

以下の手順は、Search機能を探索し、体験をパーソナライズするためのさらなる方法を説明します。

-   計画に記載された [追加のページやウィジェットを作成しましょう](https://doc.sitecore.com/search/ja/users/search-user-guide/display-relevant-results/add-pages-and-widgets.html "Add pages and widgets") 。
-   [検索ウィジェットやrecommendationウィジェットにルールを追加してください。](https://doc.sitecore.com/search/ja/users/search-user-guide/display-relevant-results/variations-and-rules.html "Variations and rules")
-   [分割テストを実行し](https://doc.sitecore.com/search/ja/users/search-user-guide/run-split-tests.html "Run split tests") 、 [そのパフォーマンスを監視](https://doc.sitecore.com/search/ja/users/search-user-guide/monitor-performance.html "Monitor performance")しましょう。