
[This post is part of the Ultimate Guide to Launching a WordPress-Powered Blog series. Check out the rest here!]
Setting up your website analytics for your blog is a critical step in taking your efforts as a blogger to the next level. For many, especially those that are just starting out, installing an analytics package like Google Analytics can be a daunting task!
[A much easier one is one of the plugins mentioned here on my list of analytics apps that I use.]
For those that have done it a million and a half times it’s like drinking water but remember when it was your first time? Yikes!
So, I’ve created a quick visual guide to setting it up and installing it on a simple site as well as in a WordPress Theme. Ready to get started?
[You can click all of the images for a larger view!]
1. Visit Google Analytics Home Page
Visit Google Analytics homepage right here.
2. Sign In to Google Analytics
If you need to create a Google Account you should do it at this time.
3. Sign Up for Google Analytics
If you are new then you’ll have to now “Sign Up” to start using the service.
4. Setup a New Account to Track
As you can see I’m setting up a new site called “Standard Tumble” which will be the new site for a new WordPress Theme to be released this coming year. I inserted the URL (http://standardtumble.com) and called the account “StandardTumble.” I set the country to United States and the Time Zone to “Eastern.”
5. Fill in Contact Information
6. Accept User Agreement
7. Get the Analytics Code
This is the next screen you’ll see. You’ll want to highlight all of the code in the box and “copy” it from here and paste it into your site (or your blog’s header file).
As it mentions, you’ll want to put this just before the </head> tag in the file.
8a. Paste Code Into Site
This is where it might get a bit tricky, especially for a new blogger. As you can see, I have an index.html file that I’m going to put the code into to start tracking the site traffic.
In the following screen I’ve pasted the code that I received from Google just before the </head> line:
After I do this I save the changes to the file.
8b. Paste Code into WordPress
If you have a WordPress blog you’ll want to paste the code into your WordPress Theme’s header.php file. You first do this by clicking “Editor” under the “Appearance” tab on the left as seen above.
Next, you’ll want to find the header.php file and click that. I’m using the “TwentyTen” Theme (which comes with WordPress) as the example here:
And now I’ve inserted the code right above that </head> line:
Hit “Update File” and you’ll be set!
9. Check For Installation Success
Above you’ll see that it says that “Tracking Not Installed” yet. You’ll want the screen to look like this instead:
As you can see it’s now “Waiting for Data” and will start pulling information!
On the dashboard, you’ll also see this icon change as well when it’s working:
Above it’s “Not Working” and below it’s been successfully installed:
10. Visit Dashboard and Check Stats
After you install it the dashboard will look like this above with no data. It takes Google 24 hours to pull the data and start reporting, so check back the next day!
You should be setup now and ready to take over the world!
Let me know if you have any questions and/or have issues getting Google Analytics installed!
[This post is part of the Ultimate Guide to Launching a WordPress-Powered Blog series. Check out the rest here!]






What a great post! Thanks John!
sure thing dude! funny gravatar!
Awesome info! I finally got my wordpress blog set up, so I’m anxious to get analytics going!
And this is unrelated, but since I know you’re a theme expert, how difficult is it to create a white background for content ala Simple Fly Creative’s site? I’m familiar with CSS in that I can update colors and minor cosmetic things, but that’s as far as my knowledge goes. I’m just curious if there any tutorials or anything that I can look into.
Thanks!
do you have a support license? we’d be able to give you some great tips (and more help than just backgrounds) there. lifetime updates are awesome too… we’re releasing 2.5 very soon…..
oh, and i might as well say that I’m not sure what you mean by this question….? simplefly has a white background to their content…?
I do have a support license. I’ve asked around in the forums about it, and they said I may need to get a designer’s help. What I basically mean is that Simple Fly’s website has a gray background, and then white space behind the posts and the sidebar. The header and navigation are also encased within that white space. Does that make any sense? I don’t speak CSS fluently, lol…yet…
I can help! Just sent you an email.
sweet! love it!
yup! hopefully craig can give you some help!
Couldn’t follow these steps for wordpress as the Editor button wasn’t an option.
ah, you are on wordpress.com…! this is only available for wordpress.org (self-hosted) installations!
John, your work is delightful. Thanks for being so friendly any humorous. Also for your light and winsome approach to the Lord. I just got G.A. working on my blog, so I appreciate the help there. Instead of step 7, I just went to the “add plug-ins” menu, searched on “Google Analytics” and took the first offering. Seems to have worked well.
that works as well! the reason I opted not to do the plugin route is two-fold: first, i want people to get closer to the “code”… by doing so they will become better users of wordpress which will result in better blogging. two, plugins can bloat your blog and slow it down. rather have you do a small amount of “lifting” now instead of making every visitor do it when they load your blog! minimize plugins!
John, this isn’t related to GA, but has to do with a Google application. I have installed the widget that posts my subscribers plus Twitter followers on the front page of my blog. However, it only shows my followers and not my Feedburner subscribers. I only have a few subscribers on Feedburner. I followed the install and setup instructions, but can’t seem to get it to pull that number. Is there a better way to know how many subscribers I have?
i’m sorry. what does it look like in the admin?
http://www.randykinnick.com/wp-content/uploads/2011/01/Follower-Count.png
Feedburner name: http://www.randykinnick.com/?feed=rss2
feedburner name is just hte name at the end, not the full link.
Still doesn’t work. I’ll check out the Standard Theme Forum.
hmm.
Hey John.
I get dramatically different results from Google Analytics and Statpress. Do you know why that might be?
Signed – just another happy StandardTheme/SoChurch guy
sweet! thanks for using sochurch!
statpress is wp-stats plugin?
Sure thing!
This is the plugin: http://wordpress.org/extend/plugins/statpress/
wow. the last update to that was last year…! i wouldn’t use that plugin.
Hmm. Good point. Hadn’t checked on it in some time.
Thanks a lot John! I was trying to make this stuff work, now I did!!!! Woot Woot!
Cheers,
B.
http://www.pinkbubu.com
Just installed on new blog project. Seamless instructions. Thank you for the WordPress editor steps!
sweet! where is it?
Added this to my new blog last week. Very helpful!! Thanks for the post!
sure thing chuck!
Lovely step by step and great use of screen shots! Nice to see you using coda also, great program! I will certainly pass this on, thanks!
sure thing! i enjoy coda, that’s for sure.
John,
Thanks for this great guide and the other useful content you put out. I am actually using a modified version of your Ipseity theme as my personal landing page, thanks for the theme.
I have a question regarding GA. I have installed both the code and used the wordpress Google Analytics plugin in the past.
It would appear that the code is tracking when I as an admin visit the site. How do I stop it from doing that?
Any help you could provide would be appreciated. Thanks!
sure thing tyler!
i honestly don’t use plugins like that. just do it manually and save yourself the trouble!
How important is step 8a? I did step 8b no problem. Also, if I change my wordpress theme, do I also need to copy and paste the code in again? Still a newbie.
patrick,
8a was just referring to a general “site” and 8b was referring to wordpress.
Thank you!
Hi John,
I followed your instructions for adding GA to my site and it worked great! However, I changed the title of my blog and now GA has stopped tracking. What do I do to fix this?
title of your blog? or domain name?
I just installed analytics on my new standard theme based blog.
I see from the comments that you don’t like the Google Analytics plugin which enters the analytics code automatically in the header.
However, for anyone not using the AWESOME Standard theme and who might be changing their theme from time to time, the plugin is great. You don’t have to remember to keep putting the analytics code in the header.
I use the Google Analytics for WordPress plugin by Joost de Valk.
yes, that plugin is great!
Thanks John. I have probably read ten post today by you as I try to get things set up on the blog. I plan to move my current blog to Standard Theme and have everything up and running by Monday. Hopefully I am successful.
There seems to be a lot of mixed information on correct placement of the GA code snippet. You say to place the code in the head tag, but Google says to place it just before the closing body tag (http://code.google.com/apis/analytics/docs/tracking/gaTrackingOverview.html#trackingCodePlacement)
Appears most WP plugins place it inside the head tag as well. I’ve been using Yoast’s plugin and he states to put it in the head tag because of the async feature (http://yoast.com/wordpress/google-analytics/manual-placement/).
I plan on switching from using this plugin to just manually placing it. However, seems like we should follow Google’s advice if we are not using a plugin right?
yeah, but that’s just the “traditional” placement. you want to use asynchronous which is in the header.
Ah cool, found this article as well, comparing the difference. http://www.techzene.com/analytics/google-analytics-code-placement/
Thanks!
another great article, thank you very much John!
your site has been a treasure trove for setting up my new site!
aw, thanks rick! feel free to share it with others!
All I can say is thank you so much for this great information. I appreciated the details to get the code in correctly with ease to not create any errors.
I find it wonderful that you took the time to use graphics for those of us not familiar with such processes as well.
I shall be back to learn more.
Many thanks and smiles your way,
Mira Faraday
of course! enjoy! make sure to get a gravatar: http://tentblogger.com/gravatar/
John, I pasted the Google Analytics code into the “Google Tracking Code” section of Standard Theme. Do I need to ALSO paste the code into the ‘WordPress Editor’ (as well as into Standard Theme)? Thanks for everything John. There is NO way I could be creating such a high-end Kingdom focused blog except for the incredible teaching/information you provide. -Eternally grateful, Barry
no. do not put it in the editor if you’ve got standard theme!
and thanks for being a part of this community barry!
Many thanks for the tips, especially for WordPress installation. The stats for Jetpack are fine, but I like seeing Google Analytics ‘global’ picture, especially since I live abroad and I’m used to the Blogger interface.
good stuff. definitely love me some google analytics!
My google analytics was giving me numbers that were 1/3 less than the WP stats from my WP dashboard. I originally put the google code lower down in my header file and today moved it to where you recommend, under the tag.
Do you think this will fix the problem?
I worked out the wp dashboard thing…I’ve got it thanks…
great!
Thanks so much this sharing this information, we are a new church and trying to become web-savvy. Is there a way to block your own IP address from the stats so I don’t always see myself going to the site?
Thanks!
yup!
http://support.google.com/googleanalytics/bin/answer.py?hl=en&answer=55481
Once again, everything I need is right here. Tentblogger makes life better!