bind inner links on a webpage to load dynamically without increasing the analytics bounce rate

霸气de小男生 提交于 2019-12-25 05:35:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!