Skip to content
    Moz logo Menu open Menu close
    • Products
      • Moz Pro
      • Moz Pro Home
      • Moz Local
      • Moz Local Home
      • STAT
      • Moz API
      • Moz API Home
      • Compare SEO Products
      • Moz Data
    • Free SEO Tools
      • Domain Analysis
      • Keyword Explorer
      • Link Explorer
      • Competitive Research
      • MozBar
      • More Free SEO Tools
    • Learn SEO
      • Beginner's Guide to SEO
      • SEO Learning Center
      • Moz Academy
      • SEO Q&A
      • Webinars, Whitepapers, & Guides
    • Blog
    • Why Moz
      • Agency Solutions
      • Enterprise Solutions
      • Small Business Solutions
      • Case Studies
      • The Moz Story
      • New Releases
    • Log in
    • Log out
    • Products
      • Moz Pro

        Your all-in-one suite of SEO essentials.

      • Moz Local

        Raise your local SEO visibility with complete local SEO management.

      • STAT

        SERP tracking and analytics for enterprise SEO experts.

      • Moz API

        Power your SEO with our index of over 44 trillion links.

      • Compare SEO Products

        See which Moz SEO solution best meets your business needs.

      • Moz Data

        Power your SEO strategy & AI models with custom data solutions.

      NEW Keyword Suggestions by Topic
      Moz Pro

      NEW Keyword Suggestions by Topic

      Learn more
    • Free SEO Tools
      • Domain Analysis

        Get top competitive SEO metrics like DA, top pages and more.

      • Keyword Explorer

        Find traffic-driving keywords with our 1.25 billion+ keyword index.

      • Link Explorer

        Explore over 40 trillion links for powerful backlink data.

      • Competitive Research

        Uncover valuable insights on your organic search competitors.

      • MozBar

        See top SEO metrics for free as you browse the web.

      • More Free SEO Tools

        Explore all the free SEO tools Moz has to offer.

      What is your Brand Authority?
      Moz

      What is your Brand Authority?

      Check yours now
    • Learn SEO
      • Beginner's Guide to SEO

        The #1 most popular introduction to SEO, trusted by millions.

      • SEO Learning Center

        Broaden your knowledge with SEO resources for all skill levels.

      • On-Demand Webinars

        Learn modern SEO best practices from industry experts.

      • How-To Guides

        Step-by-step guides to search success from the authority on SEO.

      • Moz Academy

        Upskill and get certified with on-demand courses & certifications.

      • SEO Q&A

        Insights & discussions from an SEO community of 500,000+.

      Unlock flexible pricing & new endpoints
      Moz API

      Unlock flexible pricing & new endpoints

      Find your plan
    • Blog
    • Why Moz
      • Small Business Solutions

        Uncover insights to make smarter marketing decisions in less time.

      • Agency Solutions

        Earn & keep valuable clients with unparalleled data & insights.

      • Enterprise Solutions

        Gain a competitive edge in the ever-changing world of search.

      • The Moz Story

        Moz was the first & remains the most trusted SEO company.

      • Case Studies

        Explore how Moz drives ROI with a proven track record of success.

      • New Releases

        Get the scoop on the latest and greatest from Moz.

      Surface actionable competitive intel
      New Feature

      Surface actionable competitive intel

      Learn More
    • Log in
      • Moz Pro
      • Moz Local
      • Moz Local Dashboard
      • Moz API
      • Moz API Dashboard
      • Moz Academy
    • Avatar
      • Moz Home
      • Notifications
      • Account & Billing
      • Manage Users
      • Community Profile
      • My Q&A
      • My Videos
      • Log Out

    The Moz Q&A Forum

    • Forum
    • Questions
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. Home
    2. SEO Tactics
    3. Technical SEO
    4. Javascript to manipulate Google's bounce rate and time on site?

    Moz Q&A is closed.

    After more than 13 years, and tens of thousands of questions, Moz Q&A closed on 12th December 2024. Whilst we’re not completely removing the content - many posts will still be possible to view - we have locked both new posts and new replies. More details here.

    Javascript to manipulate Google's bounce rate and time on site?

    Technical SEO
    5
    8
    7150
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with question management privileges can see it.
    • BenRWoodard
      BenRWoodard last edited by

      I was referred to this "awesome" solution to high bounce rates.

      It is suppose to "fix" bounce rates and lower them through this simple script.  When the bounce rate goes way down then rankings dramatically increase (interesting study but not my question).

      I don't know javascript but simply adding a script to the footer and watch everything fall into place seems a bit iffy to me.

      Can someone with experience in JS help me by explaining what this script does?

      I think it manipulates the reporting it does to GA but I'm not sure.  It was supposed to be placed in the footer of the page and then sit back and watch the dollars fly in. 🙂

      1 Reply Last reply Reply Quote 1
      • AdamThompson
        AdamThompson @wattssw last edited by

        Stephen,

        Thanks for the explanation - I just had a client ask me about this script. Based on your explanation, this script will change your bounce rate. This is because once the event is triggered, the visit will no longer be considered a bounce, even if the user only visits one page. So it's an artificial/false decrease in bounce rate, not a "fix" as others claim.

        I wrote a short blog post on this (and referenced your description)!

        ~Adam

        1 Reply Last reply Reply Quote 1
        • BenRWoodard
          BenRWoodard @supermarketonline last edited by

          Thanks for the encouragement Martin.

          As it turns out, with the help of the two previous answers, the script is actually based on a valid script adjustment that might actually help some people in their reports but the what my client thought was that this was an easy/quick way to get more traffic.  The article they found was saying this would dramatically change results in GA and then directly effect their site's ranking in the SERPs.

          They had "proof" in the form of some GA screenshots so I needed more information on what the script actually does.  I was able to let my client know what exactly this was and recommend not doing it unless there was a problem in the GA reports that they wanted fixed. 🙂

          Thanks again for your reply.

          1 Reply Last reply Reply Quote 0
          • supermarketonline
            supermarketonline last edited by

            Dont do it - just improve your content.  You know it's wrong to try and cheat the system.  Think about what would happen if you banned from the results.

            Look i dont mean to be harsh - but i allways balance risks against rewards.   In this situation - the risk is to high.

            BenRWoodard 1 Reply Last reply Reply Quote 1
            • BenRWoodard
              BenRWoodard @wattssw last edited by

              Thanks for that link.

              The site (link in the previous reply) my client referred me to was manipulating the way they were reporting the results.  The closer I looked at it, I realized that it was a little spike but then it went right back down.  Knowing them they just paid a bunch of people to visit the site.

              This stuff is annoying and gives us SEO's a bad name. 😞

              1 Reply Last reply Reply Quote 0
              • BenRWoodard
                BenRWoodard @grasshopper last edited by

                The code was from this site http://millionairevolution.com/cut-bounce-rate-by-80/ and looking at the dates and analytics shown on the page this is nothing more than a misrepresentation of the facts and data.

                I knew Google doesn't use data from GA but the data graph was showing a contradiction and I didn't know exactly what the script was doing.

                1 Reply Last reply Reply Quote 0
                • wattssw
                  wattssw last edited by

                  First, Google Analytics reporting does not, to my knowledge, influence SERP rankings. Altering the data collected through Google Analytics should not affect SEO indicators.

                  Second, this is from here: http://briancray.com/posts/time-on-site-bounce-rate-get-the-real-numbers-in-google-analytics/

                  Once this code is installed, your site will update Google Analytics every 10 seconds under the Event Category "Time", the Event Action "Log", and the Event Value will be based on the pattern of 0:10, 0:20, 0:30, 0:40, 0:50, 1:00, 1:10, etc.

                  The script does not change your bounce rate, it just gives you additional information.

                  BenRWoodard AdamThompson 2 Replies Last reply Reply Quote 1
                  • grasshopper
                    grasshopper last edited by

                    You're correct that it's a GA hack.  Avoid it.

                    Google has publicly stated that they don't use your site-specific GA metrics to influence organic search rankings.  E.g., they're not taking data from your GA profile, and feeding that to the Search Quality team to determine if your site should rank better or worse.  They have MANY better ways to accurately track anonymous user interactions with sites at scale (e.g. Chrome).

                    The only thing that you'll accomplish with this code is making all of your own internal metrics turn to garbage.  Accurate metrics are important.  If you bounce rate is high, knowing that allows you to take action to improve your site and reduce it.

                    The more people who stay on your site for more than 1 pageview, the more money your business is likely to make. Improve your bounce rate to improve the profitability of your website, not for some supposed correlation between bounce rate and organic search ranking.

                    BenRWoodard 1 Reply Last reply Reply Quote 6
                    • 1 / 1
                    • First post
                      Last post

                    Got a burning SEO question?

                    Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.


                    Start my free trial


                    Browse Questions

                    Explore more categories

                    • Moz Tools

                      Chat with the community about the Moz tools.

                    • SEO Tactics

                      Discuss the SEO process with fellow marketers

                    • Community

                      Discuss industry events, jobs, and news!

                    • Digital Marketing

                      Chat about tactics outside of SEO

                    • Research & Trends

                      Dive into research and trends in the search industry.

                    • Support

                      Connect on product support and feature requests.

                    • See all categories

                    Related Questions

                    • Chris_Wright

                      Removing a site from Google index with no index met tags

                      Hi there! I wanted to remove a duplicated site from the google index. I've read that you can do this by removing the URL from Google Search console and, although I can't find it in Google Search console, Google keeps on showing the site on SERPs. So I wanted to add a "no index" meta tag to the code of the site however I've only found out how to do this for individual pages, can you do the same for a entire site? How can I do it? Thank you for your help in advance! L

                      Technical SEO | | Chris_Wright
                      1
                    • Pete4

                      Why is Google Webmaster Tools showing 404 Page Not Found Errors for web pages that don't have anything to do with my site?

                      I am currently working on a small site with approx 50 web pages.  In the crawl error section in WMT Google has highlighted over 10,000 page not found errors for pages that have nothing to do with my site.  Anyone come across this before?

                      Technical SEO | | Pete4
                      0
                    • WebServiceConsulting.com

                      Can I use a 410'd page again at a later time?

                      I have old pages on my site that I want to 410 so they are totally removed, but later down the road if I want to utilize that URL again, can I just remove the 410 error code and put new content on that page and have it indexed again?

                      Technical SEO | | WebServiceConsulting.com
                      0
                    • melen

                      Staging site and "live" site have both been indexed by Google

                      While creating a site we forgot to password protect the staging site while it was being built.  Now that the site has been moved to the new domain, it has come to my attention that both the staging site (site.staging.com) and the "live" site (site.com) are both being indexed.  What is the best way to solve this problem?  I was thinking about adding a 301 redirect from the staging site to the live site via HTACCESS. Any recommendations?

                      Technical SEO | | melen
                      0
                    • inlinear

                      Correct linking to the /index of a site and subfolders: what's the best practice? link to: domain.com/ or domain.com/index.html ?

                      Dear all, starting with my .htaccess file: RewriteEngine On
                      RewriteCond %{HTTP_HOST} ^www.inlinear.com$ [NC]
                      RewriteRule ^(.*)$ http://inlinear.com/$1 [R=301,L] RewriteCond %{THE_REQUEST} ^./index.html 
                      RewriteRule ^(.)index.html$ http://inlinear.com/ [R=301,L] 1. I redirect all URL-requests with www. to the non www-version...
                      2. all requests with "index.html" will be redirected to "domain.com/" My questions are: A) When linking from a page to my frontpage (home) the best practice is?: "http://domain.com/" the best and NOT: "http://domain.com/index.php" B) When linking to the index of a subfolder "http://domain.com/products/index.php" I should link also to: "http://domain.com/products/" and not put also the index.php..., right? C) When I define the canonical ULR, should I also define it just: "http://domain.com/products/" or in this case I should link to the definite file: "http://domain.com/products**/index.php**" Is A) B) the best practice? and C) ? Thanks for all replies! 🙂
                      Holger

                      Technical SEO | | inlinear
                      0
                    • reynoldsdesign

                      Site not ranking in Google but comes up #1 in Yahoo and Bing

                      Hi everyone, I've been working on SEO for this site for about 2 years and for some reason the site has just tanked in google. However it shows up #1 in yahoo and bing for the same search. http://www.nfsmn.com Phrase: "commercial foundation repair mn" If anyone can shed some light on the issue I would really appreciate it. They do have a sister-site: american-waterworks.com that may be causing issues as they link a lot of content to amww but not the other way around. Thanks Eric

                      Technical SEO | | reynoldsdesign
                      0
                    • seekjobs

                      Best Practices for adding Dynamic URL's to XML Sitemap

                      Hi Guys, I'm working on an ecommerce website with all the product pages using dynamic URL's (we also have a few static pages but there is no issue with them). The products are updated on the site every couple of hours (because we sell out or the special offer expires) and as a result I keep seeing heaps of 404 errors in Google Webmaster tools and am trying to avoid this (if possible). I have already created an XML sitemap for the static pages and am now looking at incorporating the dynamic product pages but am not sure what is the best approach. The URL structure for the products are as follows: http://www.xyz.com/products/product1-is-really-cool
                      http://www.xyz.com/products/product2-is-even-cooler
                      http://www.xyz.com/products/product3-is-the-coolest Here are 2 approaches I was considering: 1. To just include the dynamic product URLS within the same sitemap as the static URLs using just the following http://www.xyz.com/products/ - This is so spiders have access to the folder the products are in and I don't have to create an automated sitemap for all product OR 2. Create a separate automated sitemap that updates when ever a product is updated and include the change frequency to be hourly - This is so spiders always have as close to be up to date sitemap when they crawl the sitemap I look forward to hearing your thoughts, opinions, suggestions and/or previous experiences with this. Thanks heaps, LW

                      Technical SEO | | seekjobs
                      0
                    • A_Q

                      Blank pages in Google's webcache

                      Hello all, Is anybody experiencing blanck page's in Google's 'Cached' view? I'm seeing just the page background and none of the content for a couple of my pages but when I click 'View Text Only' all of teh content is there. Strange! I'd love to hear if anyone else is experiencing the same. Perhaps this is something to do with the roll out of Google's updates last week?! Thanks,
                      Elias

                      Technical SEO | | A_Q
                      0

                    Get started with Moz Pro!

                    Unlock the power of advanced SEO tools and data-driven insights.

                    Start my free trial
                    Products
                    • Moz Pro
                    • Moz Local
                    • Moz API
                    • Moz Data
                    • STAT
                    • Product Updates
                    Moz Solutions
                    • SMB Solutions
                    • Agency Solutions
                    • Enterprise Solutions
                    Free SEO Tools
                    • Domain Authority Checker
                    • Link Explorer
                    • Keyword Explorer
                    • Competitive Research
                    • Brand Authority Checker
                    • MozBar Extension
                    • MozCast
                    Resources
                    • Blog
                    • SEO Learning Center
                    • Help Hub
                    • Beginner's Guide to SEO
                    • How-to Guides
                    • Moz Academy
                    • API Docs
                    About Moz
                    • About
                    • Team
                    • Careers
                    • Contact
                    Why Moz
                    • Case Studies
                    • Testimonials
                    Get Involved
                    • Become an Affiliate
                    • MozCon
                    • Webinars
                    • Practical Marketer Series
                    • MozPod
                    Connect with us

                    Contact the Help team

                    Join our newsletter

                    Access all your tools in one place. Whether you're tracking progress or analyzing data, everything you need is at your fingertips.

                    Moz logo
                    © 2021 - 2025 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                    • Accessibility
                    • Terms of Use
                    • Privacy

                    Looks like your connection to Moz was lost, please wait while we try to reconnect.