网站分析

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.

Plausible 分析仪表板也已经整合到 Odoo 中,可通过:menuselection:`网站–>报告–>分析`访问。

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.

備註

如果您已经有一个 Plausible.io 账户,并想将其连接到您的 Odoo 在线数据库,您必须创建两个`ir.config.parameters`来使用 Plausible.io 服务器。要执行此操作,请启用:ref:开发者模式<developer-mode>`并进入:menuselection:`常规设置 --> 技术 -- 系统参数。点击 新建 并填写以下 密钥数值 字段:

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.

如果您的数据库托管在**Odoo.sh**或**On-premise**上,或者您希望使用自己的 Plausible.io 账户,请按以下步骤操作:

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

  2. 如果您要创建一个新账户,请执行注册和激活步骤。当要求您提供网站详细信息时,请添加其 域名 而不包括`www`(例如,example.odoo.com),如有必要,请更改 报告时区。单击 添加代码段 进入下一步。忽略 添加 JavaScript 代码段 说明,单击 开始收集数据

  3. 完成后,点击页面左上角的 Plausible 标志,进入 `网站列表<https://plausible.io/sites>`_,然后点击网站旁边的齿轮图标。

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

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

    为新的共享链接创建证书
  6. 复制共享链接。

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

  8. In the SEO section, enable Plausible Analytics, then paste the Shared Link and click Save.

小訣竅

If you have multiple websites, add your websites to your Plausible.io account by going to https://plausible.io/sites and clicking + Add website. In Odoo, in the Website settings, make sure to select the website in the Settings of Website field before pasting the Shared link.

備註

Odoo automatically pushes two custom goals: Lead Generation and Shop.

Google Analytics(分析)

To follow your Odoo website’s traffic with Google Analytics:

  1. Create or sign in to a Google account using the following link: https://analytics.google.com.

    • If you are setting up Google Analytics for the first time, click Start measuring and go through the account creation step.

    • If you already have a Google Analytics account, sign in and click the gear icon in the bottom-left corner of the page to access the Admin page. Then, click + Create Property.

      Measurement ID in Google Analytics.
  2. Complete the next steps: property creation, business details, and business objectives.

  3. When you reach the Data collection step, choose the Web platform.

    Choose a platform for your Google Analytics property.
  4. Set up your data stream: Specify your Website URL and a Stream name, then click Create stream.

  5. Copy the Measurement ID.

    Measurement ID in Google Analytics.
  6. 在 Odoo 中,转至 网站 ‣ 配置 ‣ 设置

  7. In the SEO section, enable Google Analytics, then paste the Measurement ID 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 website in the Settings of Website field before pasting the 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.