by art72
10 replies
  • |
While I am becoming more familiar with using Google Analytics, I am noticing several people put the tracking code in the footer or just before the </body> tag.

Is there a difference whether the code is installed just before the </head> tag, as opposed to just before the closing </body> tag?

Couldn't help to ask, as I am noticing on a lot of sites, people are putting it before the </body> tag.

Is it safe to believe doing so, will cause the crawlers, bots, scan through everything before reaching the analytics code, or is it merely personal preference.

All this time, I have been putting the code just below my title tag, meta description, and index,follow tags. Is that wrong?

Just seeking some clarification, thanks.
#analytics #google
  • Profile picture of the author Toby Couchman
    Its supposed to be faster to place it before the closing body tag because it will be the final thing the browser loads.

    {{ DiscussionBoard.errors[3965211].message }}
    • Profile picture of the author merry1
      Originally Posted by m0nk3yb0y View Post

      Its supposed to be faster to place it before the closing body tag because it will be the final thing the browser loads.


      Agree with you, that's what i suggest.
      {{ DiscussionBoard.errors[3976302].message }}
  • Profile picture of the author ussher
    Think the general advice on this topic is Header for more accurate reporting, Footer for faster page load times.

    you page will load from top to bottom of the code. If google is the first thing that is done when someone visits your page, the reporting is more accurate, but google has to load before the actual page does, so slows down your page load time.

    "Jamroom is a Profile Centric CMS system suitable as a development framework for building entire communities. Highly modular in concept. Suitable for enterprise level development teams or solo freelancers."

    Download Jamroom free: Download
    {{ DiscussionBoard.errors[3965216].message }}
  • Profile picture of the author clau82
    I am using WP so this is not applicable though most themes and plugins will load the script in the footer (before /body).
    The other thing to consider here is other scripts that require to be placed either in the header or footer(before /header or before /body). In some cases will not work properly with GA code
    {{ DiscussionBoard.errors[3967392].message }}
  • Profile picture of the author olakh
    You have not do wrong anything.But If you want to reduce the page load time then put the code before </body> tag.
    {{ DiscussionBoard.errors[3967425].message }}
  • Profile picture of the author XRogerX
    Man don't stress over such a small detail. Your page will load no matter where you place the code. Generally speaking everyone places their code before the initial <body> inside the <head> tag.. and not the </body> ... just put it before the <body> and be cool.
    {{ DiscussionBoard.errors[3971442].message }}
  • Profile picture of the author rauff
    we have to place the code before the closing body tag
    {{ DiscussionBoard.errors[3972612].message }}
  • Profile picture of the author sktechno
    You should place it before the </body> tag as it will make your page load faster. And it won't hurt the Google analytic anyway
    {{ DiscussionBoard.errors[3976921].message }}
  • Profile picture of the author EtheelLambert
    Use Google Analytics to apprentice which online business initiatives are amount able and see how visitors in fact collaborate with your site. Make informed website architecture improvements, drive targeted traffic, and access your conversions and profits.
    {{ DiscussionBoard.errors[3988366].message }}
  • Profile picture of the author jimgilared
    Google analytic is powerful tools of Google.This tool helps how many visitor comes in your website.It is show that how many visitor come your website by search engine and directory.It is show also bounce ratio and many more facility provide.
    {{ DiscussionBoard.errors[5159347].message }}

Trending Topics