baidu.md (602B)
1 # Baidu 2 3 To use Baidu analytics in this theme, navigate to the setting page of your 4 site at <https://tongji.baidu.com/>. You will get a piece of JS code provided 5 as follows: 6 7 ```js 8 <script> 9 var _hmt = _hmt || []; 10 (function() { 11 var hm = document.createElement("script"); 12 hm.src = "https://hm.baidu.com/hm.js?<your_token_at_here>"; 13 var s = document.getElementsByTagName("script")[0]; 14 s.parentNode.insertBefore(hm, s); 15 })(); 16 </script> 17 ``` 18 19 Then you can use it by filling your site toke `your_token_at_here` in the 20 config file: 21 22 ```toml 23 [params.baidu] 24 token = "your_token_at_here" 25 ```