HELP! - Analytics Code

Discussion in 'Google Analytics' started by miker9586, Oct 6, 2010.

  1. #1
    Hi, from a newbie,
    I am after a little advice.
    I have tried and failed in adding the verification code to my site, i can get to my main page php file, but cannot for the life of me, enter the code in the correct place!

    Any advice welcome

    Thanks in advance
     
    miker9586, Oct 6, 2010 IP
  2. scifibabu

    scifibabu Peon

    Messages:
    63
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need to enter your analytics tracking code in all the pages of your site before the </html> tag
     
    scifibabu, Oct 6, 2010 IP
  3. dodong

    dodong Guest

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm afraid it's the closing head tag </head> that you're referring to.
     
    dodong, Oct 6, 2010 IP
  4. imperialDirectory

    imperialDirectory Peon

    Messages:
    395
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Depends on the version of your Analytics code. For older _gat version. Its better to put before the </html> tag as it does have minor impact on page load speed.
    For newer asynchronous version _qat, you can put it right under <body> tag. Since it loads asynchronously, the performance impact is much lower.

    miker9586: What do you mean by correct place? You mean the PHP script breaks when you put in the code or it just doesn't appears in the HTML page?

    Cheers,
    Felix
     
    Last edited: Oct 6, 2010
    imperialDirectory, Oct 6, 2010 IP
  5. miker9586

    miker9586 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for replys
    Felix, what i mean by correct place is, i have added the code in varoius places as you have all suggested i.e <body> </html> and a couple of other places, that have been suggested. The code does appear in the HTML but it will NOT verify where ever i put it. I can use certain aspects of analytics, i.e sitemap is ok, crawler access and more,these are all showing data. But google are not able to collect any other data due to the verification code! i.e No data showing on my dashboard.
    Hope that makes sense
    Thanks
     
    miker9586, Oct 7, 2010 IP
  6. magda

    magda Notable Member

    Messages:
    5,197
    Likes Received:
    315
    Best Answers:
    0
    Trophy Points:
    280
    #6
    The verification code is for Google webmaster tools, not Google Analytics. Sitemaps, crawler access etc - all this is Google Webmaster tools data - nothing to do with Google Analytics at all.
    To track your site with Google Analytics you need to set up a profile with Google analytics http://www.google.com/analytics/
    and generate tracking code.
     
    magda, Oct 7, 2010 IP
  7. miker9586

    miker9586 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks to you all, especially magda.
    Installed and ready to go!
     
    miker9586, Oct 7, 2010 IP
  8. mithil

    mithil Peon

    Messages:
    433
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Good to hear that. Just wanted to inform you that you can also verify your site by uploading the file with verification code.

    This option is more reliable as sometimes webmasters makes changes on the page and remove the meta tags.
     
    mithil, Oct 7, 2010 IP
  9. miker9586

    miker9586 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks mithil,

    i will bear that in mind
     
    miker9586, Oct 7, 2010 IP
  10. sanoy

    sanoy Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    u have to add the cod in html code before </body> it will be at the end
     
    sanoy, Oct 7, 2010 IP
  11. miker9586

    miker9586 Peon

    Messages:
    62
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks sanoy, Mission completed
     
    miker9586, Oct 7, 2010 IP