China Marketing Blog

A Thorough Guide to Baidu Analytics (Baidu Tongji)

Tait Lawton — Mon, 10/01/2012 - 03:39

This is meant to be a thorough, informative guide to Baidu Analytics, also known as Baidu Tongji or 百度统计. Google Analytics has been used as the basis of comparison since it is the most used web analytics tool in the English-reading world.

This guide will be updated periodically.

It was last updated on: Mar 1, 2013.

Reasons to use Baidu Tongji

Before you decide whether or not you’d like to use Baidu Tongji, consider some of the benefits it provides.

  1. Integration with Baidu Tuiguang (Baidu pay per click marketing). View your creatives, ad impressions, cost data and more right within the Baidu analytics platform.
  2. Baidu tracks each individual user, allowing you to see all the pages they visited. The lack of this kind of tracking is what often drives Google Analytics users to use other web analytics systems such as Baidu has it built in. This can be viewed in the Real-time Visitors report (实时访客 ).
  3. Baidu heat map (More info)
  4. Baidu index checker (More info)
  5. Option to reveal website stats publicly without the need for a third-party tool.

Major Shortcomings of Baidu Tongji

  1. No custom reports.
  2. Region reporting uses “Other Country” for everywhere but mainland China, Hong Kong, Taiwan and Japan.
  3. Interface is only in Chinese.
  4. Possible lack of accuracy, some search traffic recorded as referral traffic.
  5. No e-commerce tracking like Google Analytic's e-commerce feature.

Setup, Administration


You can login to Baidu Tongji via your Baidu Tuiguang (pay per click) account or Baidu Zhanzhang (webmasters) account.

Baidu Zhanzhang account registration is free.

To get started, go to

Script Installation

Baidu Tongji offers too install methods:

  1. A script that can be installed on the site, like Google Analytics.
  2. A “one click install” that requires FTP access.

Screenshot of the Baidu Analytics script install method selection screen

Now, you can go ahead and try the FTP access if you like, but I’m way too scared about this to try it out on any sites of mine! Baidu’s help files on the subject don’t explain exactly how it works, but I presume this their one click install tool will install the script for HTML-based websites by editing the HTML code then re-uploading the edited page to the server.

If you’re a Worpress fan, you can also pickup a Baidu Tongji plugin.

Baidu Tongji includes a testing tool that doesn’t only check if the Baidu script is properly installed on the homepage, but will also check all the landing pages that are being used for Baidu ads.

The Baidu Analytics script is also the Baidu chat box script. The chat box tool, called Baidu Shangqiao, can be turned on with one click from within the Baidu Tongji interface.

Filtering & Setup Options

Google Analytics
Baidu Tongji
Filter out traffic from certain IP addresses and IP ranges
Filter out traffic from certain domains
Allow tracking of multiple domains
Flexible custom filters
Include/exclude traffic based on sub-directories

Goal Tracking

Like Google, Baidu allows goal tracking by page, event, number of pages viewed and visit duration.

Goal tracking by page can be done in several ways:

  1. Once per visit. This is the same as Google Analytics.
  2. Each page view. In this case, one visitor could trigger the goal multiple times, even during one visit. For example, if a user ended up on a “thank you” page assigned as a goal twice in one session, it would be recorded as the goal being completed twice.
  3. Order ID. In this case, the same user can trigger a goal twice within the same day, but only if there is a separate ‘order ID’. Examples:
  • Visitor uses site on Monday morning, orders 2 items, order IDs are 235 and 236 = goal recorded twice.
  • Visitor uses site on Monday morning, orders 2 items, order IDs are both 235 = goal recorded once.
  • Visitor uses site on Monday morning, order ID is 235, uses site again Tuesday evening, order ID is 235 again = goal recorded twice.

Google Analytics allows the use of regular expressions for extremely flexible URL patterns. Baidu only allows the use of “*” as a wildcard.

Baidu supports funnels, like Google.

Event Tracking

Baidu allows event tracking and variable usage very similar to how Google does.

Google’s code:

_trackEvent(category, action, opt_label, opt_value, opt_noninteraction)

Baidu’s code:

_trackEvent(category, action, opt_label, opt_value)

The only part missing from the Baidu event tracking is the noninteraction variable, which can be used to tell Google Analytics not to consider the event in bounce rate calculations.

As for variable usage, both platforms use the same code and both allow 5 variables.

For more info, see Google’s event tracking guide or variable usage guide.

User Permissions

Baidu not only allows you to add new users, but it provides a very flexible permission system. You can set which reports a user is allowed to see and which setup options they are allowed to use.

Screenshot of the Baidu Analytics user permission selection screen

Publicly Visible Stats

With Baidu, you can actually choose to show your web stats publicly. There are tools available for Google Analytics that claim to do the same, like SeeTheStats.

By default, Baidu will also place a small visible image on your site. This can be disabled in the settings.

Baidu Tongji icon

The Reports

Report Overview Table

Standard reports (demographic, content and source reports)
Customizable columns for standard reports
Integration with ad platforms
Y (AdWords)
Y (Baidu advertising)
Advanced segments
Exportable reports
Scheduled emails
Custom alerts
Custom reports
N – click overlay report, but not a real heatmap
Speed test
Y – Better (More info)
Baidu indexation report
Visitor flow report
Real-time reporting
Y (beta)
SEO suggestions report
N (but this is available in Google Webmaster Tools)
Y (fairly minimal)

One major drawback of Baidu Tongji is that it doesn’t provide a super flexible way to create custom reports or segments like Google does. As a power user, I think this will become a major issue for my own usage in the future. That being said, some may find Baidu’s customization feature easier to use. Baidu allows users to select which columns are shown for each of their standard reports.

Screenshot of the Baidu Tongji custom report column select feature

The above image shows the column selection feature. Columns for this report include things like pageviews and bounce rate, as well as an IP option, number of conversions and conversion rate.

Baidu also provides an IP metric. This is a measure of how many unique IPs were used to access the website. A lot of Chinese web publishers still use this outdated method to measure web traffic.

Baidu Real-time Visitor Report

The number 1 complaint I’ve seen with Google Analytics is that it doesn’t allow you to drill down and see the actions of an individual user. There are plenty of other tools that allow this, many of which are paid. It’s great to have it right within Baidu Tongji.

I love using this information for problem-solving. I can read the user trails and try to imagine why they stopped where the stopped. This information is also useful to people on the front-lines of the marketing campaign, such as community managers, bloggers and SEM managers.

Screenshot of the Baidu Tongji real-time visitor report

In the above image, we can see that the visitor came from Google, we can see each page they viewed and for how long. We know their operating system and browser.

Baidu keeps data for the past 500 visitors.

Baidu SEO Suggestions Report

Baidu will crawl your website and find common SEO problems, such as missing alt tags and completion of meta descriptions. What’s nice about this is that they will show you the number of page views for each page, allowing you to get a sense of which problems are the more important ones.

This report seems rather limited at this time, because it will only crawl a small number of pages.

Screenshot of the Baidu Tongji SEO Suggestions Report

Exporting Reports

Baidu Tongji allows for reports to be downloaded in CSV or PDF format.

If you directly open a CSV file exported from Baidu Tongji, you’ll probably see a bunch of garbage characters where the Chinese characters should be. To get around this:

  1. Open Excel.
  2. Go to the “Data” tab then click “From Text”.
  3. Select the exported CSV file and click “Import”.
  4. Choose the options “Delimited” and “Chinese Simplified”, then click “Next”.
  5. Choose the “Comma” delimiter, then click “Next”.
  6.  Click “Finish”

Accuracy Comparison

I tested the stats for 3 sites over a 1 day period and 5 day period. There’s a lot of variability! This will require some further research. Note that I used Baidu's synchronous script rather than asynchronous script. As of February 2013, I noticed Baidu now also supports an asynchronous script.

1-day Period

Site 1 – Google
Site 1 - Baidu
Site 2 – Google
Site 2 – Baidu
Site 3 – Google
Site 3 – Baidu
Unique Visitors
Bounce Rate

5-day Period

Site 1 – Google
Site 1 - Baidu
Site 2 – Google
Site 2 – Baidu
Site 3 – Google
Site 3 – Baidu
Unique Visitors
Bounce Rate

30-day Period

Site 1 – Google
Site 1 - Baidu
Unique Visitors
Bounce Rate

How can this difference be explained?

I don’t know yet. I wouldn’t expect either platform to be completely accurate, but these numbers are off by a lot!

Interestingly, Baidu reports a much higher proportion of traffic due to direct visits, while Google reports much more search traffic. Google also shows a longer list of search queries used to reach the websites. Drilling down into the referral report, I saw that Baidu had recorded plenty of referral visits with a Google search URL for the referring URL. Of course, this should have been recorded as search traffic, not referral traffic.

Because of these inaccuracies, and some core lacking features, I wouldn't use Baidu Tongji as my primary analytics platform, unless it's being used in conjunction with a Baidu pay per click campaign.






First let me disclose I work on the Piwik Analytics team. With the recent shut down of Google analytics the last couple of days, there is also a challenge with GA accuracy. Maybe for this reason I am biased and would suggest users consider using a hosted solution such as Piwik to avoid these limitations. Piwik is available in traditional and simplified Chinese (as well as 46 other languages). If you want a solid way to track traffic in China this is a great option.

I am testing Piwik on a few sites too (non-Chinese sites). It looks promising but without everything GA has.

Is there a technical method to test the accuracy of different analytics platforms accurately? I'd be interested in comparing several analytics platforms for traffic from China and from outside of China as well, but I'm lacking the technical know-how/capabilities to do so.

There idea of accuracy is difficult as each tool can track differently or has different requirements. Also for example, so trackers, such as Baidu, want to be ahead of other trackers. Then there is the issue of blocking. Great Fire for example notes, that GA is blocked 13% of the time. Then you need to calculate in users who disable cookies or javascripts, enable do not track in their browser, use adblock or work at companies that by default block certain trackers. Unfortunately you never will find out which tool gives the best truth. The goal should be to choose the tool you like the best. Once you have dtata, use the insights and trends, rather then get hung up on the exact numbers.

First, Thank you Tait for this great post, really useful. It is totally true that there is a concern with GA and great firewall. I am working in china, running a web agency so ii totally my concern and also our clients one. But I am totally agree with adrian, you will always have discrepencies about tools like for example the way a session expire. The real question is can you trust the trends and ratios more than talking about raw numbers.

Thanks for the main question is that Google can do a conversion funnel...can Baidu's analytics do the same?

Baidu Tongji does support conversion funnels, yes. :)

Thanks so much for your post, Tait! I'm wondering how does Baidu know which site my visitor had visited in the past as you mentioned "Baidu tracks each individual user, allowing you to see all the pages they visited.". Usually, we can get at the most one site before and after our site-visit, isn't it? Thanks so much!

Hi Wang. Yes, it is just the last site that Baidu can see. Then it shows you the individual pages on your site that the user visits. So, you can see the users click path starting with the source and including all the pages on your site that they visit.

Hi Tait, thanks so much for such a great article that I just stumpled upon, this is just what I need to know as we have been using Google and we all know it may not be giving the full picture, esp. our site targets are mostly in the Chinese Mainland. However, I have yet to start using this as our site has the domain extension ".com/cn" so I can't even get it submitted. We tried to submit a domain but it's redirected to the .com/cn website so it's also not accepted. Our HQ is in the US who runs the .com website so we can't add their website there, appreciate if you can share any insight? Thanks

Hi Tait,
I have a website with sub folder which is the Chinese version of the website that I would like to list on Baidu, Baidu only allowed me to list the english one but not the chinese one which is under /zh-cn/ folder. Do you have any tips for me? Thanks.

What do you mean by "list on Baidu"?

I using Baidu Zanzhang and submit my site. I only managed to submit English site as my Chinese site is under another folder /zh-cn/ and they disallow me to submit site with subfolder. Do you have any advise on how can I submit my chinese website to Baidu?

If it's part of the sub-folder, you shouldn't need to submit it again.
Has Baidu indexed the English content? If so, there may be some technical problem.
Baidu can take a while to index sites though, especially sites that are only partially in Chinese. Having more fresh Chinese content and links from other sites indexed by Baidu is always a good thing, but I can't say if that's a problem here or not.

Great article - thanks a lot. Do you know whether there are any known problems with having Google Analytics tracking code alongside Baidu tracking code on the same page?

 Hi Jim, there shouldn't be.

Awesome article sir!

As a data nerd, I'm just curious - have there been any updates to the e-commerce tracking capabilities in Baidu Analytics (i.e. is there an Enhanced ECommerce functionality at this point)?

Thanks again!

No, I don't believe there is.

Lately we've been using Baidu Tongji only to provide some data for Baidu PPC campaigns that Google Analytics doesn't pick up well.

Google has URL tracking parameters like

  • utm_source
  • utm_medium
  • utm_campaign

What parameters are available in Baidu?

I haven't seen URL parameters with Baidu, but we'll let you know if we come across this feature.

utm_source => hmsr
utm_medium => hmcu
utm_campaign => hmpl

Is it possible to track conversions with an image pixel?

There's no seperate conversiont tracking pixel (or other request). There is goal-tracking and e-commerce options.

Great ariticle!
Does baidu analytics has changed anything now, more functions? I see the latest version is 2012.


There are some updates, I plan to go over it all again thoroughly and update this post too.

One thing is that there is an e-commerce tracking feature now.

Over time we've also started using Baidu Tongji more. It's gone from being just a backup to being our primary tool in some cases.

It would be great to read about changes if they were implemented in Baidu Tongji :). Looking forward to this new post :)

I am not sure if this is the right place to ask, but i try and see if you can help me out or refer me elsewhere.

How can you set anonymization settings in Baidu Tongji? We just started using and are implementing the script.

Do you mean settings to prevent you from gathering information that could potentially personally identify people? Last I checked, I didn't see any such option.

Hi Tait, Just read you guys comments on GA and Baidu Tongji. Interesting and informative!! I have got the GAIQ certification recently and wonder if I could understand the functions of Baidu Tongji automatically without any training? (I can read both Chinese and English). Appreciate your advice.

I don't think you should have any problem. Just install it, let it collect some data, then poke around the interface and you should be able to do just fine. 

Great news !! Thanks !!

Add new comment