Forráskód Böngészése

add baidu ajax pageview

Michael Wang 6 éve
szülő
commit
dc678be107
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      src/router.js

+ 5 - 0
src/router.js

@@ -83,6 +83,11 @@ let router = new Router({
 
 router.beforeEach((to, from, next) => {
   const loginPath = "/login/" + localStorage.getItem("domain");
+
+  if (to.path) {
+    window._hmt.push(["_trackPageview", to.fullPath]);
+  }
+
   if (to.path.match(/^\/login\/.+$/)) {
     next();
   } else {