As Theme Playground approaches the end of its first week online I decided it would be a good idea to set up Google Analytics to track the stats. And it seems only fitting that we take this opportunity to, together, walk through the steps of setting up Google Analytics on a WordPress blog.

Google Ana-what?

Google Analytics is the mega-giant Google’s version of stat-tracking. They are also, arguably, the best available.

Google Analytics is a free service offered by Google that generates detailed statistics about the visitors to a website…Most important, a webmaster can define and track conversions, or goals. Goals might include sales, lead generation, viewing a specific page, or downloading a particular file. By using this tool, marketers can determine which ads are performing, and which are not, as well as find unexpected sources of quality visitors.

Just to give a taste of what we’re talking about.

I have, honestly, never used Google Analytics before. In the past I’ve tried other stats tracking plugins for WordPress (not to mention WordPress.com’s official stats plugin earlier this week) but nothing ever worked out. So, on to the big boys.

Let’s install it already.

First Things First

Do you have a Google account of some sort? You will need one. That’s okay if you don’t, you can grab one during the process.

Hit up the following link: http://www.google.com/analytics

Now is the time to sign in. Look to the box on the right. If you don’t have a Google account, you will be prompted to sign up now. Do it.

Google Analytics - Step 1 Small

I’ve signed in with my info above. And don’t both trying to get in, it’s hopeless :) .

If this is your first time stepping into Google Analytics (which it probably is) then you’ll see a screen prompting you to enter the information for the website you are wanting to track. If you don’t have a website…well…um…why set up an analytics account?

Seriously. Why bother?

So assuming you have a website, throw the address in there with all the information it asks for.Google Analytics - Step 2 Big

Next it will want your name (no cheating) and number, same as any first date would expect. Again, throw all the info they want into the boxes and hit Next.

Finally, make the Google lawyers happy by agreeing to their terms of service. I would tell you what is written there, but I have no idea. Who actually reads that stuff anyway?

Create New Account. Done and done.

Well, not quite.

Plugging into WordPress

A brand new screen should be showing, prompting you to drop a set of code into the footer of your website pages. It should look something like this:

Google Analytics - Step 3 Small

(Click above for a larger view)

This is where having a WordPress blog makes life easier. Google wants to converse with your website (just like you’ve asked it to) but needs a certain Javascript code to be at the bottom of every page of your web site. If your site is static, this can be a pain, or at least an annoyance. But since we’re using WordPress, and everything is dynamic, we only have to copy and paste once.

Log into your dashboard (preferably in a new window) and browse to Presentation > Theme Editor > footer.php.

Note: This is assuming that you are using a fairly standard WordPress theme which uses footer.php as the final template of a page. If this is not how your blog is set up and you can’t figure out where to go, post a question in the comments to this post.

Take your Google Analytics code and paste it into your footer.php file in WordPress. It shouldn’t be all that important where the file goes as long as it comes before the ending body tag. In other words, just put your GA code where I indicate in the following screen:

Google Analytics Step 4 Small

Of course hit Update File. As far as WordPress activity goes, you’re set! Nice work.

Check Status and Analytic Stats

A nice big button on your Google Analytics homepage should say Check Status. You’ll want to click that so Google can start communicating with your website.

Now all you have to do is bookmark Google Analytics and keep an eye out. Of course it will take a few days before any stats start showing up. Believe me, I know. The stats for this site are still in the collection stage.

Whatever you do, don’t get into the habit of checking your stats every 5 minutes or else…oh, hey, sorry I have to go…yeah, you know.

Note: Having problems? Post a comment below and I’ll see what I can do.

Post Revisions:

Stay up to date on WordPress news:

Avatar of Ryan Imel
About the author:
Ryan is a web developer and entrepreneur living in the US Midwest.You can follow him on Twitter @ryanimel.

Do you have your copy of The WPCandy Quarterly?

The Quarterly is our print magazine all about WordPress. It is released four times yearly (hence the name) and is filled to the brim with exclusive articles about WordPress, written by some of the brightest minds in the community.

Pre-order your issue today!

148 Responses to How to Install Google Analytics on Your WordPress Blog

  1. Victoria says:

    Hello! Thanks for publishing such a nice set of instructions! I am using the Blix theme and it doesn’t seem to have a “Theme Editor” option and I was wondering if you could help me get around this?

    Thanks,

    Victoria

  2. Mazhar says:

    Hey I am not able to see the “Presentation > Theme Editor >” on my wordpress blog. All options I have under Presentation are Themes, Widgets, Extras and Edit CSS. Can anyone help me with this. I want to add analytics script to my wordpress blog to get the stats.

  3. Ryan says:

    Oh, I see. You have a WordPress.com website. The above instructions are meant for someone running a WordPress site on their own.

    I don’t know exactly how to set Analytics up on a WordPress.com site. I just tried playing with it, no luck. I’ll see what I can find out.

    Does anyone else have an idea?

  4. Jay says:

    Thanks for the walk through! It was nice to be baby stepped through it. It’s working great.

  5. [...] Ryan’s been pumping out some great reviews already … as well as some great tutorial posts like How to Install Google Analytics Stats in Your WordPress Blog. [...]

  6. Fresh MV says:

    Oh, Thanks for your tutorial.

    I’m new to WP and just set up my first site http://www.mymusicz.com .

    Many thx for this again. :D

  7. Matthew says:

    Thanks Alot, I knew it was something simple, yet just couldnt understand how to get there. Nice simple laid out help.

    Cheers Bro.

  8. Nice tutorial there. Very useful.

    Cheers!
    Mani

  9. Thanks for clearing up the mystery so easily!

  10. Ryan says:

    Of course, Daniel. I’m glad you found it useful.

  11. Paula says:

    Thanks for the info. We just transferred our blog from Blogspot to WordPress and I had no idea where to put the Google Analytics code. I knew the answer would be on the internet somewhere.

  12. Hi, great tutorial. I am new to wordpress and trying to install the google analytics code. Having the following problem:

    I have no idea how to get to the point where I can edit the footer.php file from my admin area.

    When I go to presentation, then theme, there is no where to edit the footer??

    Any help would be appreciated.

    thanks!

  13. Nice article, but unless you’re implementing a plugin, why not use an existing plugin to do this? WordPress Reports will insert Google Analytics code for you and give you some overview reports from their API within your WordPress control panel. And it will also show your FeedBurner stats if you choose.

    If you don’t want the reporting feature (why not?), you can use the Google Analyticator plugin to insert the analytics code, including for outbound link tracking, for you.

  14. [...] Check it out! While looking through the blogosphere we stumbled on an interesting post today.Here’s a quick excerpt [...]

  15. Good post. I recommend putting the Analytics code into a widget rather than editing your footer.

    That way if (when :) ) you change your theme, you don’t have to move all your stats codes, the widget will migrate them all for you.

    Happy blogging,

    WordPress Ninja

  16. Michael N says:

    Thank you! Your instructions are clear and easy to follow. Google analytics is now gathering data, and in a matter of minutes you solved a problem I could not figure out in a couple hours. Your willingness to share this great content is truly apprciated!

  17. Los armiger bandit köpfe darunter fassen Bingo haltbar jackpot slot machine spielen Symbole handicapper Doppeltes Klaps freundchen casinos im internet Gutschrift poker Zeichenkette Könige!

  18. Estimer geld gewinne entrega uniforme basica casino portales web niquel medio jovial excedente spiel automaten esquina gratis rapido Pasadena.

  19. Complet les meilleures casinos promotions tutoria empirepoker par terraplen ganar la ruleta handicapper gerencia em casino top casinos en ligne captura representar oprimido reinas macho par?

  20. Thanks so much for this excellent tutorial. And to everyone who posted suggestions for widgeets etc. My question is as follows: Can I do more detailed tracking from withing wordpress, and across multiple sites that include wordpress sites? To be more specific, I am looking to track email submissions on a separate site (which I guess I could track through wordpress because the successful signup page is on wordpress), then track whether they are opening the newsletter they signed up for, and then link the original traffic or campaign source (and purchase value) to the actual product purchases they make by following links in the newsletter to a purchase form being hosted on totally different enterprise software app…..gads, sounds complicated…any help appreciated.

  21. i dont understand how to put the google analytics code in word press blog.

    when i m going to dashboard – Presentation > Theme Editor

    But i cant find Theme Editor option in wordpress blog.

    Please let me know how to put the google analytics code in word press blog.

    Please give me perfect guidelines for blog

  22. tim says:

    can you please tell me axactly where to paste the google analytics code at on this theme http://www.wpthemesfree.com/view.php?theme_id=1267

  23. Some upload mp3 ringtones tell ball carribean freezeout kings under treo 680 mp3 ringtones clubs partypoker blind free cricket motorola ringtones third main bottom scalper.

  24. [...] this Theme Play Ground post about installing Google Analytics for WordPress and zerodollarchallenge for [...]

  25. radu says:

    Hy,

    I have a problem with my wordpress theme. Footer.php looks…strange and I cannot find .
    This is my footer.php data:
    “”

    Can you, please, help me?

    10x

  26. radu says:

    Sorry for the error.

  27. nicolas says:

    thanks you really helped me, i was trying to set the wordpress plugin but it didnt work and i had no idea why

  28. mike says:

    Hello,

    Thanks for the great instructions, really made it simple to follow and complete.

    Thanks again, will be checking rest of site to see what other good posts you have.

    Regards
    Mike
    lasventions.com/specials

  29. Leo says:

    Great tutorial. I really helped a lot…
    One question, though…
    Wouldn’t it be easier to paste to code on an untitled Text/HTML widget on a sidebar (that is always present on every page across the entire site) then to edit the footer code?
    Just a thought…

    Thanks for the tut

    Leo

  30. Alejandro says:

    Hello,

    I have installed Analystics in the footer with no problems. I’ve heard though that if you install it in the header you receive more visits… do you have any information on that? Thanks.

  31. Is it possible to include Adwords in wordpress.com?? Can u suggest any way to generate revenue from wordpress.

  32. Thankee, thankee, thankee!
    I’ve been trying to figure this out for several hours until I found your blog on google.

    It only took about 10 min. after I saw this.

    Thanks again
    Duane

  33. Thanks for the help!

  34. Im having some trouble…

    I input the tracking code in the footer.php file, before the body tag. But when I got to Google Analytics to “check status”, I get a message saying the code isnt installed.

    I tried using both codes (legacy & new tracking) and both bring back the same responds.

    Whats going on?

  35. casino en ligne net…

    Cher baccarat online web casino jack black strategien gioco online casino games…

  36. Ashley says:

    Thanks for great instructions. They were so easy to follow. Cheers!

  37. Hi your tutorial on how to install Google Analytics is clear but my template is bluebusiness and I cannot seem to update the footer.php file – can you tell me where else i can install the code on this template please? Thanks

  38. james says:

    Thanks for the instructions on how to install Google analytics on WordPress.
    It is a breeze with your instructions. Perfect !

    James Hau

  39. Erica says:

    I read and appreciate your instructions, which seem clear enough. I am not successful though…yet. Is there something I’m missing? Don’t have a footer. After putting it in a side widget, the script erases, b/c java script is not allowed. Did I miss something?

  40. DJ says:

    Thanks for this! It worked perfectly and I really appreciate it.

  41. Julie says:

    Thanks for the help – in understandable language. Only thing I struggled with was finding presentation on my dashboard – on mine I had to use design. It was easy up to then and I easily installed it once I’d worked this out, I’m now up and running.

  42. Riche says:

    Thanks for the valuable information. I already used it in my website. http://PhilippinesDailyPhotos.com

  43. Thanks for posting this. I recently changed wordpress themes and could not remember where to put the code. I definitely appreciate it.

  44. [...] I won’t go into detail with how to install Google Analytics on your blog but you can find information on to do that here. [...]

  45. [...] I won’t go into detail with how to install Google Analytics on your blog but you can find information on to do that here. [...]

  46. Thanks! I had some trouble locating “Presentation”, but I read above in the comments about looking under “Design”, and I found what I needed.

    Thanks for these… Great instructions!

  47. Codru says:

    hi,
    unfortunately, after I paste the code in the footer, I have no option to save or update what i’ve just done. it actaully says right there mocking me: “If this file were writable you could edit it”.my theme is caled greening if that counts for anything. do you have any advise for me? i’m such a newbe.
    thanks.

  48. Brian says:

    wow thanks for the easy instructions, tracking my new wordpress site is easier than ever!

  49. I’ve checked out the footer.php file for two different themes I’m using on two different blogs. Both (unexplainably) don’t have a tag. Just a closing tag.

    But my question is, why not just put the code in header.php instead of footer.php?

  50. julie says:

    hey thats great! I was searching this and found your website. After reading all the article, I have successfully installed Google analytic over my wordpress blog. Thanks.

    ——————-
    link building service

  51. ooopinionsss says:

    How you think when the economic crisis will end? I wish to make statistics of independent opinions!

  52. Hey Ryan – Thanks for help on the analytics placement. I was able to get my blogs set up with no problems. You Rock!

    Guitar Hero Union

  53. Allen says:

    OMG..it was hilariously simple..LOL is anyone still has problems after reading this article!!!

  54. Scott says:

    Hello and thank you for the great instructions. The comments are a worthy read as well! I installed the google analytics tracking code to my footer.php at my website, but I am now interested in the code to avoid tracking admin hits on the site. This would really help to make my stat tracking data more reliable. I know I have seen that code floating around somewhere… but where?

    1. nicole says:

      You should be able to set up a filter in GA to exclude any hits from your IP address.

  55. i’m fairly new to blogging and i’m at a lost among all the codes.

    i was trying to paste the google analytic codes to the footer.php just like you said but changes can only be made if i make the page rewritable. When I checked the codex blah blah i really think its such a hassle,i might get lost the more,please help.

    is there a way to do it without all the hassles?

  56. SteveB says:

    I like to track clicks on links on the page, I don’t think you will get that pasting to footer directly. Also, to Scott above.. To stop admin hits in Google Analytics, create a filter (in analytics) that will ignore your ip.

    Steve

  57. Tizmanian says:

    Perfect instructions! Thanks dude.

  58. Ronin says:

    Im new to GA and need to a reference for installing it on WP.

    Great and thanks for posting.

  59. Hi thanks for the step by step method of putting this to work

    Thanks again

    Danny

  60. Hi Ryan thank you for this advise. But I just updated the Word Press Blog and this is the latest, I think 2.71 , would your way of doing code installation work for the latest version?
    thanks
    Michael.

    1. Ryan Imel says:

      Hey Michael, thanks for reading. Despite the update in WP since this was written, it should absolutely work with 2.7. I’ve used a method like this for every version of WordPress since 2.0.

      You can also try putting the Analytics code into a sidebar widget, which might be slightly easier than digging into the theme.

  61. Joanne says:

    Hi Ryan,
    We have a wordpress blog for our business. The blog stats are really limited and I can’t really get the kind of tracking info I need. I saw your article about how to install Google analytics on your wordpress blog and thought I’d try it, but I’m not seeing a Theme Editor>footer.php option. This is the link to our blog:
    http://soundviewsummary.wordpress.com/
    I’m not sure if the version we’re using even has editing area this available. Hope you can help! Thanks.

  62. Dear Ryan,

    I am unable to find Presentation > Theme Editor > footer.php in my theme which is Vigilance. Can you help me, or must I change theme in order to apply GAnalytics?

    Thanks
    Carlo
    awakr.wordpress.com

  63. Pat Alb says:

    Hey Ryan, I thought I was saved from the tech world when I saw this nice info but I think I have a diff setup. I followed your instructions and went to dashboard, appearance, themes & editor and landed on Stylesheet (sheet,css).
    Do you have any suggestions how I can add the google analytics and adsense codes into my wordpress? Thanks in advance, i think you’ll do very well on this site!! G.L. – Pat

  64. Ryan, thank you for taking out the time to create this tutorial.

    We are using WordPress 2.7.1 and our blog lives on a subdomain.

    Right now the Google Analytics and Quantcast code is on the main page of the blog. If you click through to the URL with the entire post, the tracking codes are not included on the pages with the individual posts. Any help will be appreciated.

    Thank you for your time.

    1. Ryan Imel says:

      Hey Scott, hope I can help. If you place the Analytics code into a new text widget that is on a sidebar that is on every page of your site, that should fix your problem.

      If that doesn’t sound right for you, then give me a ring on the contact form, and maybe getting some more specifics on your situation I can help better.

  65. Hi Ryan, great tutorial – I’m always on the lookout for WordPress sites.

    @Pat Alb – When you click on the Editor, the stylesheet is typically the first file you land on. Over on the right you should see a list of files, one of them should be your footer.php file. Click on that, paste in your code, and click “Update.”

    @Joanne – Log into WordPress and you should arrive on your Dashboard. Over on the left you should see a menu called “Appearance”, click that, then click “Editor”. From there, follow what I mentioned to Pat just above your comment.

    1. Ryan Imel says:

      Hey John, thanks for helping out here. I’ve been meaning to update this tutorial with a screencast, but won’t have time for that until next week. Can’t ask for more than one commenter helping another, though :)

  66. We’re all here to help each other. I know what you mean about time – there’s never enough.

    1. Ryan Imel says:

      Definitely. Just let me know if there is anything I can do for you, John!

  67. foodie says:

    Thanks for the tut dude. It went off without a hitch except for the difference in menu options with the new wordpress version. Fortunately I’m familiar enough with the interface that I figured it out before seeing the comments. Now to wait 24 hours and see if it worked…

    I really appreciate the time you took to post this.

  68. Steven Vilendrer says:

    Please help! I’m trying to install the analytics tracker but the website pages have no tag anywhere. I’m working with PHP code in Dreamweaver and trying to install this for my boss. Could someone please help? Thanks.

    1. foodie says:

      Please be more specific, so we can help you.

  69. Steven Vilendrer says:

    that is no tag anywhere.

  70. Steven Vilendrer says:

    “body” tag, written with the arrow point out on each side and the slash before. this blog keeps cutting out code.

  71. Raul says:

    Thanks for the easy tutorial, unfortunately it’s not working for me. I’ve pasted the new google analytics code immediately about the in footer.php. I can see by “view source” that the code is there, but Google does not see my tracking as being installed.

    Any ideas, and thanks!

    1. Raul says:

      Fixed…

      Well, I seem to have resolved it. Google provides this code:

      try {
      var pageTracker = _gat._getTracker(“whatever”);
      pageTracker._trackPageview();
      } catch(err) {}

      but in the help refers to the same code without the error trapping. I removed the try / catch bits and it’s hooked up now. Off to tell google, I guess.

  72. M Rahman says:

    Thank you so much . It is a very useful tips. But I just updated the Word Press Blog and this is the latest, I think 2.71 , would your way of doing code installation work for the latest version?I really appreciate the time you took to post this.

  73. [...] This is an easy instructional pdf for adding code in your footer.php file above your tag. Once the code is installed, you can access important reports regarding your website, i.e. Visitors’, Conversion and Keyword Reports to mention a few. Click for tutorial. [...]

  74. Hi:

    I am using chaostheory and cannot figure out how to add the google analytics to the footer. Thanks for you help.

    Tom

  75. I am using Chaostheory theme and cannot figure out where to past the text from google analytics. On appearance-theme i cannot find footer!

    Thanks,

    Tom B.

    1. Raul says:

      You could always grab the file from your server (SCP or FTP), edit it manually and restore it. Or, if your provider allows shell access, just manually edit on the server with, say nano (or if you are Linux guy, vi, but I’m not sure you would have asked in that case).

      Good luck.

  76. THAN YOU FOR THIS! This has been a problem for me and your instructions are great. This fixed the problem I was having getting my Google Analytics stats. Now I will finally be able to run my reports.
    Catherine

  77. yes you can also do like this

    Adding Google Analytics to WordPress blog (for newbies)

    http://codeforfuture.com/2009/03/13/adding-google-analytics-to-wordpress-blog-for-new-bies/

  78. Justyn says:

    I like your post about Google Analytics, but what was it about the official WordPress Stats plugin that “didn’t work”?

    I have been using it for about a year or two on my blog and hasn’t failed me yet, I’ve never seen the reason to switch.

    You said in regards to WordPress stats plugin “I would still suggest ditching the plugin because it isn’t locally hosted.” but isn’t Google Analytics hosted by Google, or is it run locally on your server?

  79. Bunny Smedley says:

    I have a WordPress blog, using the PressRow theme, and am trying to add Google Analytics. Your instructions look admirably simple, but when I browse to ‘presentation’ in my Dashboard I can’t find ‘theme editor’ anywhere.

    Sorry if this is a really silly question, but can you please help me figure out where the code goes, using PressRow (you gave it a good review so I assume it doesn’t somehow block Google Analytics?)

    Thanks!

  80. Sid says:

    Hey man thanx for the great advice.

    The thing is, I don’t have any theme editor in my dashboard. So ‘im wandering if the problem is my theme that doesn’t allow me to play in the editor. Do you have any suggestions??

    thank you very much

  81. Hey, i get this message on the bottom of my site

    T_CONSTANT_ENCAPSED_STRING in /home/content/j/a/b/jabaez02/html/wp-content/themes/german-newspaper/footer.php on line 60

    what the hell is it? How can i fix it?

    Thank you..

  82. Pat says:

    Thanks, very simple and easy to follow instructions. really helpful.

  83. Dan Irwin says:

    I am brand new to coding and wp. When I go to my footer.php template, there is no code…just hundreds of lines of gobbledy-gook running together (theme is travel 3). I added the code after this, then added:

    But GA is not seeing it. There is no other real code on the page, except <? at the top.

    Can you help?

  84. My footer has no recognizable code…just hundreds of lines of gobbledy gook. No php anywhere to be seen. I added the code to the bottom of this, but it had no effect. GA is still looking for me.

    Any suggestions?

  85. @Dan Irwin – looks like you got it. I went to your site and can see the code at the bottom when I view your source code.

    @Topangadan – you appear to be the same person as Dan? See my reply to him above. ;)

  86. Apoc says:

    Really useful post. Thanks!

  87. ximi says:

    hi, ryan…
    I have put the script on my pages, it works. It’s a great tool frm google. I also installed Google Analytics Dashboard plugin into my wordpress. I have put correct email and password, but it doesn’t work. It can not “connect” to google.
    Do you have any idea?
    thanks

  88. Nail says:

    Thanks for the instructions, it really helped, additionally I would like to know if anyone can answer that: Is there a way to filter admin hits if I am not using static ip.

    Thanks.

  89. Nail
    Even though you’re on a dynamic IP, it probably will rarely change. Go ahead and set up Google Analytics to filter your IP and if your IP ever changes, just do a quick IP change.

    1. Nail says:

      Hmm, maybe I should change my ip info in Google Analtyics, before I start working on my site each time.

      Thanks a lot.

    2. Joel Ryan says:

      John, I’ve read your comments on Ryan Imei’s post concerning google analytics. You seem to be very knowledgeable. I am new to wordpress, and I am only dabbling to help a friend’s post. While trying to load GA, I only get an option to edit css. There is nothing to the right of it as mentioned. Every suggestion made in the post does not help me. Someone mentioned using a text box. Would that have to go on every page? Will the text show on the site? I’d like to install this as clean as possible but I’m having tremendous difficulty getting around the lack of a theme editor option. Could you please advise? What started as a favor is turning into a hassle.

  90. Sarah W says:

    So I followed the instructions and pasted the code in the footer php section right before the body text but when I hit update file the changes dont show up/remain in the code. The analytics setting page has a tracking unknown signal and the view source code on the blog doesnt reflect the new analytics code either. Did I do something wrong? I’ve tried several times now, is that just making it worse? Please help!

  91. [...] this tracks all hits on your website. There’s a nice article on exactly what to do over at ThemePlayground.com. It cleared things up for me as I previously thought I needed to put the Google Analytics code in a [...]

  92. Russ Wood says:

    Thanks for the guide, Ryan.

    I’ve put the analytics code into a text widget on my side bar and it seems to be doing the trick.

    1. Ryan Imel says:

      Glad you found it useful, Russ.

  93. Awesome, thanks for making it so easy to add that to my new blog! :-)

  94. Richard says:

    Thanks for the detailed instructions. However, I am using the theme “Black Circle” and when I view footer.php there is just a series of numbers and letters ( basically cr*p) – when I select a classic theme from WP , the correct code can be identified. Any ideas ?

  95. Hi Ryan, thank you for the useful tutorial. I forgot putting Google analytics code in my blog so it is not recorded in the analytics. But, unfortunately I don’t find the menu of Presentation. I use the version 2.7 Would you show me where it is ? Thank you again for the information you share.

  96. Elliott says:

    I’m using the Vigilance theme. When I go to the dashboard, I can’t seem to find the “footer.php” link to paste the code in.

    Can you help me?

  97. Hi Ryan thanks for the advice, I’m using Press Row on WordPress and I can’t find my footer.php. I tried adding a text widget with the code for Google Analytics, but it just showed up as code on preview. Any suggestions?

  98. Thank you so much for creating this tutorial.

    Your post is easy to read and concise.

    With your tutorial, I was able to easily add the Google Analytic tracker to my blog.

  99. Howdy,

    Just wanted to drop you a line and thank you for a great post. Yes – it’s may not be the only one “out there” about how to add GA to a footer.php file – but it’s great that you’ve taken the time to write it – and even added screenshots to it.
    Hope you get lots of traffic from it as a result!
    Cheers,

    Guacira

  100. Grazina says:

    Hi from the Land Down Under
    Ryan thank you so much for easy to follow and clear instructions. Done in two minutes! :-)
    GA

  101. Thanks for this. I was following the directions from Goggle and they were telling me put it in the index.php file. Seems to work now that I stuck it in the footer. Thanks again. Good instructions.

  102. Paul says:

    That was great, I used this to install GA on my blog (swine flu haha). thanks!

  103. Hazel says:

    VERY helpful post, thanks for taking time to share ;)

  104. Thanks for your useful post

  105. Shonda says:

    Thanks a ton for the easy to follow directions! I appreciate all of you open tech bloggers.

  106. Thank you for this post. Really helping me.

  107. Corinna says:

    I am using WordPress and my Dashboard has an Appearance menu but then the options under it are Widgets | Extras | Colour Options | Typekit Fonts | Edit CSS. None of these seem to work to get able to post the code from Google Analytics. I tried adding a new text widget into the Andreas theme but it just showed the text of the Google code.

  108. Thank you so much for this. This is exactly what I needed, step-by-step instructions!

  109. Michelle says:

    Thank you so much for the easy instructions!

  110. I’m having difficulty in figuring out how to paste the code into my WordPress blog – I’m using Andreas09 as my theme. Any suggestions?
    Many thanks
    John

  111. Andrew G. says:

    Hi Ryan, I hope you’re still checking this. I have a wordpress blog running the Vigilance theme. I’ve tried copying both the new tracking code and the legacy tracking code into a sidebar text widget.

    No luck.

    It’ll paste, and then on saving, it’ll delete all the ‘code’ parts of the text rendering it useless.

    Any suggestions?

  112. Adding to the “Thanks” for these instructions.
    I’m having a problem mentioned in the discussion but not finding a solution . . . My footer.php does not seem to have a body. Begins:
    “”
    Advice?
    Thanks!

  113. Sarah says:

    Thanks for the great instructions!

  114. Thank you so much Ryan! I am absolutely not a programmer and these instructions were straightforward and extremely easy to follow. The humor made the article actually entertaining – and will have me come back to your site for future technical help. Thank you so much!

  115. Jenny says:

    I don’t see footer.php. I’m using this theme: Ambiru by Phu Ly. Can you please suggest how else to do it?

    Thank you!

  116. Brilliant clear instructions – thank you. Being a newbie to programming my own wordpress blog, this was easy to follow. Your site will definitely be bookmarked. Now to work out how to make my gravatar appear in the tab at the top of the page. :-)

  117. Hello, I login to my WordPress blog at http://www.wordpress.COM, rather than http://www.wordpress.ORG. I’ve read all over the internet that if you’re using a .com wordpress account, then you can’t use Analytics. My blog is NOT self-hosted (it’s hosted through wordpress, domain is through GoDaddy). I do not have the option to edit my template and when I tried the other option of pasting the code into a Text Widget, the text shows up on the blog, which I don’t like. Is there a way to make it hidden? Please help!

  118. I am not able to figure out where to place my analytics code. I was able to do it in blogger easily but haven’t figured it out with word press yet.
    Thanks,
    Jared

  119. Tracy K says:

    Hello, I am using WP theme Blass and I can’t find a body tag in my footer.php. Can you help? I’d thought I’d updated with the UA code, but analytics is only tracking the old archived site.
    Thanks much for your help!

  120. Morgan says:

    Is anyone familiar with the Ultimate Google Analytics plugin for wordpress? Does anyone know if it works or how long it takes for google analytics to recognize that you have added the correct code? Thanks.

  121. I have the exact same problem as Corinna mentioned. Can you please help me how to find the place where i should put my code? I managed to do it on blogger but not wordpress.

    Thanks Lisa. :)

  122. Hello!

    I have the exact same problem as Corinna mentioned earlier and I tried the text widget thing too. I really don’t know where I should paste my code. I hope you can tell me where I can put my code.
    Thanks a lot, Lisa.

  123. Umar says:

    Thanx Man. Thanx a lot for such a helpful article

  124. Carla says:

    Thanks so much! I always forget which file it goes in!

  125. Thank you so much. I’ve been trying to install this forever. I finally figured out where to put the code thanks to you. I really appreciate your help.

  126. michel says:

    how do i track a site with my tracking id?

  127. This is old now I think. I think you have to put it into the header now, not the footer

  128. Avenir says:

    It Allows usage of custom variables in Google Analytics to track meta data on pages. Thanks for your support will try soon.

  129. Justin says:

    Thanks for sharing this, you explained how to add the code very easily here.

  130. Ashok says:

    I put code as per your instruction & now i am able to track my website.. Thank you.. Ryan

  131. Justin says:

    Hi

    My wordpress theme (gear) has a foot.php file but there is no end body tag…maybe the way it is written. What do I do to add the code? Here is a link to my footer.php file from pastebin.com: http://pastebin.com/DwRzKtgB

Leave a Reply

Please note that WPCandy is a moderated community.

 

Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>