您可以使用 Google Ads 和 Google Analytics (分析) 評估網站上的使用行為資料。請按照本文中的步驟,為 Google Ads 或 Google Analytics (分析) 帳戶設定代碼。進一步瞭解如何使用網站製作工具或 CMS 加入代碼。
設定 Google 代碼的操作說明,與開頭為「AW-」的代碼 ID (通常是 Google Ads 帳戶) 和開頭為「G-」的代碼 ID (通常是 Google Analytics (分析) 資源)) 不同。請按照下方與代碼對應的說明操作。
事前準備
您必須擁有 Google 代碼 ID,
如果代碼開頭為「AW-」
如要使用這個方法設定 Google 代碼,必須購買付費網站方案。請參閱這篇文章,進一步瞭解 Webflow 方案與定價。
- 登入 Webflow 帳戶。
- 在「Dashboard」(資訊主頁) 中找到要編輯的網站資訊卡。
- 點按 3 點圖示,然後點選「Settings」(設定)。
- 在「Custom code」(自訂程式碼) 分頁下方的「Head」(標頭) 程式碼區段中加入 Google 代碼。
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'TAG_ID');
</script>
- 按一下「儲存變更」。
如果代碼開頭為「G-」
- 登入 Webflow 帳戶。
- 在「Dashboard」(資訊主頁) 中找到要編輯的網站資訊卡。
- 點按 3 點圖示,然後點選「Settings」(設定)。
- 在「Settings」(設定) 頁面中按一下「Integrations」(整合),然後在「Google Analytics (分析)」下方的方塊中輸入代碼 ID。
- 按一下「儲存變更」。