网站分析

Website analytics helps website owners monitor how people use their site. It provides data on visitor demographics, behavior, and interactions, helping improve websites and marketing strategies.

You can track your Odoo website’s traffic using Plausible.io or Google Analytics. We recommend using Plausible.io as it is privacy-friendly, lightweight, and easy to use.

The Plausible analytics dashboard is also integrated into Odoo and can be accessed via Website ‣ Reporting ‣ Analytics.

Plausible.io

Odoo hosts its own Plausible.io server and provides a free and ready-to-work Plausible.io solution for Odoo Online databases. Odoo automatically creates and sets up your account. You can start using it by going to Website ‣ Reporting ‣ Analytics.

注解

If you already have a Plausible.io account and you want to connect it to your Odoo Online database, you must create two ir.config.parameters to use Plausible.io’s servers. To do so, enable the developer mode and go to General Settings ‣ Technical – System Parameters. Click New and fill in the following Key and Value fields:

website.plausible_script

https://plausible.io/js/plausible.js

website.plausible_server

https://plausible.io

Then, follow the steps below to connect your existing account with Plausible.io servers.

If your database is hosted on Odoo.sh or On-premise, or if you wish to use your own Plausible.io account, proceed as follows:

  1. 使用以下链接创建或登录到Plausible账户: <https://plausible.io/register> _.

  2. 如果您正在创建一个新帐户,请按照注册和激活步骤进行操作。当要求提供您的网站详细信息时,添加其 Domain ,不包括 www (例如, example.odoo.com ),并根据需要更改 Reporting Timezone 。点击 Add snippet 进入下一步。忽略 Add JavaScript snippet 的说明,然后点击 Start collecting data

  3. 完成后,点击页面左上角的 Plausible 徽标以访问您的 网站列表,然后点击网站旁边的齿轮图标。

    在网站列表中点击齿轮图标。
  4. 在侧边栏中,选择 可见性,然后点击 + 新建链接

  5. 输入 名称,将 密码 字段留空,因为 Odoo 中的 Plausible 分析仪表板集成不支持密码,然后点击 创建共享链接

    为新共享链接创建凭据
  6. 复制共享链接。

    从Plausible.io复制共享链接URL
  7. 在Odoo中,转到 网站 ‣ 配置 ‣ 设置

  8. SEO 部分,启用 Plausible Analytics,然后 粘贴 Shared Link 并点击 Save

小技巧

如果您有 多个网站,请在 Plausible.io 帐户中添加您的网站,方法是转到 https://plausible.io/sites 并点击 + 添加网站。在 Odoo 中,在 网站设置 中,在粘贴 共享链接 之前,请确保在 网站设置 字段中选择网站。

注解

Odoo 自动推送两个自定义目标: Lead GenerationShop.

Google Analytics

要使用Google Analytics跟踪您的Odoo网站的流量,请按照以下步骤操作:

  1. 使用以下链接创建或登录Google帐户: <https://analytics.google.com> _.

    • 如果您是第一次设置Google Analytics,请点击 开始测量 并按照账户创建步骤进行操作。

    • 如果您已经拥有Google Analytics账户,请登录并点击页面左下角的齿轮图标以访问 管理 页面。然后,点击 + 创建属性

      Google Analytics中的测量ID。
  2. 完成以下步骤: property creation <https://support.google.com/analytics/answer/9304153?hl=en/&visit_id=638278591144564289-3612494643&rd=2#property> _, business details, and business objectives.

  3. 当您到达 数据收集 步骤时,请选择 Web 平台。

    选择一个平台用于您的Google Analytics属性。
  4. 设置数据流:指定您的 网站 URL流名称,然后点击 创建流

  5. 复制 测量 ID

    Google Analytics中的测量ID。
  6. 在Odoo中,转到 网站 ‣ 配置 ‣ 设置

  7. SEO 部分,启用 Google Analytics,然后粘贴 Measurement ID 并点击 Save

小技巧

如果您有 多个网站 使用不同的域名,建议为每个域名创建 一个属性。在Odoo中,在 网站设置 中,在粘贴 Measurement ID 之前,请确保在 网站设置 字段中选择网站。

Google Tag Manager

GTM 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. To use GTM, proceed as follows:

  1. Create or sign in to a Google account by going to https://tagmanager.google.com/.

  2. In the Accounts tab, click Create account.

  3. Enter an Account Name and select the account’s Country.

  4. Enter your website’s URL in the Container name field and select the Target platform.

  5. Click Create and agree to the Terms of Service.

  6. Copy the <head> and <body> codes from the popup window. Then, go to your website, click Edit, go to the Themes tab, scroll down to the Website Settings section, then click <head> and </body> to paste the codes.

    Install Google Tag Manager

注解

The data is collected in the marketing tools used to monitor the website (e.g., Google Analytics, Plausible, Facebook Pixel), not in Odoo.