1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Analytics Code placement

Discussion in 'Google Analytics' started by saqibkhan2311, May 16, 2011.

  1. #1
    Whether the placing Google Analytics Cod in the head would be better or placing it in the body . please help.
     
    saqibkhan2311, May 16, 2011 IP
  2. JackRT

    JackRT Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    There is no difference my friend... just make sure you put the tracking code as they suggest and test before publishing it so that it does not screw your site.
     
    JackRT, May 16, 2011 IP
  3. Seriously

    Seriously Member

    Messages:
    137
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    30
    #3
    as Jack says, if you have already gotten the code or had a look at analytics, it would have told you exactly what to do. I have never had a problem with the code interfering with any sites function.
     
    Seriously, May 17, 2011 IP
  4. ivounnerry

    ivounnerry Member

    Messages:
    252
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #4
    You can place it anywhere. Just make sure it's really working. :)
     
    ivounnerry, May 17, 2011 IP
  5. aira

    aira Active Member

    Messages:
    1,176
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    78
    #5
    though most webmasters suggests to put the analytics code before </body>
     
    aira, May 17, 2011 IP
  6. b10

    b10 Peon

    Messages:
    755
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    you may use it like script ...

    i mean you can use it any where in your source code
     
    b10, May 17, 2011 IP
  7. joesmith1608

    joesmith1608 Peon

    Messages:
    178
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    You can past any where want in page.But people mainly place before the closing body tag(</body>).
     
    joesmith1608, May 27, 2011 IP
  8. jbtooloo

    jbtooloo Peon

    Messages:
    206
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Though most will find the GA code after </body>
     
    jbtooloo, May 27, 2011 IP
  9. ranjithsf1

    ranjithsf1 Peon

    Messages:
    188
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Placing the code in header would be better because the website loads in that order, haeder first. If someone leaves your site within one or two seconds after entring your sites, GA may not track it if the code is somewhere to the end because the code hasn't been loaded yet.
     
    ranjithsf1, May 30, 2011 IP
  10. brijeshtiwari1984

    brijeshtiwari1984 Member

    Messages:
    66
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #10
    Dear friend,
    You just place any where in web page but end point is best for placing tag. Actually for developer point of view you don't want to confusion about making code for website. Then you place code either head section or before end of Body tag </body> in web Page.
     
    brijeshtiwari1984, Jun 9, 2011 IP
  11. productsmarine

    productsmarine Greenhorn

    Messages:
    95
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #11
    You can put this tag any where into body tag
     
    productsmarine, Jun 9, 2011 IP
  12. jahangir

    jahangir Peon

    Messages:
    633
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I would recommend to put analytics (and other third party codes) to the footer because if (for any reason) any of these scripts do not load then your site should not stuck.
     
    jahangir, Jun 9, 2011 IP
  13. Kumail

    Kumail Peon

    Messages:
    92
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #13
    When you put any website in GA. Google will guide you where they want you to add the tracking code. Either before the <head> tag or before the end of <body> tag
     
    Kumail, Jun 9, 2011 IP
  14. Nikz_virgo

    Nikz_virgo Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    hittstats is better than google analytics
     
    Nikz_virgo, Jun 9, 2011 IP
  15. virtuat

    virtuat Peon

    Messages:
    109
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    agree with you but it doesnt matter where you put code, if code is working
     
    virtuat, Jun 10, 2011 IP
  16. tomsmith2010

    tomsmith2010 Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Place that code in your head section
     
    tomsmith2010, Jun 13, 2011 IP
  17. aileenwuornos

    aileenwuornos Peon

    Messages:
    288
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #17
    You can place analytics code into head section of your page.
     
    aileenwuornos, Jun 17, 2011 IP
  18. bachi4u

    bachi4u Greenhorn

    Messages:
    49
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #18
    its not the matter where u place , it will work even if u place in the head or in the body but for u r convenience place it in the body to easily identify the code.
     
    bachi4u, Jun 21, 2011 IP
  19. naddy84

    naddy84 Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #19
    All right!! Google Analytics script will work everywhere on the page but placement depends on your requirements
    suppose we have pasted it in header section of website it will be loaded before loading of complete page and suppose meanwhile the visitor has closed the tab, it will counted as a visit in Google Analytics Report but actually it was nothing because visitor had closed the tab before the page loads properly.

    in second scenario if we post it before </body> tag Google Analytics code will be loaded after the loading of complete page and because visitor is still on the page that's a real visit that data is useful for us to track.

    So I will suggest you to paste it before closing of body tag, and of course embed it in your dynamic footer its smart practice if you are dealing with dynamic site
     
    naddy84, Jun 21, 2011 IP
  20. andre01

    andre01 Member

    Messages:
    151
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #20
    you can put it anywhere but according to me we should put it on body
     
    andre01, Jun 22, 2011 IP