Send full page hash to google analytics and fix page commenting
This commit is contained in:
parent
ae5d23bd2c
commit
fd8315cd60
3 changed files with 8 additions and 2 deletions
|
@ -13,5 +13,8 @@
|
||||||
"lodash": "~2.4.1",
|
"lodash": "~2.4.1",
|
||||||
"moment": "~2.8.3",
|
"moment": "~2.8.3",
|
||||||
"marked": "~0.3.2"
|
"marked": "~0.3.2"
|
||||||
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"knockout": "~3.2.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,10 @@ define(
|
||||||
}
|
}
|
||||||
|
|
||||||
self.sendPageEvent = function() {
|
self.sendPageEvent = function() {
|
||||||
self.ga('send', 'pageview');
|
self.ga('send', 'pageview', {
|
||||||
|
// Send the hash with the URL to differentiate different page hits
|
||||||
|
'page': location.pathname + location.hash
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ define(['knockout', 'text!./single-post.html', '../db/db', 'marked', '../address
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load disqus comments if they are in use on this page
|
// Load disqus comments if they are in use on this page
|
||||||
self.useDisqus = !self.short && configService.useDisqus && (configService.pageComments || !self.post.isPage());
|
self.useDisqus = !self.short && configService.useDisqus && (configService.pageCommenting || !self.post.isPage());
|
||||||
|
|
||||||
if (self.useDisqus) {
|
if (self.useDisqus) {
|
||||||
// Wait until the post title is available
|
// Wait until the post title is available
|
||||||
|
|
Reference in a new issue