WordPress.org

Ready to get started?Download WordPress

Forums

Reduce Bounce Rate
[resolved] Increase in Google Analytics Page Views (8 posts)

  1. Robert
    Member
    Posted 8 months ago #

    Google Analytics reports ~100% increase in pageviews since the plugin was installed. Google Adsense pageview metrics have not been impacted. So there's now a dramatic difference between Adsense pageviews and Google Analytics.

    Unique visitor trends have remained steady per normal traffic patterns. GA average page views per visit is also steady, around 1.5 pages per visit.

    The bounce rate reported by Google Analytics has dropped from around 75% to about 20% better reflecting the total time a visitor spends reading the pages.

    I understand that Google Analytics measures page views differently:
    https://support.google.com/adsense/answer/55613?hl=en

    Is there a means to better reflect the time a visitor spends on the site without distorting the Google Analytics pageviews?

    Thanks

    http://wordpress.org/plugins/reduce-bounce-rate/

  2. Okoth1
    Member
    Plugin Author

    Posted 8 months ago #

    Hi Robert,

    I don't know how to answer your question. I have checked all my websites that are using the plugin, but none of them have a dramatic increase of pageviews. What I see changing is the bounce rate and time on page, but pageviews stay kind of the same on all my sites.

    If you don't want to use time as a way of firing an event, you could also try to use scrolling.

    The script below has both, time and scrolling. Every 10 seconds the time event is fired and when people scroll also an event is fired. This all to let Google Analytics know that someone is still on the page. If people page reading time is more than 10 seconds (10000 in the code) you could also set it to 30000, which means sending an event every 30 seconds. And as long people scroll within those 30 seconds, Google knows they are still on the page.

    <script type="text/javascript">
    var _gaq = _gaq || [];
     _gaq.push(['_setAccount', 'UA-xxxxxxxx-1']);
     _gaq.push(['_trackPageview']);
    setTimeout(function() {
     window.onscroll = function() {
     window.onscroll = null; // Only track the event once
     _gaq.push(['_trackEvent', 'scroll', 'read']);
     }
     }, 10000);
    (function() {
     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
     })();
    </script>
  3. Robert
    Member
    Posted 8 months ago #

    Could a CDN possibly be a factor? I use CloudFlare and my site is hosted by WPEngine.com.

    I'll give the new script a try and see how that affects pageviews.

    Thanks,
    Robert

  4. Robert
    Member
    Posted 8 months ago #

    I checked the rendered page source code and found the Reduce Bounce Rate script appears after the closing footer tag. Could this skew the pageview results? If so, I can delete the plugin and insert the Reduce Bounce Rate script directly in footer.php.

    I'm using WooThemes Canvas 5.3.0 and WooThemes Framework 5.5.5. I placed the Google Analytics tracking code in header.php.

    The pertinent page tags, Google Analytics and Reduce Bounce Rate page source is:

    <html>
    <head>
    
    // contents omitted brevity...
    
    <script type="text/javascript">
    (function($){
        $(window).load(function() {
            if (this._gat) {
                tks = this._gat._getTrackers();
                ga_track = function(p) {
                    for (i=0; i < tks.length; i++) {
                        var n = tks[i]._getName() !== "" ? tks[i]._getName()+"." : "";
                        a = [];
                        for (i2=0; i2 < p.length; i2++) {
                            var b = i2===0 ? n+p[i2] : p[i2];
                            a.push(b);
                        }
                        _gaq.push(a);
                    }
                };
                $('a').filter(function() {
                    return this.href.match(/.*\.(zip|mp3|mpeg|pdf|doc*|ppt*|xls*|jpeg|png|gif|tiff)/);
                }).click(function(e) {
                    ga_track(['_trackEvent', 'download', 'click', this.href]);
                });
                $('a[href^="mailto"]').click(function(e) {
                    ga_track(['_trackSocial', 'email', 'send', this.href]);
                 });
                var loc = location.host.split('.');
                while (loc.length > 2) { loc.shift(); }
                loc = loc.join('.');
                var localURLs = [
                                  loc,
                                  'http://mysite.com'
                                ];
                $('a[href^="http"]').filter(function() {
                    for (var i = 0; i < localURLs.length; i++) {
                        if (this.href.indexOf(localURLs[i]) == -1) return this.href;
                    }
                }).click(function(e) {
                    ga_track(['_trackEvent', 'outbound', 'click', this.href]);
                });
            }
        });
    })(jQuery);
    
    </script><script type="text/javascript">
    	var _gaq = _gaq || [];
    	_gaq.push(['_setAccount', 'UA-xxxxxxxx'], ['_trackPageview']);
    	(function() {
    	var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    	var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
    	})();
    </script>
    
    // html stuff snipped for brevity
    
    <script type="text/javascript">
    
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-xxxxxxxx']);
      _gaq.push(['_setDomainName', 'mysite.com']);
      _gaq.push(['_trackPageview']);
    
      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    
    </script>
    </head>
    
    <body>
    
    <<footer>
       // content omitted for brevity
    </footer>
    
    // Reduce Bounce Rate script begins...
    <script>
    var _gaq = _gaq || [];
    (function (tos) {
      window.setInterval(function () {
        tos = (function (t) {
          return t[0] == 50 ? (parseInt(t[1]) + 1) + ':00' : (t[1] || '0') + ':' + (parseInt(t[0]) + 10);
        })(tos.split(':').reverse());
        window.pageTracker ? pageTracker._trackEvent('Time', 'Log', tos) : _gaq.push(['_trackEvent', 'Time', 'Log', tos]);
      }, 10000);
    })('00');
    </script>
    
    </body>
    </html>
  5. Robert
    Member
    Posted 7 months ago #

    I now believe the pageviews issue was due to holiday traffic trends.

  6. Eric Potratz
    Member
    Posted 6 months ago #

    Okoth1,

    I'm getting a syntax error on line 15 with that above code you posted (<script type="text/javascript"> I tried putting it into the reduce-bounce-rate/reduce_bounce_rate.php

    Wrong place?

  7. Okoth1
    Member
    Plugin Author

    Posted 6 months ago #

    Hi epotratz,

    I don't get the error.

    This code is a combination of the analytics code and the code to get the real bounce rate ststs into GA.

    You should replace the plugin AND Google tracking code with the code above. That will be a bit hard if you already use a plugin to add the tracking code.

    So the code above is meant for when you want to do everything manually.

  8. hemp1175
    Member
    Posted 1 month ago #

    If you want help to increase your page views we can help you with that. We have a post on our website that tells all about how to increase your page views. Just go to This will help with increasing your page views.

Reply

You must log in to post.

About this Plugin

About this Topic