How to Install Google Analytics on a Website

In this post I am going to show you:

  • What is Google Analytics used for
  • How to get Google Analytics tracking code
  • How to install Google Analytics for WordPress


What is Google Analytics Used for?

Google Analytics is an online service provided by Google for free that helps you get some statistics related to your website. From Google Analytics you can have an idea of how many hits you have got on your website, in which page visitors enter to your site, how much time they spend on it, what percentage of your visitors are new ones. Content overview shows you which page seems to be more popular. Google Analytics is the most detailed program that shows statistics for your website and there is no other program in the world for this.

You can also see where your visitors are coming from (social media, Google results). You can also dig down a little deeper to discover more specifically from which place in the world your visitors come from. You can also discover which keywords they searched for. You can also see which search engine they are using.

You can also set up goals, seeing if people that go to your site do something like buy something, see where they went, landing page, review page ecc (this is called purchase funnel). Based on this analytics you can improve your site.


Get Google Analytics Tracking Code

For this you need a gmail account, if you don’t have one you have to create it. Google Analytics is completely free, so there’s no cost to get the statistics related to your site and also there is no other better tool for this.

Go to Google Analytics Homepage and click on Sign up on the right corner of the page.

get google analytics tracking code

Choose an account name. You can have many websites within the same account. Then write your website name. Grab your website URL and paste it there (just the URL, not the http part), select a relevant industry. Choose your country and time zone.

If you want to share your data with Google you can let the box that asks this checked. I recommend that you don’t share your Google data with Google and others. So uncheck them. Then click on Get Tracking ID.

get google analytics tracking code

In the table that opens choose your country and then click Agree. You will be able to see your tracking ID. Copy that ID. Now go to your WordPress site.


How to Install Google Analytics for WordPress

In this section I will show you how to install Google Analytics using the All in One Seo Plugin. So you need have installed the All in One Seo Plugin on your website. It’s actually a very simple process.

Go to All in One SEO, General Settings. Find the Google Analytics ID, which is under Google Settings. Add your ID. Paste the ID in the Google Analytics section. Then click Update the Options at the end of the page.

how to install Google Analytics for WordPress

Check to see if it worked

Go to your site and visit a random page. Now you going going to check the statistic for yourself that will show that there is one visitor at your site which is you.

To check this, in your Google Analytics page, click on Home.

how to install google analytics for WordPress

On the new table that opens click on All Web Site Data.

how to install Google Analytics for WordPress

Click on Real-Time and Overview, and you will be able to see your website’s data.

how to install Google Analytics for WordPress

You will see 1 visitor in the last minutes which is you, with your location data. This indicated that Google Analytics was installed.

how to install Google analytics for WordPress


If you have any questions you can ask them below.


How to Bring Traffic to your Website

The best way to add traffic to your website is from search engines.




Google Analytics is a tool to measure the traffic in your site. You can gain a lot of marketing knowledge from Google Analytics.

4 thoughts on “How to Install Google Analytics on a Website”

  1. Hi thank you for the very informative page on Google Analytics. With the obvious experience you have marketing online. How long would you recommend analyzing Google Analytics before making changes?

    Also could you please advise me on the best type of theme to use from Word press which would help my internet marketing efforts. Many thanks Alan

    • After 6 months or more since starting a website Google Analytics data starts to make sense and can really tell about a website.
      Your website theme depends highly on your niche. You can do a Google search to find some specific themes relevant to your niche. For example, f your content is more artistic you might choose a theme which is more creative and beautiful. If your website is more serious, you might choose a more formal theme.
      Good luck!

  2. I always hear people talking about the importance of google analytics but are there not other stat counters out there? I seem to come across a new one every day!
    Googles version seems a little bit confusing to me – especially this set up business. Do you feel it is the most effective counter though?

    • The two most popular are GA and a plugin called Clicky. I believe you need to pay for clicky to get the full data, but some people I know prefer it.
      Clicky has the advantage of telling you what links people click on your site too


Leave a Comment