WP, Google Analytics and single.php and page.php

Discussion in 'WordPress' started by pipes, May 16, 2008.

  1. #1
    If you have added google analytics manually to your wordpress blog, have you added the code to single.php and page.php files too?
     
    pipes, May 16, 2008 IP
  2. themanbeast9

    themanbeast9 Active Member

    Messages:
    1,665
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    90
    #2
    I would just download the plugin that will automatically add your code to each page. Just type "Google Analytics" in any Wordpress plugin site.
     
    themanbeast9, May 16, 2008 IP
  3. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #3
    I was using one for analytics then i went for coding straight into the index.php file, but i think il just go back to using the plugin, so using the plugin will cover those other two pages too?
     
    pipes, May 16, 2008 IP
  4. themanbeast9

    themanbeast9 Active Member

    Messages:
    1,665
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    90
    #4
    Yes, I believe so.
     
    themanbeast9, May 16, 2008 IP
    pipes likes this.
  5. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #5
    Thanks themanbeast9
     
    pipes, May 16, 2008 IP
  6. godsofchaos

    godsofchaos Peon

    Messages:
    2,595
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you use the plugin then it will cover every single page, post, archives page, tags, categories and everything else :)
     
    godsofchaos, May 16, 2008 IP
  7. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #7
    Thanks godsofchaos, il go back to using the plugin.:)
     
    pipes, May 17, 2008 IP
  8. Tooschee

    Tooschee Active Member

    Messages:
    1,020
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    80
    #8
    There's a simplier solution than plugin, which can make Your page load a little longer.
    Simply put the google Analitycs code AT THE BOTTOM of the page ( for example in footer.php ).

    In this way You can be sure, that every page/impressions/entry WILL be indexed, You do not need any plugins and it is all the way faster.
     
    Tooschee, May 17, 2008 IP
  9. pipes

    pipes Prominent Member

    Messages:
    12,766
    Likes Received:
    958
    Best Answers:
    0
    Trophy Points:
    360
    #9
    When i created my theme, i didn't seperate header, footer and sidebars into seperate php files so i find if im making an edit in index then i need to do it in a few other files too, but for my next theme il make sure i seperate those files.
     
    pipes, May 17, 2008 IP