AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

4.9K members online now
4.9K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Google analytics record page view though ajax call. Bounce rate not updating

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I am logging page view through ajax action when my inner page content gets loaded. Issue is bounce rate data is not updated (always 0%)

Default ga page view record logged from footer.


<script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//','ga'); ga('create', 'UA-xxxx-1', 'auto'); ga('send', 'pageview'); </script>

After this I am executing code to load inner page content then logging page view for this action.



function gapPageView(hash)
   ga('send', 'pageview', { 'page': hash});

Page view entries are recorded successfully in google analytic and can seen in All pages report.


May time I visited same page and closed tab. removed browser cookies and open new session. But there is not data change in bounce rate of step1.

Please help me understand if I am missing something here.





1 Expert replyverified_user

Re: Google analytics record page view though ajax call. Bounce rate not updating

Top Contributor
# 2
Top Contributor

Bounce Rate is the percentage of single-page sessions.
You are sending the second pageview automatically so the bounce rate is 0% because this way every visit results in at least 2 pageview so there is no bounce. I'd suggest sending a pageview only for the inner content loads. Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital