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.

Google Analytics Help Needed

Discussion in 'Google Analytics' started by shanmugasundaram, Sep 15, 2009.

  1. #1
    index.php - in my theme i tried to add google analytics code.


    google is asking me to copy the code before </body> tag in the index file but i dont have any HTML tag in my index.php file.

    what to do? where should i add the code?

    is it good to add analytics or just leave without that?
     
    shanmugasundaram, Sep 15, 2009 IP
  2. camp185

    camp185 Well-Known Member

    Messages:
    1,653
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    180
    #2
    Are you using WordPress by any chance. If you are just go the your theme folder and add the code to the file called footer.php
     
    camp185, Sep 15, 2009 IP
  3. tejaswini

    tejaswini Peon

    Messages:
    42
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Ya, you have to add the code to footer because in the structure you might be having header.php where <body> tag starts, index.php where there is the code for your content page and footer.php where there is </body> i.e. end of body tag. Just put it in footer. In fact you can put the analytics code anywhere in your code, right in index.php. But Google asks it to put before end of body tag because, then the analytics will count the pageview only when the complete page is loaded :) Some people put the analytics code in header, so that though someone opens and closes the page, still it is counted by analytics
     
    tejaswini, Sep 16, 2009 IP
  4. demons-halo

    demons-halo Active Member

    Messages:
    243
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #4
    im having trouble setting up for my DP account, how do i set it up, ive followed the process by clicking analytics at the top of my page but the actual tracking system says its not installed, where would i place the tracking code so i can see visits for my profile page??
     
    demons-halo, Sep 16, 2009 IP
  5. abluegrape

    abluegrape Peon

    Messages:
    1,029
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5

    Are you using woredpress?
     
    abluegrape, Sep 16, 2009 IP
  6. demons-halo

    demons-halo Active Member

    Messages:
    243
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    55
    #6
    no, isnt the analytics thing at the top next to the private messages meant for you can see how many visitors you get on your profile page for DP
     
    demons-halo, Sep 16, 2009 IP
  7. vipinsharma

    vipinsharma Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    HI,

    You may have the separate header and footer file so add this google script in footer file.


    - Vipin
     
    vipinsharma, Sep 16, 2009 IP
  8. titanium1357

    titanium1357 Peon

    Messages:
    8
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    What CMS are you using ?
    Usually, I add Google Analytics code in header.tpl file, this is php template . You can try it out.
    Path: yoursite.com/smarty/templates
     
    titanium1357, Sep 16, 2009 IP
  9. MaverickGuy

    MaverickGuy Peon

    Messages:
    74
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    I am having some of the same issues. In fact, my blog is hosted on Blogger (or blogspot). I installed the google code on my blog and when I click confirm, it says it is installed and is able to retrieve the analytics. However, I am getting zero traffic--and I don't think this is possible. I have had traffic before and now I have many links on Twitter and many posts on my blog. I also ping my blog after I make a post...so this is NO way I should be getting zero traffic. Help please?
     
    MaverickGuy, Sep 17, 2009 IP
  10. onsons

    onsons Peon

    Messages:
    108
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    its very easy ........you have to add analytic code in footer section before</body>
     
    onsons, Sep 18, 2009 IP
  11. davidmerrick

    davidmerrick Peon

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Yeah it's a real simple setup. Just copy the code from when you signed up for Analytics and put it immediately before the </body> tag. Your site may be split up into different PHP files depending on the Content Management System (CMS) you're using, in which case it may take a little searching to find that tag but it's the same deal. Just put the code before the </body> tag and you're golden.
     
    davidmerrick, Sep 18, 2009 IP
  12. MaverickGuy

    MaverickGuy Peon

    Messages:
    74
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    I went ahead and added the code to before the body in the template. But, even before I did that, next to "tracking status", it said it was "receiving data". Is there anything else that could be screwing up? I'll let you know in a day or 2 if my stats change at all.
     
    MaverickGuy, Sep 19, 2009 IP
  13. lakkineni

    lakkineni Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    What is your blog URL? I can take a look if you are still having trouble seeing data.
     
    lakkineni, Sep 20, 2009 IP
  14. lakkineni

    lakkineni Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Did you find an answer? Let me know your URL I can take a look! :) PM me the details if you prefer.
     
    lakkineni, Sep 20, 2009 IP
  15. wecans

    wecans Peon

    Messages:
    173
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    If you are using WP, add it in the index.php or footer.php in your theme folder.

    If you are using Blogger, add it in your edit HTML section.
     
    wecans, Sep 22, 2009 IP