How to Install Google Analytics

Once your site is set up, it’s helpful to track your visitors to see who’s visiting, from where they are visiting, how many are visiting, how long they are staying, which pages they are visiting, etc.

This information, commonly called your “stats,” is highly valuable and will help you maximize your blogging efforts.

Not only will it provide you the opportunity to better connect with your visitors, this is information advertisers and potential advertisers will definitely want to know.

There are several stat tracking options but the most popular is Google Analytics. I personally use it, as do most bloggers.

To use Google Analytics, you must have a Google Account

A Google Account gives you access to all of Google’s products like Gmail, Google Calendar, etc. So, if you don’t already have a Google Account, get one here. The process is pretty straightforward.

How to Get Started with Google Analytics

Go to Google Analytics and click the link in the top right to start. (They change the wording from time to time, so what you see in these images may not be identical to what you see on your screen.)

google analytics sign in

If you’re not logged into your Google Account, you will be prompted to do so.

Once you’re all signed up and signed in, set up your web property. Click the “Admin” link at the top of the screen. Under “Account” click the dropdown menu and choose “Create new account.” It’ll look something like this:

analytics add screen

Make sure the “Web Site” tab at the top of the screen is selected (unless of course you are adding an app but if you’re reading this, that’s highly unlikely).

Next, under “Setting up your web property” enter the appropriate information. Pretty straightforward.

The “Account Name” is basically a way of organizing all the sites you will track within Analytics. For some people with a ton of sites to track, this is helpful, but for us, it would be sufficient to use your name, your blog name or whatever you like.

(I leave the Data Sharing Settings checked typically, but it does give Google access to your info so you might want to click the little question mark next to “Data Sharing Settings” for more info.)

Click the blue “Get Tracking ID” button.

You’ll need to accept the Google Analytics Terms of Service.

Note your “Tracking Info.” (You can access this tab at any time by logging into your Analytics account –> Admin –> Account List –> selecting the Account name you chose in the last step in the menu –> selecting the name of the Web Property from the list –> clicking on “Tracking Info”)

Also note “Status: Tracking Not Installed” at the top of your screen. That’s because we now have to take that snippet of code in the box there and paste it into our site. Once it is installed correctly, that status will change to “Status: Receiving Data.”

How to install the tracking code in your site

First, select the entire snippet of tracking code. We want to paste this code just before the closing < /head > tag.

This is where using a Genesis (or Elegant Themes) theme is super nice because they make it easy.

Installing tracking code in Genesis

From your Dashboard, go to Genesis (in left column) –> Theme Settings.

Scroll down until you see the “Header and Footer Scripts” box like so:

analytics tracking code genesis

Paste your tracking code into the top box. (If you already have code in here, paste the Analytics code at the bottom.)

Don’t forget to save!

Installing tracking code in Elegant Themes

From your Dashboard, go to Appearance (in left column) –> [Theme Name] Theme Options.

In your epanel, click “Integration” –> Enable Header Code. Paste the code in the “Add code to the < head > of your blog” box at the end, per Google’s instructions.

elegant themes tracking

Don’t forget to save!

Installing tracking code in Twenty Eleven or Twenty Twelve

(I recommend you back up your blog before you do this as you will be working in the sensitive files of your site.)

From your Dashboard, go to Appearance (in left colum) –> Editor.

In the right column, click on “Header” under “Templates.” This is your header.php file.

In the main window, you’ll see a whole bunch of code. Being very, very careful not to erase or edit anything, find the < / head > tag. Place your cursor immediately in front of it and press enter to create an open line just before the  closing < / head > tag.

On the blank line you just created, paste your Analytics code.

Don’t forget to save by clicking the “Update File” button.

How to make sure your Google Analytics tracking code is installed properly

Log back into your Analytics account.

Click the “Admin” tab.

Select the appropriate account and web property.

Click the “Tracking Info” link.

If you see “Status: Receiving Data” at the top, you’re good. If you see “Status: Tracking Not Installed” or something similar, here are a few things you can do:

  • Wait a minute or two. It shouldn’t take longer than a few minutes to start tracking, so if you still don’t see that it’s tracking after a few minutes, move on to the next step.
  • Complete the process again making sure you are copying and pasting the entire snippet of code. Make sure you save after pasting!
  • If those don’t work, log out of Analytics and log back in. You never know if that’ll do the trick…
  • Check the Google Analytics Help section and these common issues.

How to install Google Analytics with a plugin

I much prefer the above steps to install Google Analytics as I’m not a fan of unnecessary plugins. But if you’re desperate, you might consider a plugin. Use my instructions in How to Install Plugins for more. You would simply search for “Google Analytics” and choose a highly-rated, up-t0-date plugin.

How to view your stats

Data updates every 24 hours so you will have to wait that long to see your most recent stats.

  1. Login to Google Analytics.
  2. From your Account Home, click the account under which your your web property (website) is contained.
  3. Click on your website name.
  4. Your Account Overview will appear. Navigate the menu on the left to pull out more specific bits of information. For example, your Overview will give you an idea of your basic traffic levels. Your Traffic Sources will tell you where traffic is coming from, etc.

The interface changes frequently, so if it looks differently than it does here, check the Google Analytics Getting Started section.

Become familiar with SEO and some traffic tips if you aren’t already.

Share on Google+Tweet about this on TwitterPin on PinterestShare on FacebookBuffer this pageShare on LinkedIn

P.S. Got information overload?

I can help. I wade through the internet, find the best stuff and put it in a short weekly email called the Useletter®. It's free. Sign up & I'll send you a sample...


  1. says

    Was glad to find this site again – the instructions for finding the google analytics code again was what I needed! I remember putting this into 2012 before, but I apparently forgot about it when WordPress updated. I wanted to let you know I found out about a cool plug in called Insert headers and footers by iamdbpegg I put the info in there (and I think I had to empty the page cache because I have W3 total Cache installed.) Then I didn’t have to go into the code. I *think* that might also mean that the change won’t disappear with a WordPress update.

    (P.S. For me, the images in this post appear to have broken links.)

  2. says

    Thanks your tips,
    I did it step by step for my Metro Pro theme , but it don’t work. The status of Google Analytics always the code not installed. Please help me fix it.

  3. says

    Hi Amy,
    I have a question and I have searched (and searched) for this answer. I wish I could ask analytics directly, but can’t find an email. I just started my blog not too long ago and have installed analytics almost from the beginning. Seemed to work great. However, when I get to a certain number of total pageviews, I cheer because it is a good number. Few days later, it says I have 100 less. So I build back up to that number. Cheer again. Then a few days later, it says I have around 100 less. Today I checked, it says I have 3 less than yesterday, however the daily stats says I grew considerably.
    Any ideas at all?

  4. wendy says

    Hi, i have the themeforest theme and actually they provide insert tracking code column but when i checked on my google analytics, the status is “tracking installed’ but i dont have any visitor in my report even i tried to visit my own website,
    In other hand, my other website got “Receiving Data” statuus and it has visitor report,
    What is different between receiving data and tracking installed ?

  5. says

    Thanks for the great post Amy – it helped me install Google tracking on the Woothemes Canvas theme. If anyone else needs to know, go to Canvas Theme Options->General Settings->Quick Start and enter the tracking code in the “Tracking Code” box.



  6. says

    The cool thing now is that, you can see if you’ve installed it correctly by visting the website you installed it on and then going to Google Analytics and clicking “Real Time”. If you see yourself on, you’re gold!

  7. says

    Hi Amy,

    I have the google analytics code already pasted over the tag on my wordpress blog. But I read how Yoast’s google analytics plugin provides custom variables. Can these variables be added without any plugin?

    Thanks for this great post!

  8. says

    Hi Amy,
    Before doing a search for ‘genesis framework how to install google analytics code’ I never knew your site existed! Thank you so much for the detailed explanation and overview – it’s a rarity for me to find what I’m looking for on the first click after doing a search. What a great way to end a hard day’s work. Thank you!

  9. says

    Great blog post.
    QQ: Am I the only guy here? I have the feeling that everyone reading your blog is a woman. Kinda cool experience I had on your blog, and BTW is my first time here, and I came through Google, just letting u know! 😉

  10. says

    Thanks for that Amy, it’s really helpful to refer to as a Genesis user, particulary the part about where to paste the code. Your blog came up when I did this Google search:
    “how do you add tracking code to Genesis home page”.

  11. says

    Thanks, Amy for this post. I know how to install the analytics and thought I did it wrong. It helped that you mentioned that it takes 12-24 hours for it to show any stats. Thanks for it; saved a lot of worrying.

  12. says

    Hi Amy, I was wondering, I just changed my account to a .com. I know it re-directs but do I need to make some changes on my analytics account??? If you know, I’d LOVE to get an answer…..I’ve tried googling it but I’m not getting direct answers??


  13. says


    Thanks so much for your helpful and informative blog. I have been struggling with GOOGLE ANALYTICS for months trying to get it to work on my website without success. The instructions they give are written in programmer-eze and way over my head. With your info I got it working in minutes!!! Thanks again!!

  14. says

    Your site has been invaluable, Amy! I just installed Google Analytics on my brand new blog, but it wasn’t installing tracking when I entered the code in the Header box on my Elegant Themes epanel. Then I noticed the notation “(good for tracking codes such as google analytics)” in the “Add code to the ” box. I pasted the code there and voila, it worked!

    So I had to paste the tracking code in the body, not the header. I thought I’d make note of that, in case another newbie is experiencing the same confusion. Thanks again for all of your instruction!

  15. says

    Oh my gosh girl! You’ve done it again!!!!
    Thank you! Thank you! Thank you!
    I decided I needed to install GA and did fine until it told me to paste the code in to each of my pages. Um..what page? Where? I did a bit of Googling….but there was always an assumption made on the part of the writer…and I did not get it. I was eating dinner and I said to my husband…I need to check Blogging with Amy. You made it so easy. Thank you!!!!!!! {hugs}

  16. says

    Amy: 2 comments. In your very detailed (thank you) instructions of how to install Google Analytics you told me how to do this in my Word Press blog. I would also like to install this into my website but need instructions for that, please.

    Also, at the end of your blog you said, “Consider leaving a comment”. It would have helped me if this phrase were a link to this comment box as I had trouble finding out where to leave my comment. Thanks, from an “old guy” who doesn’t know much about computers and who relies on smart, young people like yourself.

  17. says

    Hi all,
    I recently installed GA and signed up with Adsense. I have found that both grossly undercount visitors and page views. My normal stats program separates out feeds and spider bots, so that is not it. I have done quite a bit of research on this and it seems to be a VERY widespread issue. In any case, I am about to dump both GA and Adsense as they are essentially a waste of time at this point. Anyone else here seen this problem?

  18. says

    Thanks so much, Amy! I needed to install GA for a new site on WordPress. Couldn’t find the right place to put the code…remembered you had talked about it. Searched your site and found this post. Just did the plugin and boy, was that easy. Thank you very much!!

  19. Morgan says

    Hi Amy,

    I am not finding the option to paste the tracking code into my theme. There just aren’t any HTML options available. I am using the Twenty-Eleven theme.

    Thanks, Morgan

    • Amy says

      Hi Morgan,

      If your site is a self-hosted WordPress site (as opposed to a site) you can try a plugin which would make it easier to do. I recommend Google Analytics for WordPress by Yoast which you can find by going to Dashboard –> Plugins –> Add New –> and then searching. Hope that helps!

  20. DP says

    My friend just referred me to your site, I am trying to start my own blog. Very useful information, thank you. I liked you on FB and you have a new RSS subscriber. Good stuff!!

  21. says

    Hi Amy,
    I have google analytics on my website, came with my template theme. Since I have a blog on my website, do I need to add google analytics to my blog also?

  22. says

    I’ve used your amazing site to start my own blog and am so excited! Thanks so much for all your great resources and instructions – I couldn’t have done it without you!

  23. says

    FYI – just thought I would share.

    I started to freak out because Google Analytics showed that I had ZERO visitors for the past 2 weeks! If my traffic numbers were higher, I would have looked into the problem sooner. I really thought no one was visiting my site. (Admittedly on some days, when I wasn’t promoting heavily I really did have zero visitors.) I was bummed.

    But I would promote my site (by commenting on other sites) and I was still getting zero visitors. Usually commending on other sites wasn’t driving huge traffic to my site, but I would get at least a couple of visitors.

    I checked and confirmed I wasn’t on Google’s blacklist. I checked the stats tools that came with my hosting plan, which were harder to read than Google Analytics, but showed I was getting some visitors. (I couldn’t tell which of these visitors were real humans vs. bots.) What was happening?

    Google Analytics was no longer installed on my site! I must have updated my site, and accidentally removed the tracking code. Maybe it happened when I changed themes.

    I tried to reinstall the code and I think that will solve my problem. But I will have to wait 24 hours for this to resolve itself.

    I share this embarrassing story in hopes it could help others. I was worrying that I may have been unintentionally spammy and gotten blacklisted by the internet community, and it turns out Google Analytics just wasn’t installed anymore!

  24. says

    This site have saved me so much learning curve time – thank you!

    I have some knowledge of code (basically I know enough HTML and CSS to tweak a site, but not enough to build one from scratch) and decided to paste the Google Analytics script in my footer. I’m using the Twenty Eleven Theme. My Google Analytics dashboard says Analytics is not installed. I see other people have had this problem, and it might resolve itself in 24 hours.

    I didn’t add the script to the footer widget, because I’m not sure why I would need to do both? If you were to test one method at a time, which one do you think would have the higher success rate – the footer.php file or the footer widget? If I install the script in the widget, would I use the Text/HTML widget?

    Thanks again!

  25. says

    I have found y our site SO very helpful as I am not verytech savvy when it comes to things oher than FB, email and online searches.

    I am following the instructions to install Google Analytics to my new WordPress blog (using a Thesis framework). I signed up with Google Analytics and copies and pasted the code into my dashboard. I then went back to Google Analytics to check the status and first off, I cannot find where to check the status. I logged in, went to the Gear shift icon at the far right, clicked on Tracking Code and this is what I get:

    Tracking Status

    Tracking Not InstalledLast checked: Dec 31, 1969 4:00:00 PM PST
    The Google Analytics tracking code has not been detected on your website’s home page. For Analytics to function, you or your web administrator must add the code to each page of your website.

    Last checked Dec 31, 1969??

    Ok, am I just looking in the wrong place? At this point, I am lost. :)

  26. says

    O.K…..I finally did this. I think I’ve been putting it off because I like the numbers I see with my Word Press Stats, and I’ve heard that Google Analytics is more accurate. I guess I’m afraid I’ve seeing smaller numbers. :)

    Anyway, if anyone doesn’t see the screen with the checkmark, go to the top and click on the “old version.” It looks like there is a new beta version with a slightly different look to it (no check mark that I could find).

  27. says

    So you check another site? While I am setting up my new blog, I am seeing that I have my blog site (wordpress), my Control panel for my server, my email, and now my stats page….there is a lot of clicking around! I need to figure a way to streamline! The wordpress import turns out to be a huge pain. The media wouldn’t import so I need to go in and manually import all of my pics. You would think that and would do a better job communicating with each other! Again, thank you so much for all of your help and tips! Side note…how do I see my list of subscribers in the dashboard? I don’t see the traditional “site stats” area that I was used to before and have no idea how to see my subscribers!

  28. says

    I just want to say thank you, from the bottom of my heart, for making the unknown known. I truly think you have a gift for explaining how to do things in non-techie terms where it becomes so palatable to us non-techies :) Such a blessing to those of us new to the blogging world. Not to mention it makes me less afraid about the “proper” way to go about blogging. I feel compelled to write, yet constantly deal with the fear of writing – go figure. :) Thanks to your blogging tips, the more I know, the more I develop confidence in what I do (i.e., contribute to the world in a small way thru my blog – and other future blogs).

    I have to say…it feels as if my coming across your website was a “gift” – I first heard of your site thru – but really, now that I think of it, your website is the “gift” that keeps on giving!

    Keep up the good work! It truly is appreciated, perhaps more than you know.. :)

    • Amy says

      Thank you so much Cecilia. I really appreciate your encouragement and I’m so glad BWA is helpful!

  29. says

    Ok, Amy, first you are awesome…second, I am still having problems..
    So I have the 2010 weaver theme. I put the code above body, in the footer, of the editor under appearance.
    I still have the yellow triangle saying it is not working…no green check mark…
    what should i do?
    thanks so much

  30. Desiré says

    Hi Amy,

    I’m trying to install Google Analytics on my old personal Blogger blog so that I know how to use it before my friend and I launch our new one. When it says to paste the code immediately before the closing tag, what does this mean? I guess I need a dumbed-down version of where EXACTLY I’m supposed to paste this. Thanks for your help!


  31. says

    Amy, you mention that you use Stat Counter in addition to Google Analytics. Do you recommend paying for their upgrade in order to increase the log size to 5,500? I am wondering if that is helpful information. I just hit the 500 mark a bit ago in the log.

    Thanks again for being such a great resource!

    Oh, and I did check on Akismet fees, which we emailed about earlier. They do charge now so I think Growmap is the way to go.

    • Amy says

      I keep only the free service with StatCounter. And yes, I’ve heard similar things about Akismet for new users. :(

  32. says

    Thank you so much for your response. I got it working. You have a great talent for explaining things in a simple way that anyone could understand.
    I do have a couple of questions.
    1. I noticed a lot of people talking about launching their blog. What does a launch look like. I have my blog up while I am following your tips. Is that bad?
    2. How do you get the background of your page to look like it does with the diamond links. I have seen this on several blogs but don’t know how to do it.

    • Amy says

      1. Nope, you’re good. :) A “launch” looks different for everyone, but it basically means your blog is live and can be accessed by others. Wether it quietly slips into the blogosphere or begins with lots of fanfare (marketing, etc.), it’s “launched” just the same. My blogs generally are up and running very quietly and are a constant work in progress.

      2. The way it works is to use a small image which is tiled. In order to do it, you have to create an image. (Here’s a fun site to do that.) Then upload your image to your server. Then specify in your CSS this: background:url(imageURLonYourServer);

      Your theme might also have the option of putting in a background image easily (such as the TwentyTen theme which is your default WordPress theme. If you’re using TwentyTen, you can find the place to upload your image directly from your Dashboard in your Appearance Settings.

  33. says

    Hi Amy-
    Your blog is so helpful. I was wondering is there a way to add a visitor counter to the atahualpa theme? I have feed burner so I can track in my dashboard, but would like something on my blog. Is that possible?

    • Amy says

      Yes, you can put a chicklet on your blog (such as in a widget in your sidebar). Simply login to your FeedBurner account, click on the “Publicize” tab and then select “FeedCount” from the left menu. Follow the instructions to create your chicklet and then paste the HTML code into your blog. Hope that helps!

  34. says

    Merry Christmas, Amy!
    I just found something curious about Google Analytics. I had to reword all of my Feedburner install due to the feeds of subscribers not working. I think it was due to a problem w/ Feedsmith. Anyway, I had to redo the G Analytics install this morning and noticed that you recommend putting the code in the Body Bottom in Atahualpa, but GA recommends putting it in the header and their reasoning is that they say that you have a better chance of the tracking info getting read when someone is looking at the page rather than having it load at the bottom. I installed it where you said to, but am curious if I should change it to the header.

    Wondering what you think about that?
    – Adrienne

  35. says

    Thanks for all the helpful info! I’m trying to install on my wordpress theme (albeo) and having troubles. Does analytics only work with wordpress.ORG?

  36. Michele says

    Thanks so much, Amy. I have the Atahualpa theme and this was very useful to a blogging newbie like me. :) I’m recommending your site.

    • says

      Hey amy , Michele recommended your site to me..and that is how i found you….and now I recommend you to others!!!

  37. says

    Hello Amy,
    I just recently found your blog. It has been very helpful to me. I am completely new to the whole blogging world, and I’m learning as I go. I have a question about the Google Analytics. It says it’s a free service, so what does it mean in the Terms of Agreement under 1. Definitions….”accounting”….it says something about charge to the service site?

    Thanks for any help!

  38. says

    I’m stuck! I’ve tried this via plug in a few times and its still not working. The box never turns to a green check mark just a caution yellow triangle. Any ideas? I’ve waited 24 hours and then tried re typing the UA code and updateing. Nothing. I’m not sure what to try now.

    Love your site and all the helpful information you provide! Thank you so much.

    • Amy says

      Hi Amy,

      Sorry it didn’t work for ya! No worries, I’d just install a plugin at this point. Follow my instructions to add a plugin via your Dashboard. I recommend “Ultimate Google Analytics” or “Google Analytics for WordPress” when you do your search (Step 4 in the aforementioned post). Once the plugin is installed, you’ll just add your UA code in Settings.

      Hope that helps!

  39. says

    I LOVE your site. It’s so helpful! I’m completely technologically challenged, so your site has made my blog makeover MUCH easier.

    However, I’m on blogger, and I can’t for the life of me figure out how to make this work! I can’t find the tag anywhere. I’m looking on the template though… should I install a whole new HTML gadget for it and just copy and paste the code?


  40. says

    Google Analytics offers some awesome ways to look at your visitors…nice detailed walk-through showing how to get this installed. Bookmarked it for future reference!

  41. says

    Hi there! I am stopping over from Works for Me Wednesday. I enjoyed your post about Google Analytics. I have been trying to tweak my site lately and your blog is chock full of useful bloggy tips.

    When you get a chance, stop by Free 2 Be Frugal.


  42. says

    If anyone’s using Thesis – copy the code Amy describes and then head to Site Options on your Dashboard. Expand the “Stats/Software Tracking” option and paste it right there. Save. Viola! Pretty easy. Another “to-do” on my list checked off today. Thanks, Amy!!

  43. says

    Not sure how, but I follow you on Twitter, and never subscribed to your site!! Just fixed that right now!! Hope you have a great rest of your Monday (btw, visiting from Real Life!) =)

  44. Tammy Wollner says

    So, now I took off the code and did the plug in route. It shows it is installed and activated on my site, but on my analytics pg, it is still not tracking. I followed all of the steps. It is giving me a message that it has to be added to every page. ???

    • Amy says

      It takes 24 hours to start seeing your stats so check back tomorrow and you should see something. :)

      • says


        Thanks for the helpful tip. Just one question on the epanel, I saw where you suggested to put the google code, but the box right below says “Add code to the (good for tracking codes such as google analytics)”. Should I put it in both places sorry i’m so confused.

  45. Tammy Wollner says

    Hey, I did the code route and after pasting the code, the status still says uninstalled.