試用 Google Analytics 的 MCP 伺服器。從
GitHub 安裝,詳情請參閱
公告。
網站專用 Google Analytics
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面說明網站適用的 Google Analytics,以及開始使用前需要完成的步驟。
Google Analytics 會評估事件,協助您瞭解成效。舉例來說,您可以使用 Google Analytics 評估網站流量、目標對象洞察資料,以及目標對象與您網站的互動情形。
設定帳戶
以下簡要說明如何設定 Google Analytics 帳戶來收集資料:
- 如果還沒有,請建立 Google Analytics 帳戶。
- 建立帳戶後,請建立新資源。資源就像容器,用來存放您收集的資料。
- 建立新資源後,請新增網站資料串流,將網站資料傳送至該資源。
為網站加入代碼
建立含有網站資料串流的 Google Analytics 帳戶後,即可為網站加上代碼並開始收集資料。
建議您使用 Google 代碼管理工具。使用代碼管理工具,您可以變更標記設定,並自動將變更推送到網站,不必每次都修改程式碼。
如需其他標記選項的相關資訊,請參閱「Google Analytics 的標記」。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-04 (世界標準時間)。
[null,null,["上次更新時間:2025-08-04 (世界標準時間)。"],[],[],null,["# Google Analytics for websites\n\nThis page explains Google Analytics for websites, and what you need to do to get\nstarted.\n\nGoogle Analytics measures events to help you learn about your performance. For\nexample, you can use Google Analytics to measure web traffic, insights about\nyour audience, and how they interact with your website.\n| **Tip:** Before you begin, read about the [tagging options for\n| developers](/analytics/devguides/collection/ga4/tag-options).\n\nSet up your account\n-------------------\n\nHere's an overview of the steps to set up your Google Analytics account for data\ncollection:\n\n1. If you don't already have one, [create a Google Analytics\n account](//support.google.com/analytics/answer/9304153#account).\n2. After creating an account, [create a new\n property](//support.google.com/analytics/answer/9304153#property&zippy=%2Cweb). Properties are like containers that hold the data you collect.\n3. Once you've created a new property, [add a web data stream](//support.google.com/analytics/answer/9304153#stream&zippy=%2Cweb) that sends the data from your website to the property.\n\nTag your website\n----------------\n\nOnce you have a Google Analytics account with a web data stream, you're ready to\ntag your site and start collecting data.\n\nWe recommend that you [use Google Tag\nManager](//support.google.com/tagmanager/answer/14842164). With\nTag Manager, you can make changes to your tagging configuration and push them to\nyour site automatically, without needing to change your code every time.\n\nFor information on other tagging options, see [tagging\nfor Google Analytics](/analytics/devguides/collection/ga4/tag-options)."]]