网站分析¶
网站分析帮助网站所有者监控人们如何使用其网站。它提供有关访问者人口统计、行为和互动的数据,有助于改进网站和营销策略。
您可以使用Plausible.io或Google 分析跟踪您的 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 Online 数据库,则必须创建两个 ir.config.parameters 才能使用 Plausible.io 的服务器。为此,请启用开发者模式并前往。点击新建并填写以下键和值字段:
键
值
website.plausible_script
https://plausible.io/js/plausible.js
website.plausible_server
https://plausible.io
然后,转到Plausible网站并按照步骤:ref:`设置您的账户 <analytics/account-setting>`并将其链接到您的Odoo数据库。
警告
停用链接到您的 Odoo Online 数据库的免费 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徽标以访问
网站列表<https://plausible.io/sites>,然后点击网站旁边的)图标并选择设置。
In the sidebar, select Visibility, then click Add shared link.
输入名称,保持密码保护`选项处于禁用状态,因为Odoo中的Plausible analytics仪表板集成不支持该选项,然后点击:guilabel:`创建共享链接。
Click COPY to add the shared link to the clipboard.
在 Odoo 中,转至 。
在跟踪和SEO部分,启用Plausible Analytics,然后粘贴共享链接认证`并点击:guilabel:`保存。
小技巧
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 分析¶
要使用 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.
当您进入数据收集步骤时,选择网站平台。
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 Tag Manager 可能不符合当地的数据保护法规。
要配置 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 中。