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 to post Google analytical code

Discussion in 'WordPress' started by derek53, Aug 25, 2010.

  1. #1
    Is it possible to instal the google analytical code in WP ? If yes where should it be installed ?
    many thanks
     
    derek53, Aug 25, 2010 IP
  2. s_ruben

    s_ruben Active Member

    Messages:
    735
    Likes Received:
    26
    Best Answers:
    1
    Trophy Points:
    78
    #2
    Open the file footer.php from the theme directory that you use and add the google analytical code just before the tag </body>.
     
    s_ruben, Aug 25, 2010 IP
  3. appstacks

    appstacks Peon

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yes, It is possible to install the Google Analytics code in Wordpress.

    Given are the three methods, which can help you to add GA.

    1-Direct Paste Method

    Copy the Analytics code that you received from your Google Analytics Account, and paste it in your theme’s footer.php right above the </body> tag.

    2-Functions.php Method

    Add the following code in your theme’s functions.php file and don’t forget to paste your Google Analytics code.

    <?php
    add_action('wp_footer', 'add_googleanalytics');
    function add_googleanalytics() { ?>
    // Paste your Google Analytics code
    <?php } ?>

    3-Plugins Method

    There are tons of plugins available to add Google Analytics to your site. The two that we recommend are:

    Google Analytics for WordPress by Joost de Valk
    Google Analyticator by Ronald Heft
     
    appstacks, Aug 25, 2010 IP
  4. giorgioarmani

    giorgioarmani Well-Known Member

    Messages:
    2,633
    Likes Received:
    40
    Best Answers:
    0
    Trophy Points:
    160
    #4
    This plugin is well worth it... You get a nice overview in your WP dashboard of the latest visitors as well as:

    Top referrers
    Top searches
    Site Usage (Visits/Bounce Rate/Pages per visit/etc.
     
    giorgioarmani, Aug 25, 2010 IP
  5. derek53

    derek53 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    hi and many thanks for many suggestions and advice. This forum is proving to be one of the best i have joined, thanks once again
    Derek
     
    derek53, Aug 25, 2010 IP
  6. HighRollerT

    HighRollerT Guest

    Messages:
    235
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    The Google analytics plugin is the simplest way...but other than that use the Footer like footer like s_ruben suggests
     
    HighRollerT, Aug 25, 2010 IP
  7. Cr.designer

    Cr.designer Member

    Messages:
    187
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #7
    open the theme options and use text page to paste analytical code in WP or u use in wedget
     
    Cr.designer, Aug 25, 2010 IP
  8. serverbing

    serverbing Peon

    Messages:
    129
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    lookup on google, you should find lots of help on this
     
    serverbing, Aug 25, 2010 IP
  9. papayamilkshake

    papayamilkshake Peon

    Messages:
    108
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    you can use google analytics plugin from Yoast which is simple and easy
    install, activate and key in your Google Analytics tracking ID. ;)
     
    papayamilkshake, Aug 26, 2010 IP
  10. derek53

    derek53 Peon

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    I have used the plugin google analytical and its brilliant. I have also installed the plugin siutemap, but google webmaster tools is not accepting them.
     
    derek53, Aug 26, 2010 IP
  11. Jalpari

    Jalpari Notable Member

    Messages:
    5,640
    Likes Received:
    137
    Best Answers:
    0
    Trophy Points:
    260
    #11
    Use Google Analytics for wordpress plugin or paste ur analytics code in wp theme footer.php file before </body> tag.

    Be sure code is working by checking analytcis stats after few hours.
     
    Jalpari, Aug 26, 2010 IP
  12. psharma

    psharma Prominent Member

    Messages:
    1,955
    Likes Received:
    85
    Best Answers:
    4
    Trophy Points:
    345
    #12
    You can install it anywhere in the page, only keep in mind that it must be available sitewide.

    1. Place it in header.php ( so that the code loads prior to the whole page ) OR
    2. Place it in footer.php ( so that the code loads after the whole page ) OR
    3. The simplest way is to paste it as a text/html widget. It works. You just need to put some other code as well to use that widget ( else it will look as an empty widget.)
     
    psharma, Aug 26, 2010 IP