網站分析¶
網站分析可協助網站擁有者監控訪客如何使用其網站。它提供訪客人口統計、行為和互動的資料,有助於改善網站和行銷策略。
您可以使用Plausible.io或Google Analytics(分析)來追蹤您的 Odoo 網站流量。我們建議使用 Plausible.io,因為它重視隱私、輕量且易於使用。
Plausible.io¶
Odoo 托管了自己的 Plausible.io 服务器,Plausible Analytics 仪表板已集成到 Odoo 中,可通过访问。
托管在 Odoo Online 上的数据库可享用免费、即开即用的 Plausible.io 解决方案,其中包含自动生成的凭据和预配置的 Plausible 账户。要启用此功能,请前往,然后在跟踪与 SEO部分,启用Plausible Analytics,并单击保存。系统会自动在共享链接认证和站点字段中填入凭据。
小訣竅
单击 查看分析报告链接以打开相应报告。
備註
**如果您已經擁有 Plausible.io 帳戶**並希望將其連線到您的 Odoo 雲端版資料庫,您必須建立兩個 ir.config.parameters 才能使用 Plausible.io 的伺服器。若要這樣做,請啟用開發者模式並前往。按一下新增並填寫以下鍵和值欄位:
鍵
值
website.plausible_script
https://plausible.io/js/plausible.js
website.plausible_server
https://plausible.io
然後,前往 Plausible 網站並依照步驟設定您的帳戶並將其連結到您的 Odoo 資料庫。
警告
停用與您的 **Odoo 雲端版**資料庫連結的免費 Plausible.io 帳戶也會移除現有的金鑰。因此,將產生新的金鑰,而所有歷史資料將繼續與舊金鑰關聯。如果您打算停用該帳戶,建議您儲存現有金鑰以保留對這些資料的存取權限。
如果您的数据库托管在 Odoo.sh 或本地部署(On-premise),则需要创建自己的 Plausible.io 账户或使用现有账户,并将其关联至数据库。为此,请按照以下步骤操作:
如果是创建新账户,请完成注册和激活步骤。在添加网站页面上,输入网站域名(无需包含
www或http,例如example.com),然后单击添加站点。在为站点添加跟踪页面上,按照说明在站点上安装 Plausible。完成后,单击我已安装以进入下一步。完成後,按一下頁面左上角的 Plausible.io 標誌以存取 網站清單,然後按一下網站旁邊的(ellipsis)圖示,並選擇Settings。
在側邊欄中,選擇可見度,然後按一下加入共用連結。
輸入Name,保持Password protect選項停用,因為 Odoo 中的 Plausible 分析 Dashboard 整合不支援此功能,然後按一下Create shared link。
单击 复制,将共享链接添加到剪贴板。
在 Odoo 中,前往。
在Tracking & SEO區段中,啟用Plausible Analytics,然後貼上Shared Link Auth並按一下Save。
小訣竅
If you have multiple websites, add them to your Plausible.io account by going to https://plausible.io/sites and clicking + Add Website. In the Odoo Website settings, ensure that the correct website is selected from the dropdown menu at the top of the page before pasting the shared link.
Odoo automatically pushes two custom goals:
Lead GenerationandShop. Custom goals can be added via Plausible.io. To do so, click the (ellipsis) button on the relevant website card, then navigate to Goals in the sidebar menu, and click Add goal .
Google Analytics(分析)¶
若要使用 Google Analytics 追蹤您的 Odoo 網站流量:
使用以下連結建立或登入 Google 帳戶:https://analytics.google.com。
如果您是第一次設定 Google Analytics(分析),請按一下開始評估並完成帳戶建立步驟。
If you already have a Google Analytics account, sign in and click the icon in the bottom-left corner of the page to access the Admin page. Then, click Create and select Property from the drop-down menu.
Complete the next steps: property creation, Business details, and Business objectives, and click Create.
當您到達Data collection步驟時,選擇Web平台。
Set up your data stream: Specify your Website URL and a Stream name, then click Create & continue in the upper-right corner.
Close the Set up a Google Tag popover, as no Google Tag is required to link Google Analytics to Odoo.
In the Web stream details popover, copy the Measurement ID.
在 Odoo 中,前往。
In the Tracking & SEO section, enable Google Analytics, then paste the measurement ID in the Measurement ID or Tag field and click Save.
小訣竅
If you have multiple websites with separate domains, it is recommended to create one property per domain. In Odoo, in the Website settings, make sure to select the correct website in the field next to New website at the top of the page before pasting the Measurement ID.
Google 代碼管理工具¶
Google 代碼管理工具是一種代碼管理系統,可讓您直接透過程式碼注入器,輕鬆更新網站或行動應用程式上的評估程式碼和相關程式碼片段(統稱為代碼)。
備註
GTM is not an analytics tool and does not offer reporting features. It is used to collect data and works alongside Google Analytics to provide more detailed insights. To use GTM properly, it is recommended to configure Google Analytics as well.
如需更多資訊,請參閱`連結 Google Analytics(分析)和 Google 代碼管理工具的使用說明<https://support.google.com/tagmanager/answer/9442095?hl=en>`_。
警告
某些 GTM 代碼使用資料層(例如進階電子商務追蹤資料層)來擷取變數並將其傳送至 Google Analytics(分析)。Odoo 目前不管理資料層。
Google 代碼管理工具可能不符合當地的資料保護法規。
若要配置 GTM,請按照以下步驟操作:
前往 https://tagmanager.google.com/ 建立或登入 Google 帳戶。
在帳戶分頁中,按一下建立帳戶。
輸入帳戶名稱並選取帳戶的國家/地區。
在容器名稱欄位中輸入您網站的網址,並選取目標平台。
按一下建立並同意服務條款。
Copy the
<head>and<body>codes from the pop-up window. Then, go to your website, click Edit, go to the Theme tab, scroll down to the Advanced section, then click <head> and </body> next to Code Injection to paste the codes, then click Save.
備註
資料會收集在用於監控網站的行銷工具中(例如 Google Analytics(分析)、Plausible、Facebook Pixel),而非 Odoo 中。