added baidu tongji

This commit is contained in:
marvzhang
2021-07-21 16:56:18 +08:00
parent 342f9d2e1b
commit babe6889f4
5 changed files with 35 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
// baidu tongji
export const initBaiduTonji = () => {
if (localStorage.getItem('useStats') !== '0') {
window._hmt = window._hmt || [];
(function () {
const hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?c35e3a563a06caee2524902c81975add';
const s = document.getElementsByTagName('script')[0];
s?.parentNode?.insertBefore(hm, s);
})();
}
};