为情所困2017-05-15 17:04:59
Mark and come back later
For details, please see https://tongji.baidu.com/open...
Baidu Statistics has a corresponding API interface.
Then I encapsulated it
var BaiduTongJi = {
visitPage : function ()
{
_hmt.push(['_trackPageview', _path]);
}
};
Then add a locationChangeStart event listener in your angular, similar to my code below.
app.run(function($rootScope, $location){
$rootScope.$on('$locationChangeStart', function ()
{
BaiduTongJi.visitPage($location.path());
})
});
淡淡烟草味2017-05-15 17:04:59
Looking for answers together. I know the main question, please let me know