问题
I need to make the user stay on my webpage without reloading it. So I used Jquery bind
option to bind all the anchor links so that only some part of the webpage can be loaded dynamically without reloading the page which helps the Jquery music player(static content) on my page plays the songs without any breaks. Note that all the anchor links can be loaded directly also.
Will this method affect google analytics? Will analytics detect this method as a page load? I thinks this method increases the bounce rate in my website. It is nearly 80% now. Is there any alternative solution to make some content of the page static and some dynamic without increasing the bounce rate and also by letting analytics to detect it as the page load?
回答1:
This affects your bounce rate precisely because GA does not register a page load. However you can call the Google tracking code in the function that loads the page fragment and pass a custom name/url. This is called a "virtual pageview" - once you know the term you can easily find a lot of documentation via search engines or indeed here on stack overflow, so I don't think I need to repeat this here (syntax depends on the version of Analytics you are using in any case).
来源:https://stackoverflow.com/questions/20495253/bind-inner-links-on-a-webpage-to-load-dynamically-without-increasing-the-analyti