0

I am fairly new to all this but getting to grips with it. I want to get the website www.norfolktutors.co.uk to the top in a google search.
However I am being asked to make my script asynchronous. I don't understand what that means, can someone explain in simple english please.

The code for the script is:

 <script src="demo_async.js" async></script> 
   <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','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-45579551-1', 'norfolktutors.co.uk');
  ga('send', 'pageview');
</script>

What do I remove?

I have put this script at the bottom of the page, as advised by google webmaster.

1
  • 3
    asynchronous loading means the browser does not wait for it to be loaded to move on to loading the next thing. synchronous loading means the browser waits for the script to be loaded before moving on to the next thing. GA already loads asynchronously, so either the person who told you that doesn't know what they are talking about, or else they weren't talking about the GA code, but something else Commented Nov 13, 2013 at 22:25

1 Answer 1

3

There is some splendid information on Google Analytics in Google Developers. By default, the snippet is asynchronous.

Per Google Developers:

When the code runs, it asynchronously loads the Google Analytics Tracking Code onto the page. It then creates a tracker object for the web property you specified in the UA-XXXX-Y parameter. Finally, it records a pageview in Google Analytics for the page that the script was run.

To answer your question then, you shouldn't have to remove anything.

Not the answer you're looking for? Browse other questions tagged or ask your own question.