How to Find the Google Analytics Asynchronous Code And Implement It For Faster Loading Of Your Website

If you have a blog or website, there are quite a good reasons why you should switch to Google Analytics Asynchronous code instead of using the regular JavaScript code placed just above the ending </body> tag.
I have been using the older Google Analytics code for long, but changed the code quite recently. The result is faster performance of my blog and more accurate visitor data.

Why Switch to The Asynchronous Google Analytics Code

The most important reason for using Asynchronous code of Google Analytics is that it improves your blog’s overall loading time. If you website uses a lot of scripts or rich media content, you must change your Google Analytics code to Asynchronous mode.
Here are the main benefits of Google Analytics new code:
  • The newer code eliminates tracking errors when the code JavaScript code does not loads completely. Some users also use browsers with JavaScript turned off, hence you lose out on the data when either the JavaScript has not fully loaded or the visitor has disabled JavaScript altogether.
  • Better data collection and accuracy
  • Reduces the loading time to a great extent.

For example: Switching to the new Asynchronous code improved this site’s loading time by 0.8 seconds. I know this isn’t going to make a huge difference but as you know, in the internet – every millisecond counts.

Note: You can continue using the existing Analytics code if you want, both codes would work the same way.

How to Find Google Analytics Asynchronous code

To find the improved Analytics code, follow these steps:
1. Log in to your Google Analytics account and click “Analytics settings” from the left top of the screen. Then click “Edit” next to the website profile whose code you want to change.

Find The Google Analytics Asynchronous Code

Find The Google Analytics Asynchronous Code

2. In the next page, click “Check Status”
Switch to the Google Analytics Asynchronous Code

Switch to the Google Analytics Asynchronous Code

3. In the next page, copy the code and paste it just above the ending head tag (</head>) in your site’s template.

Better Google Analytics Code
More Tips on Google Analytics:
Email this article

Written by on Tuesday, August 24th, 2010

  1. Reader Comments

  2. jumoke

    I got here from strictlyonlinebiz. i have added the new code.
    am i supposed to delete the former analytic code?

    thanks

    September 10th, 2010
    • Amit Banerjee

      @Jumoke: yes, you should remove the earlier code because the new code will work just fine. Thanks for the comment.

      September 10th, 2010
  3. jumoke

    Thanks your reply was extremely very fast

    September 10th, 2010
    • Amit Banerjee

      @Jumoke: Yes, we answer to questions and feedback as soon as possible, feel free to ask more questions or any other thing which you want.

      September 10th, 2010
  4. Chux@Jobs in Nigeria

    Wow that’s cool, I use analytics a lot, great tips finally

    February 23rd, 2011
  5. wpbeijing

    Thank you, I also read your article on the Google translation which is very slow. However in that article you say: “Since the above code uses Javascript, it’s recommended to paste the code just above the ending body tag , for faster loading of your website.”
    However for the ANALYTICS code you suggest placing the script before the closing head, which is the top of the page.
    Just wondering what, if any, is the difference.
    Thanks

    July 8th, 2011

Add Your Comment

All Comments are Moderated.

YOUR COMMENT

About This Site

Ampercent is a technology blog on computer tutorials, software guides, how to tricks and web tools. The blog is updated daily and written by two computer science students from India. Read More »

Tip Us »

Have a great tip which you want to share with fellow readers? Send in your ideas to tips@ampercent.com