Cloud Retail タグ
この記事は、Cloud Retail タグをクライアント コンテナからサーバー コンテナに移動したいデベロッパーを対象としています。Cloud Retail ウェブコンテナ タグについては、Google Cloud のドキュメントを参照してください。
始める前に
このガイドは、以下を完了されていることを前提とした内容です。
Cloud Retail タグをセットアップする
Google タグ マネージャーを開きます。
サーバー コンテナで、[タグ] メニューを開き、新しいタグを作成します。
[タグの設定] で、[Cloud Retail] を選択します。
Cloud Retail タグをセットアップするには:
- [API キー] に、
projects.locations.catalogs.userEvents.collect
メソッドをサポートする有効な Cloud Retail API キーを入力します。
- [プロジェクト番号] に、Cloud Retail プロジェクトの Google Cloud プロジェクト番号を入力します。
- [上書きするフィールド] で、ビジター ID を次のようにセットアップします。
- フィールド セレクタ:
visitorId
- フィールド値: GA4 イベントからの一意のビジター ID に解決される変数(クライアント ID など)を入力します。
- (省略可)検索イベントを測定する場合:
- フィールド セレクタ:
searchQuery
- フィールド値: 検索クエリを抽出する変数を入力します。
検索イベントは、検索イベントクエリと、
view_item_list
で送信されるクエリのインプレッションを組み合わせて構築されます。
[トリガー] で、タグをトリガーするタイミングを選択します。Google アナリティクス 4 トリガー イベントと Cloud Retail イベント間のマッピングについては、Google Cloud のドキュメントを参照してください。
タグに名前を付けて保存します。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-11-15 UTC。
[null,null,["最終更新日 2024-11-15 UTC。"],[[["This guide helps developers move the Cloud Retail tag from client-side to a server-side container in Google Tag Manager."],["Before starting, ensure you have set up a server container, a tagging server, and the data flow between web and server containers in Tag Manager."],["The setup involves creating a new Cloud Retail tag in your server container, configuring it with your API key and project details, and mapping it to relevant triggers based on Google Analytics 4 events."],["It's crucial to provide a unique visitor ID and optionally include search queries for enhanced tracking in your Cloud Retail tag configuration."]]],["Developers moving Cloud Retail tags to a server container should first ensure they have a server container, tagging server, and data flow from web to server containers established. In the server container, create a new Cloud Retail tag, configuring it with a valid API key, project number, and a visitor ID variable (e.g., client ID). Optionally, configure search event measurement using a search query variable. Finally, select appropriate triggers based on GA4 event mappings and save the tag.\n"]]