baidu-analytics.js 332 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?e1b6873b68a812cb909ea1f38dea478a';
  6. script.async = true;
  7. script.defer = true;
  8. document.head.appendChild(script);
  9. }
  10. }