Google analytics on wordpress?

Discussion in 'WordPress' started by DrLakitu, Jan 4, 2009.

  1. #1
    I put my analytics code in my wordpress header.php, but is this the correct place to put it? I know I had some unique visitors yesterday but it say's 0 visits? I have it on a static site and works a charm.
     
    DrLakitu, Jan 4, 2009 IP
  2. devilkitty

    devilkitty Peon

    Messages:
    303
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try and add it to the footer.php.

    Should probably work at the header.php. But the footer is where mine is and it works like a charm. :)
    failing that , look for a file thats loaded on every page load and add it there.


    hope it helps
    Dan
     
    devilkitty, Jan 4, 2009 IP
  3. river

    river Active Member

    Messages:
    1,632
    Likes Received:
    54
    Best Answers:
    0
    Trophy Points:
    88
    #3
    Header should be fine. Footer or sidebar would work as well.
     
    river, Jan 4, 2009 IP
  4. Oranges

    Oranges Active Member

    Messages:
    2,610
    Likes Received:
    92
    Best Answers:
    0
    Trophy Points:
    90
    #4
    As everybody says, Footer.php is the best place to implement it.
    Or else you can find plugins for it as well, just Google it out and you'll find many out there.
     
    Oranges, Jan 4, 2009 IP
  5. dmi

    dmi Well-Known Member

    Messages:
    2,705
    Likes Received:
    51
    Best Answers:
    0
    Trophy Points:
    140
    #5
    The Google Analytics code should be put just before </body>. That is located in footer.php most of the time.
     
    dmi, Jan 4, 2009 IP
  6. Melissa

    Melissa Guest

    Messages:
    163
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    There are plugins to help with this.
     
    Melissa, Jan 4, 2009 IP
  7. napa

    napa Peon

    Messages:
    239
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    This is correct.
     
    napa, Jan 5, 2009 IP
  8. ~kev~

    ~kev~ Well-Known Member

    Messages:
    2,866
    Likes Received:
    194
    Best Answers:
    0
    Trophy Points:
    110
    #8
    In your google webmaster tools, did you have google scan your site to see if the code is installed correctly? If I remember right there is a way to check your site from within google webmaster tools. Google webmaster tools should say something like the code has been installed and is collecting data.
     
    ~kev~, Jan 5, 2009 IP
  9. MDArcade.Com

    MDArcade.Com Banned

    Messages:
    58
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    It will work in the footer or sidebar. Check for widgets and paste the code there.
     
    MDArcade.Com, Jan 5, 2009 IP
  10. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #10
    I use the Analyticator plugin for this.
     
    pipes, Jan 5, 2009 IP
  11. proxywhereabouts

    proxywhereabouts Notable Member

    Messages:
    4,027
    Likes Received:
    110
    Best Answers:
    0
    Trophy Points:
    200
    #11
    The best place is to put it on footer.php.
    So that the code will load when everything loads. It is how it supposed to be.
     
    proxywhereabouts, Jan 5, 2009 IP
  12. thunderspot

    thunderspot Peon

    Messages:
    73
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    here's the download link for google analytic plugin. this will save your time

    wordpress.org/extend/plugins/google-analytics-for-wordpress/

    this is the latest version, the manual is inside.
     
    thunderspot, Jan 5, 2009 IP