{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Salesforce Commerce Cloud Site Cartridge Web Tracking Integration","description":"Salesforce Commerce CloudでTreasure AIのウェブトラッキングを簡単に実装し、サイト全体のユーザーデータを収集するためのカートリッジ設定方法を説明します。","siteUrl":"https://docs.treasure.ai","lang":"en-US","jsonLd":{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://www.treasure.ai/","name":"Treasure AI","url":"https://www.treasure.ai/","logo":"https://www.treasure.ai/hubfs/assets/images/logos/primary-logo.svg"},{"@type":"WebSite","@id":"https://docs.treasure.ai/#website","name":"Treasure AI Documentation","url":"https://docs.treasure.ai/","inLanguage":["en","ja"],"publisher":{"@id":"https://www.treasure.ai/"}}]},"llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"salesforce-commerce-cloud-site-cartridge-web-tracking-integration","__idx":0},"children":["Salesforce Commerce Cloud Site Cartridge Web Tracking Integration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.salesforce.com/products/commerce-cloud/overview/"},"children":["Salesforce Commerce Cloud"]},"は、業界で最も機敏でスケーラブルなeコマースプラットフォームの1つです。Treasure Dataは、オンラインストアフロントにTreasure Data JavaScript SDKを迅速に実装できる、認定されたSalesforce Commerce Cloudカートリッジを提供しています。このカートリッジは、サイト全体にTD JavaScript SDKトラッキングを自動的にデプロイし、以下のようなさまざまなタイプのデータを収集できるようにします："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ページインプレッション:"]}," ユーザーが訪問しているページを発見します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["イベントトラッキング:"]}," 製品の購入やユーザーの活動に関するその他の情報を含む、ユーザーが実行したアクションを識別します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["クリックトラッキング"]},": リンク、ボタン、input要素など、ユーザーが選択したオブジェクトを追跡します。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataカートリッジは、Commerce Cloud内にデータを保存しません。カートリッジによって追跡・収集されたすべてのデータは、Treasure Dataのセキュアなプラットフォーム内に保存されます。このデータを収集した後、Commerce CloudのデータをTreasure Data内の顧客データと簡単に統合でき、eコマースの購入と行動から追加のインサイトを得ることができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2022-4-17_23-6-14.5921dea435b8b17deea1fcd05bbd32a9c9bb2507aeb0f3f68b6bc15199d73c93.84f5db3d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件と制限事項","__idx":1},"children":["前提条件と制限事項"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure アカウント"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Salesforce Commerce Cloudアカウント"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Salesforce Commerce Cloud (SFRA) バージョン6.0.0。互換性モード: 21.10"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Salesforce Commerce Cloudコンソールのトラッキング機能を設定経由で有効にするには、以下が必要です：",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure API writeキー"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["URL"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["データを保存するデータベースとテーブル名"]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["カートリッジ自体の可用性は100%を想定しています。トラッキング機能の可用性は、Treasure APIサービスの可用性に依存します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["カートリッジがダウンした場合でも、ワークフローが中断されることはなく、必要に応じてカスタム設定を介してカートリッジを無効にすることができます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"プライバシー","__idx":2},"children":["プライバシー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataカートリッジは、ユーザープロファイル情報とStorefrontサイト情報を自動的に収集または処理しません。クレジットカードデータは解析または収集されません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"commerce-cloudカートリッジのセットアップ","__idx":3},"children":["Commerce Cloudカートリッジのセットアップ"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.salesforce.com/products/commerce-cloud/partner-marketplace/partners/treasure-data/"},"children":["AppExchangeからTDカートリッジをダウンロード"]},"します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["int_treasuredataカートリッジをサーバーまたはサンドボックスにアップロードします。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["カートリッジを登録します：**Business Manager: Administration > Sites > Manage Sites > [サイトを選択]**に移動します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Settings"]},"タブを選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Cartridgesフィールドで、リストの最後にint_treasuredataをコロンで区切って追加します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Apply"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["次のステップは、Custom Site PreferencesをBusiness Managerにインポートすることです。準備として、link_treasuredataルートフォルダの下にあるmetadataフォルダをzipするか、ルートフォルダにあるmetadata.zipを使用できます。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Business Managerにログインします。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Administration > Site Development > Site Import & Export"]},"に移動します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Choose File"]},"を選択し、ステップ1のmetadata.zipを参照します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Upload"]},"を選択します。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2022-4-18_9-37-37.3bec2dccf8a88257f9fb6afe593117019bf0d084ad4eb625b5f1464872c52331.84f5db3d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":12},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["metadata.zipファイルを選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Import"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["インポートを確認します。"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"カートリッジの設定","__idx":4},"children":["カートリッジの設定"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data設定グループでいくつかのカスタムサイト設定を行う必要があります。設定の詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/td-js-sdk"},"children":["JS SDKドキュメント"]},"をご覧ください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["設定を行うには："]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Merchant Tools > Site Preferences > Custom Preferences"]},"に移動します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["TreasureData"]},"設定グループを選択して、各設定の詳細を確認します。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["サイト設定を編集します。カートリッジが動作するには、以下のサイト設定を設定する必要があります："]}]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Enabled"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Write-only key"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Database name"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["その他のサイト設定はオプションです。要件に応じて、設定オプションをオンまたはオフに切り替えることができます。設定の詳細については、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/td-js-sdk"},"children":["JS SDKドキュメント"]},"をご覧ください。"]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":4},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Save"]},"を選択します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"トラッキングのセットアップ","__idx":5},"children":["トラッキングのセットアップ"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"テンプレートの更新","__idx":6},"children":["テンプレートの更新"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["templates/default/common/layout/page.isml"]},"に移動します。テンプレートを更新するには、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["head"]},"タグの下に次の行を追加します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<isinclude template=\"treasuredata/tdSnippet\" />\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このTreasure Dataテンプレートにより、TD JavaScript SDKスニペットがサイトにダウンロードされ、トラッキングアクションを処理します。ダウンロードは非同期で行われ、ページの読み込みに影響を与えません。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ページビュートラッキングの追加","__idx":7},"children":["ページビュートラッキングの追加"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["テンプレートが更新された後、サイトにページビュートラッキングを追加するスクリプトを追加できます。次のように、トラッキングページビュー関数を呼び出すためにisscriptタグを追加します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"isscript","header":{"controls":{"copy":{}}},"source":"isscript\nrequire('*/cartridge/scripts/tdTrack').trackPageview()\n</isscript>\n","lang":"isscript"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"イベントトラッキングの追加","__idx":8},"children":["イベントトラッキングの追加"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["また、顧客が閲覧した特定の製品の製品名やIDなどのカスタムデータを追跡するイベントトラッキングを追加することもできます。これには、コントローラーにカスタムコードを記述し、tdTrack.js関数を呼び出す必要があります。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["テンプレートファイルからtdTrack.js関数を呼び出して、次のコードを使用してカスタムデータを追跡できます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"isscript","header":{"controls":{"copy":{}}},"source":"<isif condition=\"${pdict.tdData}\">\nisscript\nrequire('*/cartridge/scripts/tdTrack').trackEvent(pdict.tdData)\n</isscript>\n</isif>\n","lang":"isscript"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["pdict"]},"内の",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["tdData"]},"プロパティ名は必須ではありません。コントローラーで任意の名前を付けることができます。また、予期しないエラーを回避するために、トラッキング関数を呼び出す前にプロパティが設定されていることを確認してください。"," ","次の製品コントローラーの例で、カスタムコードの使用方法を確認できます："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"img","attributes":{"src":"/assets/image2022-4-18_10-42-47.910293d0b84793ebdb2429639c38d391a25c21a0f435d8efea18538ecd19e2f4.84f5db3d.png","alt":""},"children":[]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ページビューとイベントトラッキングのisscriptは、要件に基づいて任意のページに追加できますが、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["templates/default/common/layout/page.isml"]},"のheadタグの下に追加し、Treasure Dataテンプレートの後に追加することを要求することで、サイトのすべてのページで動作させることができます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"クリックトラッキングの追加","__idx":9},"children":["クリックトラッキングの追加"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Enable Click Tracking?",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["設定を"]},"Yes"]},"に設定することで、この機能を有効にできます。クリックトラッキングが有効になると、Treasure Dataスクリプトは次の要素でのクリックアクションを追跡します："]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["role=buttonまたはrole=link"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["a"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["button"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["input、",{"$$mdtype":"Tag","name":"input","attributes":{"type":"password"},"children":[]},"を除く"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Dataカートリッジは、オンラインストアフロントとTreasure Dataプラットフォーム間で必要なすべての通信を、非同期JavaScriptを介して自動的に処理します。これはトラッキング機能のみを実行し、表示可能なページコンテンツには影響を与えません。"]}]}]},"headings":[{"value":"Salesforce Commerce Cloud Site Cartridge Web Tracking Integration","id":"salesforce-commerce-cloud-site-cartridge-web-tracking-integration","depth":1},{"value":"前提条件と制限事項","id":"前提条件と制限事項","depth":2},{"value":"プライバシー","id":"プライバシー","depth":2},{"value":"Commerce Cloudカートリッジのセットアップ","id":"commerce-cloudカートリッジのセットアップ","depth":2},{"value":"カートリッジの設定","id":"カートリッジの設定","depth":2},{"value":"トラッキングのセットアップ","id":"トラッキングのセットアップ","depth":2},{"value":"テンプレートの更新","id":"テンプレートの更新","depth":3},{"value":"ページビュートラッキングの追加","id":"ページビュートラッキングの追加","depth":3},{"value":"イベントトラッキングの追加","id":"イベントトラッキングの追加","depth":3},{"value":"クリックトラッキングの追加","id":"クリックトラッキングの追加","depth":3}],"frontmatter":{"seo":{"title":"Salesforce Commerce Cloud Site Cartridge Web Tracking Integration","description":"Salesforce Commerce CloudでTreasure AIのウェブトラッキングを簡単に実装し、サイト全体のユーザーデータを収集するためのカートリッジ設定方法を説明します。"}},"lastModified":"2026-06-17T07:22:53.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/int/salesforce-commerce-cloud-site-cartridge-web-tracking-integration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}