Setting up new GA Code

Discussion in 'Google Analytics' started by tommseo, Jul 19, 2010.

  1. #1
    can put new GA Code in anywhere before </head> or its mandatory to put the same just before </head>
     
    tommseo, Jul 19, 2010 IP
  2. atxsurf

    atxsurf Peon

    Messages:
    2,394
    Likes Received:
    21
    Best Answers:
    1
    Trophy Points:
    0
    #2
    anywhere within head tags is fine, but google recommends to put it the last just before the head closing tah
     
    atxsurf, Jul 20, 2010 IP
  3. imperialDirectory

    imperialDirectory Peon

    Messages:
    395
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you using the newer version "Asynchronous Analytics" tracking code, you should put it right under open <body> tag. If you using older version, its better to put it right above closing </body> tag.

    Putting JS script in head tag may reduce page load performance. As the javascript needs to be downloaded before any part of your site will show. But for the newer version, the performance impact is minimum.
     
    imperialDirectory, Jul 20, 2010 IP
  4. Rev Jain

    Rev Jain Active Member

    Messages:
    202
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    80
    #4
    you also put Ga code in between script command.
     
    Rev Jain, Jul 21, 2010 IP
  5. terencelewis

    terencelewis Peon

    Messages:
    107
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Yes its true........
     
    terencelewis, Jul 21, 2010 IP
  6. seoshel

    seoshel Peon

    Messages:
    366
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you can put GA code before </head> its not mandatory to put code just before head section. you can put in between scripts
     
    seoshel, Jul 21, 2010 IP
  7. Rujuta

    Rujuta Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    For the older one Google recommends - just before </body>
    For the newer one i.e. asynchronous code Google recommends - just before </head>
     
    Rujuta, Jul 28, 2010 IP
  8. Domenic Carlson

    Domenic Carlson Peon

    Messages:
    143
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    I keep my codes in the body, though I've actually put them in the footer before and they worked just fine. If you don't want to risk it, keep it in the body.
     
    Domenic Carlson, Jul 28, 2010 IP
  9. alexnikle

    alexnikle Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    What's the differents between new and old code? I want to try the new one.
     
    alexnikle, Jul 29, 2010 IP
  10. Michael smith

    Michael smith Peon

    Messages:
    313
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Copy your Google Analytics code from your GA account then paste into your site footer section. after that verify your code.
     
    Michael smith, Aug 2, 2010 IP
  11. julietevents

    julietevents Peon

    Messages:
    294
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Yes it True..
     
    julietevents, Aug 2, 2010 IP