baidu-analytics.js 327 B

12345678910
  1. export default ({ app }) => {
  2. if (process.client) {
  3. // 只在生产环境加载百度统计脚本
  4. const script = document.createElement('script')
  5. script.src = 'https://hm.baidu.com/hm.js?59de87d4fb96946fa6fe20e34d8c014c'
  6. script.async = true
  7. script.defer = true
  8. document.head.appendChild(script)
  9. }
  10. }