Here is how to Add Google Analytics to Your WordPress Site

Here is how to add Google Analytics to your WordPress site

The Google Analytics is widely recognized tool in tracking the traffic for your site, its sources, user demographics, how your site is most often viewed, which of your pages get most attention and so much more.

The Google Analytics plugin allows you bring that power straight to your WordPress dashboard, so you don’t have to go to two different places when managing your site.

In this post, I will cover how to add a Google Analytics plugin to your WordPress site. Lets do this!
Here is how to Add Google Analytics to Your WordPress Site

Step 1: Log in to your WordPress dashboard:


Step 2: Add new plugin:

From the Dashboard, go to Plugins -> Add New:


  Step 3: Locate a Google Analytics by Yoast plugin:

Now, that you are on the Add Plugins screen, in the search field, look for an Google Analytics by Yoast. Enter the search term and hit the Enter key on your keyboard:

Google Analytics by Yoast search

  Step 4: Install Google Analytics by Yoast plugin

Google Analytics by Yoast is one of the widely used plugins for analytics. Click on “Install Now” button to install it:

Install Google Analytics by Yoast

Step 5: Activate the Google Analytics by Yoast plugin:

You will be brought to Installing Plugin screen. Wait till the plugin installs and you see “Successfully installed plugin…”. Click “Activate Plugin” link to activate the plugin on your site:

Activate the plugin

Step 6: Google Analytics plugin is now installed:

If you look at the Plugins menu on your WordPress dashboard, you will see that the plugin is now there. You will also notice the Analytics has been added to your side bar menu:

Plugin is installed

Step 7: Check and update settings for the plugin:

Now, that the plugin is installed on your blog, you need to customize the setting to fit your needs by going to Analytics-Settings:

Plugin settings

Step 8: Authenticating with Google Analytics account:

Once in Settings, you can authenticate and connect your plugin to actual Google Analytics account in 2 ways.

  • You can use the manual option, if you know your special UA number provided by Google for this site and enter it manually
  • You can use the authentication method and establish the connection this way

Since the dashboard works correctly only when the account is authenticated via live link (second method), I will show how to do it.

Click on “Authenticate with your Google account” button:

Authenticate plugin

Step 9: Authorize the connection to your Google account:

Once you pressed the “Authenticate with your Google account” button, your screen will grey out and you will see two small windows pop up, the authentication box and a request for permission to authorize connection to your your Google account.

Confirm that you are connecting to the Google account where you have Analytics setup and press Accept:

Connect to Google

Step 10: Copy the authentication code and paste it in your plugin:

Once you connected your plugin to your Google account, a new small window will pop up with the authentication code in it.

Copy the long code from the Google window and paste it into the “Paste your Google code here:” window:

Copy and paste the Google code

Step 11: Save the authentication code:

Now that you have copied and pasted the code, press “Save authentication code” button:

Save authentication code

Step 12: Select the Analytics profile:

As soon as you save the authentication code, you will be brought back to the Analytics-Settings window of your WordPress site.

Since you have connected your site to Google, you are now able to select the analytics profile that is associated with your particular site.

Click on the Analytics profile drop-down and select the profile for the particular site you are working with. If you have more than one site and profile, you will see several profiles to choose from.

Select the one that you need and click on it:

Select analytics profile

Step 13: Confirm the profile and save the changes:

Once you have chosen the Google profile it will appear in your “Analytics Profile:” window.

Confirm it’s the correct one and Save Changes:

Save changes to Settings

Step 14: View the Analytics in the dashboard:

Now that the plugin is installed and authenticated with Google, you can view the statistics by going to Analytics->Dashboard on your WordPress menu. A side note: if your website is brand new, you might not see any activity in the Dashboard:

Analytics Dashboard



Congratulations! You did it! Now you can track your stats like a pro right on your WordPress dashboard, saving you time and providing you great insights into your website.

Here is a handy step by step recap of this post, enter your info to get this free cheat sheet:


    • Lillith says

      Hi Mike! Thank you for checking out the post. There are few useful numbers to track in Analytics.
      If you have goals and e-commerce goals setup, those would be really useful to watch as they show you what is the percentage of your customers that are converting. Goals are under Conversions – Goals or Ecommerce. You can set up e-mail signups goals based on Thank you page URL on your site and e-commerce goals based on Thank you pages of your product sales.
      If you don’t have those setup yet, next good thing to track is Acquisition. You can start just by going to Acquisition – Overview to see where your traffic comes from in general and then click on each source to see in detail which sites are the contributors (and see if you can work with the top ones more).
      If you have your campaigns setup, you can track that as well to see which link locations on your site bring more traffic over others.

  1. says

    Wow, this is exactly what I need. I will be trying my hand at creating my own site in the next few weeks, and I know Google analytics is definitely something I will need to have. Thanks for the step by step instructions. They make it seem fairly easy to do this!

  2. says

    OMG thank you for the screenshots! I am not tech-savvy, and I seriously need to be able to look at the screen four times before figuring out what I’m supposed to do! Thank you for this post.

    • Lillith says

      I’m so glad that it’s helpful to you! I find it’s easier sometimes to follow screenshots rather than moving video because they stand still and wait for you to go through the steps, you know?

Leave a Reply

Your email address will not be published. Required fields are marked *