网站分析

网站分析帮助网站所有者了解人们如何使用他们的网站。它提供有关访问者人口统计、行为和互动的数据,有助于改进网站和营销策略。

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. If you are creating a new account, go through the registration and activation steps. When asked to provide your website details, add its Domain without including www (e.g., example.odoo.com) and change the Reporting Timezone if necessary. Click Add snippet to proceed to the next step. Ignore the Add JavaScript snippet instructions and click Start collecting data.

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

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

  5. Enter a Name, leave the Password field empty, as the Plausible analytics dashboard integration in Odoo doesn’t support it, then click Create shared link.

    为新共享链接创建凭据
  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

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

  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.

      Google Analytics中的测量ID。
  2. Complete the next steps: property creation, business details, and business objectives.

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

    选择一个平台用于您的Google Analytics属性。
  4. Set up your data stream: Specify your Website URL and a Stream name, then click Create stream.

  5. Copy the Measurement ID.

    Google Analytics中的测量ID。
  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.

警告

  • Some GTM tags use data layers (e.g., advanced eCommerce tracking data layers) to retrieve variables and send them to Google Analytics. Data layers are currently not managed in Odoo.

  • Google Tag Manager may not be compliant with local data protection regulations.

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.

    安装语言

注解

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