Baidu Analytics (百度统计 Baidu Tongji, in Chinese) is Baidu search engine's free web statistics system which provides users with many reports about visitors to their website, such as a report on the source of visitors, user demographics, reports on content viewed on site, a heat map report, and many other features.
The Drupal Baidu Analytics module is currently available from the module downloads.
The Drupal module also offers a bit more than basic tracking.
Allows you to provide a list of pages to track, or a list of pages not to track.
@TODO: Add screenshot with comments for pages visibility settings on module's admin settings form page, with the PHP filter enabled.
Usually Baidu Analytics will track all users on a site, but you can also omit groups of users by Drupal role. Simply un-tick the role name on the settings page.
@TODO: Add screenshot with comments for role tracking on module's admin settings form page.
Profile / User segmentation
Baidu Analytics provides a rough mechanism called "segmentation" to track your users based on data about them.
For every page hit that is logged by Baidu, you can also attach the user roles to it. This can provide a good overview of what type of users visit what pages on your site.
Any fields added to the Users could be added to the tracking though available user tokens. This could further tracking of very valuable information such as the users' gender, the age group or their location!
@TODO: Investigate further integration with Profile 2.
The module provides functionality to track downloads of files, mailto and outgoing links on your site. Select the relevant options on the main Baidu Analytics settings page. A textfield is also provided where you can specify a list of file extensions that should be tracked. Separate each file extension with a '|' character.
To see the link tracking reports, go into your Baidu Analytics dashboard and click on the main Content menu item on the left. That should reveal the Event Tracking option (事件跟踪).
@TODO: Add screenshots with comments for Baidu Analytics Event Tracking link, page and the configuration for link tracking on module's admin settings form page.
and Baidu Tuiguang
Allows you to track internal search
and track Baidu Tuiguang (百度推广) ads (Tuiguang is not yet provided).
@TODO: Add screenshot with comments for search tracking on module's admin settings form page.
Allows you to send custom variables (自定义变量) along with the Baidu Analytics tracking request. You can use node tokens to populate the value on pages that provide the node object. Otherwise, Global tokens, such as current-user could also be selected and should be defined on every page.
@TODO: Add screenshot with comments for custom variables tracking on module's admin settings form page.
Advanced settings for Baidu Analytics are hidden away in the collapsed fieldset. Expand it and you'll find the following additional features.
@TODO: Add screenshot with comments for caching, code snippets on module's admin settings form page. Also add two paragraphs for code type and JS scope.
Cache tracking code
If you find your site pages load slow due to a delay in fetching the Baidu Analytics tracking code file from Baidu's servers - there's the option to cache the hm.js or h.js files locally on your server for a day (86,400 seconds). In order to use this feature your site must be configured to serve public files.
Custom code snippets
<script> ... </script> tags from the start and end of your snippet! The "before" textarea sets variables prior to the actual trackPageview, then the "after" handles variables, and additional actions (like tracking in multiple accounts).