登录百度统计管理界面之后把安装代码放到入口index.html对应位置。 然后加入下列代码。 router.beforeEach((to, from, next) => { // 统计代码 if (to.path) { window._hmt.push(['_trackPageview', to.fullPath]); } next(); });
登录百度统计管理界面之后把安装代码放到入口index.html对应位置。 然后加入下列代码。 router.beforeEach((to, from, next) => { // 统计代码 if (to.path) { window._hmt.push(['_trackPageview', to.fullPath]); } next(); });