How do I add Google Analytics to ad a wordpress blog?

Discussion in 'WordPress' started by JPMiddleton, Jun 17, 2011.

  1. #1
    Hi folks,

    I want to add Google Analytics to a few WP blogs I have, and would like to know the quickest way please.

    I have added a plug-in but it doesnt appear to be working. (for www.qrjuice.com )
     
    JPMiddleton, Jun 17, 2011 IP
  2. KimiGermany

    KimiGermany Peon

    Messages:
    1,117
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If we check in the page source, the GA code is already there.

    We should see in a few days in your GA account, if it detects activity. If it does, then it works..
     
    KimiGermany, Jun 17, 2011 IP
  3. ThemesAddict

    ThemesAddict Member

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    go to google analytics and create a account and add all of you website one by one and then they will give you a code that you will need to add in the footer or header , i recommend footer and then your website it ready for google analytics , start tracking your traffic
     
    ThemesAddict, Jun 17, 2011 IP
  4. JPMiddleton

    JPMiddleton Well-Known Member

    Messages:
    1,728
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #4
    How do I add the code to the footer please?
     
    JPMiddleton, Jun 17, 2011 IP
  5. Techwork

    Techwork Peon

    Messages:
    28
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Techwork, Jun 17, 2011 IP
  6. bekar09

    bekar09 Active Member

    Messages:
    283
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    70
    #6
    bekar09, Jun 18, 2011 IP
  7. Globalp

    Globalp Peon

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I use google analyticator also google analytics dashboard this adds a nice small stat area on your dashboard.
     
    Globalp, Jun 18, 2011 IP
  8. JPMiddleton

    JPMiddleton Well-Known Member

    Messages:
    1,728
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #8
    Thanks for your help helps, sorted. Much appreciated.
     
    JPMiddleton, Jun 20, 2011 IP
  9. tanmaysasvadkar

    tanmaysasvadkar Peon

    Messages:
    45
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Go to your Wordpress admin area. On the left, look for "Appearance" and expand it to reveal "Editor". Click on that and you will be taken to a screen with HTML code on it and a bunch of file names to the right.

    Click on "footer.php". Scroll to the very bottom of the text area that should now be displaying the HTML code of your footer. Find the </body? line and right above it, add/paste your Analytics code.
     
    tanmaysasvadkar, Jun 30, 2011 IP
  10. JPMiddleton

    JPMiddleton Well-Known Member

    Messages:
    1,728
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    115
    #10
    Thanks for the help. I have sorted this now.
     
    JPMiddleton, Jun 30, 2011 IP
  11. bhamlett

    bhamlett Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Well, plugins are fine to use. However, I find that if I'm already using a few plugins and all I want to do is add Google Analytics code, then it's better just to edit the footer.php template file found in the "Appearance->Editor" tab (in WordPress version 3+) so I don't have the processing load when a page is displayed.

    Just open that file and put your Google Analytics code before the closing body tag (</body>).

    WARNING: If you've used a free theme and there is a theme upgrade, it might overwrite the file and erase your GA code.
     
    bhamlett, Feb 7, 2012 IP
  12. ajwalsh

    ajwalsh Peon

    Messages:
    291
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    ajwalsh, Feb 7, 2012 IP