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.

where do i put the Google Analytics Code?

Discussion in 'Google Analytics' started by driven, Jul 2, 2006.

  1. #1
    If I'm using a Wordpress Blog, where would I put my Google Analytics Code to enable stat tracking? Do I put it into each separate page, of which there are many on my site? Or do I put it into a certain php file such as my index page or what?

    Does anyone have experience with this?

    Thanks.
     
    driven, Jul 2, 2006 IP
  2. bwp58

    bwp58 Peon

    Messages:
    485
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi

    I usually put it in the footer.

    Edit templates - open the footer file
    Then insert just above the </body> tag.
    Save and you should be away.

    PM me if your having problems and I'll do my best to help out.

    Regards
    Brian
     
    bwp58, Jul 2, 2006 IP
  3. driven

    driven Peon

    Messages:
    400
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Brian- that's good enough for me. I was under the impression that the code will only track one page as that is what it says on my Analytics admin. Guess not. Thanks again.
     
    driven, Jul 2, 2006 IP
  4. MattUK

    MattUK Notable Member Premium Member

    Messages:
    6,951
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #4
    Having never used wordpress I can't be sure, but if you put it in the template HTML it should already be on overy page. Is this possible?
     
    MattUK, Jul 3, 2006 IP
  5. sean

    sean Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Use a plugin because it will make sure that it is displayed on each page.
    Google "google analytics wordpress" and it should be the 3rd one down.
     
    sean, Jul 3, 2006 IP
  6. ravianz

    ravianz Well-Known Member

    Messages:
    1,538
    Likes Received:
    56
    Best Answers:
    0
    Trophy Points:
    145
    #6
    i also use the code in footer for my WP blog like bwp58. one reason for using it there is that analytics sometimes take some time so that time period is better to be at the end of loading the page.
     
    ravianz, Jul 5, 2006 IP
  7. sandossu

    sandossu Guest

    Messages:
    2,274
    Likes Received:
    87
    Best Answers:
    0
    Trophy Points:
    0
    #7
    pus ot before the </body> tag.
     
    sandossu, Jul 5, 2006 IP
  8. zokiii

    zokiii Peon

    Messages:
    656
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Does google analytics slows loading of web page ?

    I heared that does.
     
    zokiii, Jul 12, 2006 IP
  9. MattUK

    MattUK Notable Member Premium Member

    Messages:
    6,951
    Likes Received:
    377
    Best Answers:
    0
    Trophy Points:
    275
    #9
    It can do, though it's negligable. If you're really worried you can put the code in a separate file and call it seperately.
     
    MattUK, Jul 12, 2006 IP
  10. bhamlett

    bhamlett Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    As mentioned above, depending on how your WordPress template is setup, you can just add this to the footer.php file underneath the "Appearance->Editor" tab. If you want, you can use a plugin, but I'm not always a fan as if your site is running say 10 plugins, all of them have to be called each time your page loads and it could cause some performance issues (really depending on your hosting account/server.)
     
    bhamlett, Feb 7, 2012 IP
  11. I_M

    I_M Greenhorn

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #11
    The WP header is also a viable location: Appearance - Editor - Header
     
    I_M, Feb 10, 2012 IP
  12. gaush007

    gaush007 Greenhorn

    Messages:
    39
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #12
    Hey if you are using the paid version of the wordpress than you can download a GA plugin. Once you download the plugin you will be able to insert the Google Analytics code by going through the setting section of this plugin.
     
    gaush007, Feb 14, 2012 IP
  13. DeepakDwivedi

    DeepakDwivedi Greenhorn

    Messages:
    99
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    18
    #13
    Just use it in Body above the body </body> tag.
     
    DeepakDwivedi, Feb 14, 2012 IP
  14. gotoandroid

    gotoandroid Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #14
    The Analytics snippet is a small piece of JavaScript code that you paste into your pages. It activates Google Analytics tracking by inserting ga.js into the page. To use this on your pages, copy the code snippet below, replacing UA-XXXXX-X with your web property ID. Paste this snippet into your website template page so that it appears before the closing </head> tag.
     
    gotoandroid, Nov 28, 2012 IP
  15. Geminfarera

    Geminfarera Peon

    Messages:
    26
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    3
    #15
    you can either put it in footor or a header but make sure to put it before closing body tags.
     
    Geminfarera, Dec 3, 2012 IP
  16. sellgadget

    sellgadget Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #16
    You have to put analytic code in between body tag of your website code.
    Like say
    <body>

    Analytic code
    </body>
     
    sellgadget, Dec 4, 2012 IP
  17. robbang

    robbang Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #17
    Search some plugin for this on google.
     
    robbang, Dec 11, 2012 IP
  18. aixporter

    aixporter Peon

    Messages:
    17
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Contrary to that, most people also say to place the code right before the </head> tag.
     
    aixporter, Dec 12, 2012 IP
  19. sharppotato

    sharppotato Greenhorn

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    21
    Digital Goods:
    1
    #19
    they have a plugin and you can also enter it in the footer.
     
    sharppotato, Dec 12, 2012 IP
  20. kaminiprajapati

    kaminiprajapati Member

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #20
    hello Friends, Can i put GA code in header part & also put in Body part. Means put both section GA code in website. Any effect??
     
    kaminiprajapati, Jan 22, 2013 IP