Add Google Analytics Code to Your WordPress Website

By on January 15, 2011

In this tutorial I’m going to show you how to add Google Analytics code to your WordPress website. It is an absolute necessary task to perform for a Webmaster that is serious about making a successful website. It is all about the numbers and statistics when it comes to developing a website. You need to know what is successful and what is not.

What is Google Analytics?

Google Analytics is a free tool that Google provides for Webmasters that allows them to view detailed statistics about their website. To use Google Analytics you simply have to add the Google Analytics code to your website. This is invisible code and is only inserted for tracking purposes. Here’s how to find your Google Analytics code. Google will provide such statistics as:

  • Detailed information about your website visitors.
  • Keywords people have used to get to your website. Here’s how to find keywords to target.
  • AdSense statistics.
  • Advanced settings which will track conversions and sales.
  • And loads of more valuable information.

Google Analytics is so detailed that I cannot even explain how many things it could possibly do for you. One being that it is good for is to check your website bounce rate on Google Analytics. It is amazing how far it goes into analysing your website statistics. I recently wrote a post about how you can find the highest paying keywords for AdSense on your website. This fact alone amazed me, as it was not only telling me what keywords were used to find my website, it was telling me how much these keywords made me money-wise.

Will the Google Analytics code be seen on my website?

You do not have to worry about the code being seen on your website because it is an invisible tracking code. If it does appear on your website, this can mean that you have not copied the code correctly. Sometimes it is necessary to copy the code from the Google Analytics website and then paste it into a notepad before pasting it into your website. If you have pasted the code correctly it does not show up on your website.

How to insert the Google Analytics code into HTML website?

If you have built your website using HTML code and you are not using something like WordPress, then it is still easy to paste the code into your website HTML section. All you have to do is paste the code into each page of your website, or not a common border that appears on each page of your website. The code can be pasted anywhere in the HTML, however the best place is just before the closing code at the bottom </body> and </html>.

Add Google Analytics code

How to add Google Analytics code to your WordPress website?

First you will have to get the Google analytics code from the Google analytics website. Most WordPress themes now days have a section in their dashboard where you could just simply paste the Google Analytics code into. If you do not have this you can simply place the code into a text widget in your sidebar or footer and then your job is done. The code does not show up as anything on your website, therefore you can almost place it anywhere you like.

Now we need to place this code into a text widget in the sidebar.

1.       Click on Appearance in the side menu of your website dashboard.

2.       Then click on Widgets.

Add Google analytics code to your WordPress website

3.       Grab a text widget and drag it into your sidebar. Mine is called the primary sidebar in the picture below.

4.       Open the text widget by pressing the tiny drop down arrow.

5.       Paste your code that you copied into the widget.

6.       Press save.

The screen shot below shows where you can paste your code into a text widget.

Google analytics code

Watch this video below to see how to add Google Analytics to your WordPress website. It also shows where to find the Google Analytics code because sometimes it is not that easy as it is a very detailed website to navigate.

What are the benefits of having Google Analytics code installed on your website?

  • You can see where your website visitors come from and what they are coming to see.
  • You can see which keywords are bringing your website visitors.
  • You can see which pages on your website make you the most money.
  • You can identify which links are clicked the most.
  • You can check your website bounce rate on Google Analytics.
  • You can identify which advertising space is more valuable.
  • You can also see what operating system your visitors are using. This can be useful as people with older operating systems may not be able to view certain content like videos, or large images.

Using this information you can fine tune your website and keep it growing. It is easy to find out what your website visitors want when you are using Google Analytics code.

About mitz

My name is Milica Pantic but everyone calls me Mitz. I am addicted to internet marketing and making money online. Who wouldn't want to live that life? I started out with one website as a hobby and now have over 20. Building websites and making money online is not that hard. You have to actually take action to make money...that is the biggest hurdle! :)

14 Comments

  1. Mark Tesa

    November 7, 2011 at 3:49 am

    Great and informative post. It looks like a great tool especially if you have a website or a blog which you want to monitor. It can help you see hoe it is doing in terms of bounce rates and hence you will be able to know if your site needs some work or not.

  2. Danny

    September 18, 2011 at 7:34 pm

    I am really satisfied with Google analytics. And the new version is even greater than the old one, although it needed some getting used to.
    I love how you can get a display of your page and then shown exactly where people clicked and how many.
    Making it so much easier to analyse the page and figure out what is working and what is making people leave.

    I have to admit that I couldn’t set working goals.
    It still says I didn’t make any conversions but I am getting money…really strange. But I can’t be bothered to find out what is wrong. Too much good stuff left in analytics anyway.
    Danny recently posted..Remington RM1015P 10-Inch 8 Amp Electric Pole chain Saw

  3. sankeerth

    June 27, 2011 at 4:10 am

    where can i download or copy the google analytics code from???

  4. Drew

    February 26, 2011 at 7:39 am

    Hi quick question:

    What if you do not use a sidebar on your blog?

    Thanks :)

    Drew

    • mitz

      February 26, 2011 at 8:02 am

      You can put it in your page template, single post.php, the footer, and so on….

      A sidebar or footer is good because it might show on every page…

      What about the header.php? If that is on every page then add a in there and put the code in there. Let me know if you need the exact position.

  5. Jasmine

    February 8, 2011 at 6:28 pm

    Google Analytics is so useful it should be made to be installed by default. Anyway, it is not that difficult to install it even for beginners, thanks to your guide!
    Jasmine recently posted..AnHosting Web Hosting Review (dofollow)

  6. Brian Rogel

    January 22, 2011 at 12:12 pm

    Great points about vanity URLs for facebook pages. It’s definitely a big plus for branding purposes, and there’s also a possibility that it helps in the SEO for the term you use in the vanity URL. Thanks for the info!
    Brian Rogel recently posted..7 Incredible New Movies About Social Networking & Business

  7. Outsource Call Center

    January 17, 2011 at 5:10 pm

    Google analytics is free and very useful. It will show you almost everything you want to know about your site (bounce rate, entry page, exit page, traffic locations and etc.). So if you are optimizing a site and doesn’t about this tool then you are one step behind already.

  8. Rakesh Kumar

    January 16, 2011 at 11:26 pm

    Google Analytic is must for our blogs. Well putting analytic code is not complicated as it feel. Thanks to show the importance of Analytic.
    Rakesh Kumar recently posted..Windows 7 Service Pack 1 RTM Build Leaked- Available For Download

    • mitz

      January 17, 2011 at 9:54 am

      Hi Rakesh,
      Thanks for stopping by..
      I do not really know everything that Google Analytics can do. I am wondering if anyone else has some little tips and tricks to add because I agree that it is important to watch your numbers.
      mitz recently posted..WordPress Website Search Engine Optimization Plug-ins (dofollow)

  9. Brian Rogel

    January 16, 2011 at 3:55 am

    Hi Mitz,
    I am a Google Analytics junkie. I probably do a little more research and tracking than is really necessary. Regardless,the software is truly a powerful tool especially considering that it is free to use. I am always stunned when I find out that some fairly significant websites are not using any analytics tracking. The amount of information that can be gathered is really second to none. Thanks for the great tutorial!
    Brian Rogel recently posted..How To Keep Your Website Off Google’s Supplemental Index

    • mitz

      January 17, 2011 at 9:50 am

      Hi Brian,
      I am amazed at how detailed Google Analytics is! I do not think I have time to become an expert at it, but I would surely love to.
      Currently I am using it to find out the highest paying AdSense keywords on my websites and also some traffic details. In the past I have also used it for conversion tracking, which was absolutely fantastic.
      I guess people really don’t realize what Google Analytics can do to you.
      mitz recently posted..Increase Adsense Earnings By Finding Your Websites Highest Paying Adsense Keywords (dofollow)

  10. Vincent Parker

    January 16, 2011 at 2:02 am

    Hi Mitz,

    Recently I started using a plugin called ShareThis, much like the share plugin you are using above, that also integrates with Google Analytics so you can see which social sites people are coming from and view share history on your site.

    You are absolutely right, it really is about numbers and statistics. Knowing where people are coming from, what keywords they used to find your site, what they do on your site and so on can really help with not only SEO, but conversion rates as well.

    I’m sure most of us have heard it: “test, track, tweak”. Using things like Google Analytics and other tracking tools can help you slowly modify your site until it does exactly what you want it to do and lead your visitors exactly where you want them to go.

    Thanks!
    Vincent Parker recently posted..How To Make WordPress Websites Using GDI

    • mitz

      January 17, 2011 at 10:01 am

      Hi Vincent,
      That plug-ins sounds very interesting, thank you for sharing it.
      All of this stuff is pretty overwhelming, making a website, getting visitors, and then finally trying to steer them in the right direction.
      I’ll take as much help as I can get and since Google Analytics is free, thank you to Google.
      mitz recently posted..How to get views on youtube and encourage website traffic (dofollow)

Leave a Reply

Your email address will not be published. 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>

COMMENTING POLICY: We love comments here but we have rules. Please do not use keywords in "Name" field; you MUST leave a real name in order to get your comment approved. Spamming for a link will not be tolerated on this site so do not waste your time.