fix: 百度統計適配pjax #516

This commit is contained in:
Jerry
2021-03-04 16:22:04 +08:00
parent 6cba95298a
commit 2f3094cc0a
4 changed files with 14 additions and 12 deletions

View File

@@ -42,9 +42,11 @@ script.
typeof chatBtnFn === 'function' && chatBtnFn()
typeof panguInit === 'function' && panguInit()
if (typeof gtag === 'function') {
gtag('config', '!{theme.google_analytics}', {'page_path': window.location.pathname});
}
// google analytics
typeof gtag === 'function' && gtag('config', '!{theme.google_analytics}', {'page_path': window.location.pathname});
//- // baidu analytics
typeof _hmt === 'object' && _hmt.push(['_trackPageview',window.location.pathname]);
typeof loadMeting === 'function' && document.getElementsByClassName('aplayer').length && loadMeting()