Commit 3686b039 authored by 杨培's avatar 杨培

统计URL修复

parent 998cd3b7
...@@ -38,8 +38,8 @@ if (process.env.NODE_ENV == 'production') { ...@@ -38,8 +38,8 @@ if (process.env.NODE_ENV == 'production') {
document.write(statsCode.join('')); document.write(statsCode.join(''));
router.afterEach(function(to, from) { router.afterEach(function(to, from) {
var contentUrl = location.pathname + '#' + to.path; var contentUrl = location.pathname + '#' + to.fullPath;
var refererUrl = location.pathname + '#' + from.path; var refererUrl = location.pathname + '#' + from.fullPath;
if (typeof(_hmt) != 'undefined') { if (typeof(_hmt) != 'undefined') {
_hmt.push(['_trackPageview', contentUrl]); _hmt.push(['_trackPageview', contentUrl]);
...@@ -49,6 +49,6 @@ if (process.env.NODE_ENV == 'production') { ...@@ -49,6 +49,6 @@ if (process.env.NODE_ENV == 'production') {
_czc.push(["_trackPageview", contentUrl, refererUrl]); _czc.push(["_trackPageview", contentUrl, refererUrl]);
} }
console.log("from %s to %s", refererUrl, contentUrl); //console.log("from %s to %s", refererUrl, contentUrl);
}); });
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment