{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["platform-badges","admonition","img"]},"type":"markdown"},"seo":{"title":"Treasure AI Studio - Google Analytics への接続","description":"Google Analytics を Treasure AI Studio に接続し、エージェントが GA4 のレポートを読み取って、トラフィック・ページ・イベント・コンバージョンの状況に答えられるようにします。","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/"}}]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"google-analytics-への接続","__idx":0},"children":["Google Analytics への接続"]},{"$$mdtype":"Tag","name":"PlatformBadges","attributes":{"platforms":["Web","Desktop"]},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Analytics コネクタを使用すると、Treasure AI Studio のエージェントがチャット中に GA4 のデータを読み取れます。アクセス権のあるプロパティについて、集客・ページ・イベント・キーイベントのレポートを取得し、指定したディメンションと指標から任意のレポートを組み立て、今サイトにいるユーザーを確認できます。サイトの行動に関する問いに、GA4 のタブとエクスポートではなくほかのデータと並べて答えを出したいとき — たとえばキャンペーンの流入チャネルと、実際にコンバージョンしたセグメントを突き合わせるとき — に使用します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このコネクションは",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["読み取り専用で、範囲も意図的に絞られています"]},"。エージェントが読めるのはレポートと、それを組み立てるために使えるディメンション・指標です。Analytics の内容を変更することはできず、プロパティの設定内容や管理情報を読むこともできません。Treasure AI が要求するのは読み取り専用の Google スコープなので書き込みはアカウントに届く前に Google 側で拒否され、さらにアカウントのポリシーで範囲が絞られています。一覧は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#%E3%82%A8%E3%83%BC%E3%82%B8%E3%82%A7%E3%83%B3%E3%83%88%E3%81%8C%E3%81%A7%E3%81%8D%E3%82%8B%E3%81%93%E3%81%A8"},"children":["エージェントができること"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"コネクションが初めての方へ"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["まず ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/connections"},"children":["コネクション"]}," で全体像（コネクタとコネクションの違い、管理者とユーザーの役割）を確認してください。このページでは Google Analytics 固有の手順を説明します。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"目的","__idx":1},"children":["目的"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アカウントで Google Analytics コネクタを有効化してコネクションを認可し、チャット中にエージェントが自分のプロパティの GA4 レポートを読み取れるようにします。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前提条件","__idx":2},"children":["前提条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure AI Studio のアカウント管理者権限 — ステップ 1（コネクタの有効化）でのみ必要です"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Google アナリティクス 4 プロパティに少なくとも 1 つアクセスできる Google アカウント。エージェントはこのアカウントとして読み取るため、到達範囲はそのアカウント自身の Analytics のアクセス権に従います（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#%E3%82%A8%E3%83%BC%E3%82%B8%E3%82%A7%E3%83%B3%E3%83%88%E3%81%AB%E8%A6%8B%E3%81%88%E3%82%8B%E7%AF%84%E5%9B%B2"},"children":["エージェントに見える範囲"]}," を参照）"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["対象が ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["GA4"]}," プロパティであること。このコネクタは Google の GA4 API を使用するため、ユニバーサル アナリティクスのプロパティには対応していません"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"誰が何をするか","__idx":3},"children":["誰が何をするか"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Analytics の設定に関わるのは 2 つの役割で、いずれも 1 回で済みます。Google Cloud 側で設定する作業はありません。OAuth アプリケーションは Treasure AI が管理します。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"30%","data-label":"役割"},"children":["役割 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"44%","data-label":"やること"},"children":["やること "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"26%","data-label":"頻度"},"children":["頻度 "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treasure AI Studio の管理者"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[コネクタ設定]"]}," で Google Analytics コネクタを追加して保存します。入力する項目はありません。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["組織で 1 回"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["各メンバー"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[コネクション]"]}," から自分のコネクションを認可し、使用する Google アカウントを選んで要求された権限を許可します。"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 人 1 回"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["登録する OAuth アプリケーションも、作成してプロパティへのアクセス権を与えるサービスアカウントも、追加するネットワークポリシーのルールもありません。各メンバー自身の Google アカウントがそのまま認可になります。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ステップ-1--google-analytics-コネクタを有効化する管理者","__idx":4},"children":["ステップ 1 — Google Analytics コネクタを有効化する（管理者）"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["このコネクタが使用する Google OAuth アプリケーションは Treasure AI が管理するため、Google Cloud コンソールで作成する作業はなく、入力する Client ID やシークレットもありません。設定フォームは空です。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Treasure AI Studio で ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[設定] → [コネクタ設定]"]},"（",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[組織]"]}," の下）を開きます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[コネクタを追加]"]},"（または ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[最初のコネクタを追加]"]},"）をクリックし、",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[Google Analytics]"]}," を選びます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[保存]"]}," をクリックします。入力する項目はありません。コネクタは有効な状態で保存されるため、全ユーザーの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[コネクション]"]}," タブの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[利用可能]"]}," にただちに Google Analytics が表示されます。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-configure-google-analytics.f5a42b1612bc3d95f2d0ebfcd96d3451d4c47cef0a852484054c20121e4d7be8.fdfbfafb.webp","alt":"コネクタ設定の [Configure Google Analytics] フォーム。入力項目は 1 つもなく、見出しの下に [Save] と [Cancel] ボタンだけがある","framed":false,"withLightbox":true,"width":"700px"},"children":[]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connector-google-analytics-configured.47f2e47b49f159cbaec5b341ef9a45a27a7e5b542facd3b10ee8df8a4d178ca5.fdfbfafb.webp","alt":"コネクタ設定に保存された Google Analytics の行。説明文と展開用のシェブロン、有効化トグル、削除アイコンが並び、ネットワークポリシーのリマインダーは表示されていない","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["管理者の作業はこれで終わりです。保存後の行には有効化トグルがありますが、これをオフにすると新規の認可が止まるだけではありません。エージェントに許可された操作から Google Analytics がただちに外れます。新規のチャットだけでなく実行中のチャットにも及びます。進行中の処理が中断されるわけではありませんが、エージェントが次に行う操作が拒否されるため、既存のコネクションもすべて使えなくなります。オンに戻すまでこの状態が続き、その間もメンバーのコネクション自体は残ります。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"コネクタの有効化で与えるのは読み取り権限だけです"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["接続したメンバーは、そのメンバーが到達できるすべてのプロパティの GA4 レポートデータを読み取る権限をエージェントに与えます。それ以外は何も与えません。エージェントはプロパティの設定変更、カスタムディメンション・カスタム指標の作成やアーカイブ、データ保持期間の変更をいずれも行えず、プロパティの設定内容や管理情報を読むこともできません。Treasure AI が要求するのは Google の読み取り専用 Analytics スコープのみなので、メンバーがエージェントに何を頼んでも Google が書き込みを拒否します。加えて書き込み操作はアカウントのポリシーでも個別にブロックされています。有効化の前に検討すべきなのは、そのメンバーの Google アカウントが何を読めるか、という点だけです。"]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"ネットワークポリシーの変更は不要です"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Analytics コネクタは ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["egress ドメインを提示しません"]},"。コネクタ設定にも「このドメインを許可してください」というリマインダーは表示されません。これは意図的な設計です。エージェントのサンドボックスは Analytics の API を呼び出しません。リクエストはサンドボックスの外にある Treasure AI のコネクタサービスが実行するため、サンドボックスの egress を制御する",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/security/network-policy"},"children":["ネットワークポリシー"]},"はこの通信に適用されず、新しいルールを追加する必要もありません。"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ステップ-2--コネクションを認可するユーザー","__idx":5},"children":["ステップ 2 — コネクションを認可する（ユーザー）"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["エージェントに GA4 のデータで作業させたいメンバーは、それぞれ自分のコネクションを認可します。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[設定]"]}," から事前に行うことも、チャットから必要になった時点で行うこともできます。"]},{"$$mdtype":"Tag","name":"ol","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":"strong","attributes":{},"children":["[Google Analytics]"]}," を見つけて ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[接続]"]}," をクリックします。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connections-google-available.961f60ca9f0438f15ef1d0a25d2b063119fcd44264cb7def42d2740de928964e.fdfbfafb.webp","alt":"コネクションページ。[利用可能] に Treasure AI Voice・Google Analytics・Google Calendar・Google Search Console・Treasure Data が並び、それぞれに [接続] ボタンがある","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":3},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Google のポップアップで、Analytics のアクセス権を持つ Google アカウントを選びます。複数のアカウントにサインインしている場合は慎重に選んでください。ここで選んだアカウントがそのままコネクションに紐づきます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["要求されている権限を確認して許可します。Google が要求する権限は 1 つ（Analytics のデータの閲覧）で、そのアカウントが到達できるすべてのプロパティが対象になります。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connections-google-analytics-consent.7053c102eb7cc71bb7ca8756aba8b9a420b1f59be573e1eae71c1be7a798b02c.fdfbfafb.webp","alt":"Google の権限確認画面。「See and download your Google Analytics data」の 1 項目だけが並び、[Cancel] と [Allow] ボタンがある","framed":false,"withLightbox":true,"width":"600px"},"children":[]},{"$$mdtype":"Tag","name":"ol","attributes":{"start":5},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ポップアップが閉じると、接続済みの一覧に ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[Google Analytics]"]}," と接続日が表示されます。"]}]},{"$$mdtype":"Tag","name":"Image","attributes":{"src":"/assets/ai-studio-connections-google-analytics-connected.a3d5fd869be7416451610cb57b41b00b706746021cfd4ec9dfa44d121f32c4fb.fdfbfafb.webp","alt":"コネクションページ。接続済みの一覧に Google Analytics と接続日、削除アイコンが表示されている","framed":false,"withLightbox":true,"width":"800px"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["コネクションが認可するのは 1 つの Google アカウントで、それを通じてそのアカウントがアクセスできるすべての GA4 プロパティが対象になります。Studio が保持する Google Analytics のコネクションはメンバーごとに 1 つのため、別の Google アカウントに切り替えるにはコネクションを削除して認可し直します。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["あとでコネクションを削除するには、横の削除（ゴミ箱）アイコンをクリックします。エージェントはただちにアクセスを失います。このコネクションは書き込みを行わないため、Analytics 側に取り消すべきものはありません。なお、Google アカウントの",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://myaccount.google.com/connections"},"children":["サードパーティ接続"]},"の一覧には Treasure AI Studio が残るため、そちらでも削除する必要があります。"]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"チャットからも接続できます"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["事前に認可しておく必要はありません。接続前にエージェントへサイトのトラフィックについて尋ねると、チャット内に ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[Connection Required]"]},"（コネクションが必要）カードが表示されます。そこで ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[Connect]"]}," をクリックすれば、会話から離れずに同じ認可を実行できます。カードは表示名ではなく内部 ID の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics"]}," を示します。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/connections#%E3%83%81%E3%83%A3%E3%83%83%E3%83%88%E3%81%8B%E3%82%89%E6%8E%A5%E7%B6%9A%E3%81%99%E3%82%8B"},"children":["チャットから接続する"]}," を参照してください。"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ステップ-3--チャットで-google-analytics-を使う","__idx":6},"children":["ステップ 3 — チャットで Google Analytics を使う"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Analytics への接続が済んだら、普通の言葉で尋ねてください。コマンドもチャット内の設定も不要です。例:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「先月、エンゲージメントのあったセッションを最も多く生んだチャネルは? 前月と比べてどう変わった?」"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「GA4 のプロパティを一覧して。どれを使うか指定するから」"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「直近 28 日間のランディングページ上位 20 件をユーザー数順で、エンゲージメント率と平均エンゲージメント時間つきで出して」"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「今四半期、キーイベントの伸びが最も大きい国は?」"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「今サイトに何人いる? 何を見ている?」"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「先週のコンバージョンをデバイスとブラウザで分解して」"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["「キャンペーンの流入元を、実際に購入した CDP のセグメントと突き合わせて」"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["どの操作を使うかはエージェントが自分で決めます。通常はまずプロパティを一覧し、指定されたプロパティに対してレポートを実行します。GA4 プロパティは数値のプロパティ ID で識別され、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["properties/"]}," の接頭辞はあってもなくても構いません。分からない場合は、まずプロパティを一覧するようエージェントに依頼し、返ってきたものから選んでください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["GA4 のレポートには、エージェントが答えられる範囲を左右する制約があります。これは Treasure AI ではなく Google 側の制約です。すべてのディメンションとすべての指標を組み合わせられるわけではありません。エージェントは実行前に組み合わせの可否を確認でき、照会できない場合はそう伝えます。またレポートにはプロパティ単位の API 割り当てがあり、大きなレポートを続けて実行すると使い切ることがあります。残りの割り当ては、レポートと一緒に返させることができます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["GA4 側を変更する作業 — プロパティの編集、カスタムディメンションの追加、データ保持期間の変更 — は人の担当のままです。エージェントは見えている状況と問題点を伝えるところまでで、変更は Google Analytics で行います。プロパティがどう設定されているかという問いも同様です。エージェントが扱うのはレポートのデータで、プロパティの設定情報ではありません。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"エージェントができること","__idx":7},"children":["エージェントができること"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["エージェントが使える操作は次のとおりです。どれを使うかは依頼の内容からエージェントが自分で選びます。操作を直接実行するためのコマンド構文はありませんが、メッセージの中で操作名を挙げればエージェントをその操作へ誘導できます。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"width":"18%","data-label":"領域"},"children":["領域 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"40%","data-label":"操作"},"children":["操作 "]},{"$$mdtype":"Tag","name":"th","attributes":{"width":"42%","data-label":"内容"},"children":["内容 "]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロパティを探す"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.list_properties"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["接続した Google アカウントが見られる GA4 プロパティを、アカウントの文脈とともに一覧します。どれを使うか指定するために使います。1 ページ最大 200 件（ページング対応）です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["定型レポート"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_pages_report"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_events_report"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_acquisition_report"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_key_events_report"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["よく聞かれる問いに対応した 4 本の用意済みレポートです。ページごとのページビュー・ユーザー・セッション・エンゲージメント、イベントの件数・ユーザー・キーイベント・価値、セッションとユーザーの流入元、キーイベントの件数とコンバージョン率。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["任意のレポート"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_report"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_pivot_report"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["必要なディメンション・指標・期間・フィルタ・並び順・コホート・比較・集計からレポートを組み立てます。フラットな表と、クロス集計のピボットの両方に対応します。定型レポートで扱える内容はすべてこちらでも表現できます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["今の状況"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.run_realtime_report"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リアルタイムレポートを読み取ります。今この瞬間にサイトで発生しているユーザーとイベントです。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["レポートの前に"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.get_metadata"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics.check_compatibility"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロパティで使えるディメンションと指標（そのプロパティ独自のものを含む）を一覧し、選んだ組み合わせが照会可能かをレポートを消費する前に確認します。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"google-analytics-コネクタが公開しないもの","__idx":8},"children":["Google Analytics コネクタが公開しないもの"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["エージェント経由で Google Analytics の内容が変わることはなく、読み取りの範囲もレポートまでで止まります。知っておく価値があるのは次の点です。"]},{"$$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":["カスタムディメンション・カスタム指標の変更はできません。"]}," 作成もアーカイブもできません。GA4 のアーカイブは取り消せず、枠数にも上限があるため、誤りを元に戻せません。"]},{"$$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":["アカウントやユーザーの管理はできません。"]}," プロパティやアカウントの作成、アクセス権を持つユーザーの変更はできません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ユニバーサル アナリティクスは対象外です。"]}," このコネクタは Google の GA4 API 経由で GA4 プロパティを読み取ります。ユニバーサル アナリティクスのプロパティは対象になりません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ほかの Google プロダクトは対象外です。"]}," このコネクタが到達するのは Google Analytics だけです。Google Search Console と Google Calendar は別のコネクタで、それぞれ個別の認可が必要です。"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"エージェントに見える範囲","__idx":9},"children":["エージェントに見える範囲"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Google Analytics コネクタはあなた自身の Google の認可を持つため、到達範囲は接続した Google アカウントの Analytics のアクセス権によって決まります。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["そのアカウントが ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Google Analytics で開けるすべての GA4 プロパティ"]},"が対象で、それ以外は対象外です。コネクションを 1 つのプロパティに限定する方法はありません。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["各プロパティのロールが許す範囲のデータ。"]}," Google はプロパティまたはアカウント単位でロールを割り当てており、エージェントはそれをそのまま引き継ぎます。Analytics で閲覧しかできないプロパティは、エージェントも読み取りしかできません。"]},{"$$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":"p","attributes":{},"children":["これを適用するのはリクエストを受け取った Google 側であり、Treasure AI Studio ではありません。プロンプトで範囲を広げることはできません。エージェントは範囲を狭めること（1 つのプロパティだけ、1 つの期間だけを見るよう指示する）はできますが、広げることはできません。"]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"リファレンス","__idx":10},"children":["リファレンス"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"項目"},"children":["項目"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値"},"children":["値"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["コネクタ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google Analytics"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["内部 ID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["google_analytics"]}," — チャットの ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[Connection Required]"]}," カードに表示される ID"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["認証"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["OAuth 2.0 認可コード + PKCE（user-to-machine）、プラットフォーム管理の Google OAuth アプリケーション"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["要求する Google スコープ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 つ: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://www.googleapis.com/auth/analytics.readonly"]},"。読み書き可能な ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["analytics.edit"]}," スコープは意図的に要求しません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["必要な設定"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["なし。管理者は入力項目のないままコネクタを保存します"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["アクセス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["読み取り専用、かつレポートに範囲を絞っています — プロパティの一覧、定型レポート 4 本、任意レポートとピボットレポート、リアルタイムレポート、レポートを組み立てるためのメタデータと互換性チェック。エージェント経由で Analytics の内容を変更することはできず、設定情報を読むこともできません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["使用する Google API"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Analytics Data API v1beta（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://analyticsdata.googleapis.com/v1beta"]},"）、リアルタイムと割り当てのための v1alpha エンドポイント、Analytics Admin API v1beta（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["https://analyticsadmin.googleapis.com/v1beta"]},"）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["対応プロパティ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GA4 プロパティのみ。ユニバーサル アナリティクスには非対応"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロパティの識別子"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["数値の GA4 プロパティ ID（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["properties/"]}," の接頭辞はあってもなくても可）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 ページあたりのプロパティ数"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最大 200 件（トークンによるページング）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ディメンションと指標の組み合わせ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["すべての組み合わせが照会できるわけではありません。レポートで失敗して気づく前に、エージェントが実行前に可否を確認できます"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["割り当て"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Google はプロパティ単位で Data API の割り当てを適用します。大きなレポートを続けて実行すると使い切ることがあります。残りの割り当てはレポートと一緒に返させることができますが、レポートを実行せずに読み取る手段はありません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エージェントの識別情報"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["認可した Google アカウントとして読み取ります。書き込みを行わないため、そのアカウントの操作として Analytics に記録されるものはありません"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["リクエストの実行場所"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エージェントのサンドボックス外にある Treasure AI のコネクタサービス"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["egress ドメイン"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["なし — サンドボックスは Analytics の API に到達しないため、ネットワークポリシーのルールは不要です"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["トークンの有効期間"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["短命なアクセストークンを自動で更新します。そのためコネクションは接続し直さずにセッションをまたいで有効なままです"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["メンバーあたりのコネクション数"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1 つ（Google アカウント 1 つ分と、そのアカウントがアクセスできるすべての GA4 プロパティが対象）"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"トラブルシューティング","__idx":11},"children":["トラブルシューティング"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"症状"},"children":["症状"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"対処"},"children":["対処"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["コネクションタブに Google Analytics が表示されない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["管理者が ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[コネクタ設定]"]}," で Google Analytics コネクタを追加し、有効化する必要があります。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エージェントがプロパティを 1 つも見つけられない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Analytics のアクセス権を実際に持つ Google アカウントを認可したか確認してください。ポップアップのアカウント選択は流してしまいやすい箇所です。異なる場合はコネクションを削除し、正しいアカウントで接続し直します。ユニバーサル アナリティクスのプロパティはそもそも表示されません。表示されるのは GA4 プロパティだけです。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロパティが見つからないとエージェントが報告する"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["数値の GA4 プロパティ ID を使ってください。プロパティの表示名ではなく、プロパティを一覧するようエージェントに依頼して返ってきた識別子を使います。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ディメンションと指標が非互換だというエラーでレポートが失敗する"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["GA4 はすべての組み合わせを許可していません。先に組み合わせの可否を確認し、成立する組み合わせを提案するようエージェントに依頼するか、リクエストを 2 本のレポートに分けてください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["数値が GA4 の画面と一致しない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["期間・プロパティ・フィルタが一致しているか確認してください。GA4 自体もデータのしきい値処理とサンプリングを行うため、細かく分解したレポートの合計が、粗い粒度の同じレポートより小さくなるのは正常です。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["大きなレポートを何本か実行したあとで失敗するようになる"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["そのプロパティの Data API の割り当てを使い切っています。次のレポートに残りの割り当ても返させるようエージェントに依頼し、レポートの本数やサイズを減らすか、時間をおいて再実行してください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロパティの設定変更を頼んだら断られた"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["想定どおりの動作です。このコネクションは読み取り専用で、プロパティの編集・カスタムディメンションとカスタム指標の作成やアーカイブ・データ保持期間の変更はいずれもブロックされており、読み取り専用スコープでもそもそも拒否されます。変更は Google Analytics で行ってください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["プロパティのデータストリームを聞いたら答えられなかった"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["想定どおりの動作です。設定情報の読み取りはこのコネクタの範囲外です。データストリームは Google Analytics で確認してください。知りたいのが「この数字が何を含んでいるか」であれば、ストリーム別に分解したレポートをエージェントに依頼してください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エージェントが再接続を求めてくる"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["認可が失効したか、Google 側で取り消されています（Google アカウントのサードパーティ接続から Treasure AI Studio を削除した場合も含みます）。",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["[設定] → [コネクション]"]}," から接続し直してください。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["コネクションタブからコネクタが消えた"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["管理者が無効化した可能性があります。コネクション自体は保持されますが、コネクタが再度有効化されるまでエージェントは Google Analytics を利用できません。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"次のステップ","__idx":12},"children":["次のステップ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/connections"},"children":["コネクション"]}," — コネクションの全体像と管理者向けの制御"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/connections/google-search-console"},"children":["Google Search Console への接続"]}," — エージェントに Google 検索のパフォーマンスデータを読み取らせる"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/connections/google-calendar"},"children":["Google Calendar への接続"]}," — エージェントにカレンダーの読み取りと予定の作成・更新をさせる"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/skills/skills"},"children":["スキルとマーケットプレイス"]}," — スキルがエージェントにドメイン専門知識を与える仕組み"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/ja/products/ai-studio/security"},"children":["セキュリティ概要"]}," — Studio でのアクセス制御の仕組み"]}]}]},"headings":[{"value":"Google Analytics への接続","id":"google-analytics-への接続","depth":1},{"value":"目的","id":"目的","depth":2},{"value":"前提条件","id":"前提条件","depth":2},{"value":"誰が何をするか","id":"誰が何をするか","depth":2},{"value":"ステップ 1 — Google Analytics コネクタを有効化する（管理者）","id":"ステップ-1--google-analytics-コネクタを有効化する管理者","depth":2},{"value":"ステップ 2 — コネクションを認可する（ユーザー）","id":"ステップ-2--コネクションを認可するユーザー","depth":2},{"value":"ステップ 3 — チャットで Google Analytics を使う","id":"ステップ-3--チャットで-google-analytics-を使う","depth":2},{"value":"エージェントができること","id":"エージェントができること","depth":2},{"value":"Google Analytics コネクタが公開しないもの","id":"google-analytics-コネクタが公開しないもの","depth":3},{"value":"エージェントに見える範囲","id":"エージェントに見える範囲","depth":2},{"value":"リファレンス","id":"リファレンス","depth":2},{"value":"トラブルシューティング","id":"トラブルシューティング","depth":2},{"value":"次のステップ","id":"次のステップ","depth":2}],"frontmatter":{"seo":{"title":"Treasure AI Studio - Google Analytics への接続","description":"Google Analytics を Treasure AI Studio に接続し、エージェントが GA4 のレポートを読み取って、トラフィック・ページ・イベント・コンバージョンの状況に答えられるようにします。"},"platforms":["Web","Desktop"]},"lastModified":"2026-09-17T03:16:34.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/products/ai-studio/connections/google-analytics","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}