Which one is correct?

Discussion in 'Google Analytics' started by seoservicesvs, Apr 5, 2011.

  1. #1
    Which one is correct for Google analytic code @ adding
    before </body> or before </head>

    one of my client site traffic is totally down compare to last months.
     
    seoservicesvs, Apr 5, 2011 IP
  2. jeffreylee

    jeffreylee Peon

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The correct option is to add Google analytic code before </head>
     
    jeffreylee, Apr 5, 2011 IP
  3. seoservicesvs

    seoservicesvs Member

    Messages:
    310
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    But it's working one of another site @ before </body>
     
    seoservicesvs, Apr 5, 2011 IP
  4. idslogicweb

    idslogicweb Peon

    Messages:
    159
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The correct option is to add Analytics code before closing Body Tag (</body>). I added before </body> and It's working fine.
     
    idslogicweb, Apr 5, 2011 IP
  5. StevePro

    StevePro Peon

    Messages:
    106
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Google recommends putting the asynchronous code in the header section of your site, if it is the previous version of code (traditional version) it used to get placed before the closing </body> tag.

    The code will still work if it is placed outside of the recommended areas of the page.

    If your clients site is loosing traffic check that the status of the tracker is ok.
     
    StevePro, Apr 6, 2011 IP
  6. b10

    b10 Peon

    Messages:
    755
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    use it

    <body>
    //Here Put your Code
    </body>
     
    b10, Apr 7, 2011 IP
  7. Riversway

    Riversway Peon

    Messages:
    358
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This is correct as far as i am aware.
     
    Riversway, Apr 7, 2011 IP
  8. kevinnn

    kevinnn Peon

    Messages:
    39
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Put it in your head tag, as Google states. There is a reason why they've changed the position from </body> to </head> ;)

    I never liked the code before the </body>-tag and the reason Google did this is "for people with a slow internet connection, it could give a conflict."

    Come on, anno 2011...
     
    kevinnn, Apr 8, 2011 IP
  9. StevePro

    StevePro Peon

    Messages:
    106
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Yeah the old code used to stop the page from loading until it had been executed which is why it went at the end of the page. The asynchronous code runs in parallel with the page load and so can be placed in the head
     
    StevePro, Apr 8, 2011 IP
  10. VOnline

    VOnline Member

    Messages:
    294
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #10
    I don't think it matters much now. But Google recommends header so use header when you can.
     
    VOnline, Apr 8, 2011 IP
  11. Ajay Bhargava

    Ajay Bhargava Peon

    Messages:
    556
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Both are correct. But i think you should place your G.A code before </body> tag. Otherwise your site bounce rate could be increased.
     
    Ajay Bhargava, Apr 12, 2011 IP
  12. tech-guy

    tech-guy Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Well, code should be inserted before </head> thats what Google says. Google have different code types and according to the instructions most recent code should be placed before </head>
     
    tech-guy, Apr 12, 2011 IP
  13. Gibone

    Gibone Peon

    Messages:
    9
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    In conclusion you CAN put the code wherever you want but you SHOULD put it before </head>
     
    Gibone, Apr 14, 2011 IP
  14. 2digital

    2digital Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    in layman's terms: before the closing head tag!
     
    2digital, Apr 14, 2011 IP
  15. yogesh.ingress

    yogesh.ingress Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    Before </head>
     
    yogesh.ingress, Apr 15, 2011 IP
  16. prasanna724

    prasanna724 Peon

    Messages:
    126
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Both are correct. Google recommends the place to put the code. So following in the way is better.
     
    prasanna724, Apr 15, 2011 IP
  17. aira

    aira Active Member

    Messages:
    1,175
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    78
    #17
    I believe that adding the analytics code before </body> was recommended by most well-known and trusted SEO gurus
     
    aira, Apr 15, 2011 IP
  18. jezzz

    jezzz Notable Member

    Messages:
    4,884
    Likes Received:
    190
    Best Answers:
    0
    Trophy Points:
    200
    #18
    It is better to add after BODY because it doesn't affect your site loading speed and its loaded in the end of all markup
     
    jezzz, Apr 20, 2011 IP
  19. arvindgvt1

    arvindgvt1 Peon

    Messages:
    36
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #19
    Thanks friends for your suggesation.
     
    arvindgvt1, Apr 20, 2011 IP
  20. Lakado

    Lakado Guest

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #20
    <head>
    //Here Put your Code
    </head>
     
    Lakado, Apr 20, 2011 IP