網站分析¶
網站分析可協助網站擁有者監控訪客如何使用其網站。它提供訪客人口統計、行為和互動的資料,有助於改善網站和行銷策略。
您可以使用Plausible.io或Google Analytics(分析)來追蹤您的 Odoo 網站流量。我們建議使用 Plausible.io,因為它重視隱私、輕量且易於使用。
Plausible.io¶
Odoo hosts its own Plausible.io server, and the Plausible Analytics dashboard is integrated into Odoo and can be accessed via .
Databases hosted on Odoo Online benefit from a free, ready-to-use Plausible.io solution with automatically generated credentials and a preconfigured Plausible account. To enable it, go to , then, in the Tracking & SEO section, enable Plausible Analytics, and click Save. The credentials are automatically filled in the Shared Link Auth and the Site fields.
小訣竅
Click the See Analytics Report link to open the corresponding report.
備註
**如果您已經擁有 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 帳戶也會移除現有的金鑰。因此,將產生新的金鑰,而所有歷史資料將繼續與舊金鑰關聯。如果您打算停用該帳戶,建議您儲存現有金鑰以保留對這些資料的存取權限。
If your database is hosted on Odoo.sh or On-premise, you need to create your own Plausible.io account or use an existing one and link it to your database. To do so, follow these steps:
If you are creating a new account, go through the registration and activation steps. On the Add a website page, enter your website Domain name without including
wwworhttp(e.g.,example.com), and click Add site. On the Add tracking to your site page, follow the instructions to install Plausible on your site. Once done, click I’ve installed it to proceed to the next step.完成後,按一下頁面左上角的 Plausible.io 標誌以存取 網站清單,然後按一下網站旁邊的(ellipsis)圖示,並選擇Settings。
In the sidebar, select Visibility, then click Add shared link.
輸入Name,保持Password protect選項停用,因為 Odoo 中的 Plausible 分析 Dashboard 整合不支援此功能,然後按一下Create shared link。
Click COPY to add the shared link to the clipboard.
在 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 Tag Manager is a tag management system that allows you to easily update measurement codes and related code fragments, collectively known as tags, on your website or mobile app, directly through the code injector.
備註
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.
For more information, refer to the documentation on linking Google Analytics and Google Tag Manager.
警告
某些 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 中。