How Many Places To Put It Can Their Be?

by 5 replies
6
I don't understand why I can't find a standard answer to this...but I will put it out again just to see what everybody's saying these days: Where is the best place to put Google Analytics code in your website?

Google says this: Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag. But over the years, I have seen so many articles or websites say that it should be at the end of the </body>.

Can anybody explain why there is such a discrepancy with something that seems like it should be pretty straightforward. Just curious...
#search engine optimization #places #put
  • Just put it before the end of the head tag. It works just fine.
  • if you use WP there are many Plugins for this
    • [1] reply
    • Well, I am using WordPress this time. But most of my sites are basic html. So, just as Google and Ezra say, it will be put before the head.

      But my question still stands should anybody have the answer to the eternal question! .
  • Banned
    If you put it before heading tag then it would work for all the pages.
  • The thing I am struggling with is why use Google Analytics?

    IMHO Piwik or Get Clicky are a better and safer bet.

Next Topics on Trending Feed

  • 6

    I don't understand why I can't find a standard answer to this...but I will put it out again just to see what everybody's saying these days: Where is the best place to put Google Analytics code in your website? Google says this: Copy the following code, then paste it onto every page you want to track immediately before the closing </head> tag. But over the years, I have seen so many articles or websites say that it should be at the end of the </body>.