How To Add Google Analytics To WordPress

Add google analytics on wordpress

Need an easy way to install Google Analytics on your WordPress site?

Google Analytics is used to track specific data on your website visitors. It tells you how many visitors you have, where they’re coming from, and plenty of other metrics. It’s a powerful tool that when used to it’s fullest extent, can greatly improve your website and internet marketing.

This method of installing Google Analytics is code-free. This means instead of messing with the Google Analytics tracking snippet, you’ll only have to copy and paste a short tracking number (your UA number) into a certain field. And thankfully, there’s WordPress plugins to do that for us.


Estimated time: 3 minutes

Setting up google analytics


What Does Google Analytics Measure?

Here’s just a few examples:

Traffic Sources

  • Number of website visitors
  • What source they’re coming from (social media, SEO, email)
  • What cities and countries your visitors are from



  • Traffic from SEO
  • Top keywords people use to find your site
  • What keywords are the most effective


Social Media

  • Traffic from social media
  • Traffic from each social network
  • Top content shared on social media


Page Performance

  • Top view pages, least viewed pages
  • What pages people exit your website the most
  • How long people spend on a particular page



Step 1: Sign Up With Google Analytics

Go to the Google Analytics signup page and signup using an existing Gmail account, or you will need to create a new Gmail account. You will eventually get to a page where you can enter your website info:

Setting up google analytics for wordpress



Step 2: Grab Your UA Number

Your UA Number is your tracking code in the form of a simple number (eg. UA-35669384-1) . Both can be used to install Google Analytics on your WordPress website. In your Google Analytics account, click the “Admin” button on the top right of the screen. You should see a tab that says “tracking info.”

Make sure you have your code set to asynchronous tacking then copy that UA number.

Add google analytics tracking code to wordprress



Step 3: Use a WordPress Plugin to Install Google Analytics

Go to your WordPress dashboard and add a new plugin using the menu on the left of your dashboard. Search “Google Analytics” and you will see the Google Analytics plugin by Kevin Sylvestre (shows up as the 1st result for me). Install and activate the plugin. This is my favorite WordPress plugin to install Google Analytics because it makes it so simple.

Go to the “settings” menu in your WordPress dashboard and click “Google Analytics.” You should see a field where you can paste your UA number:

Installing google analytics on wordpress


Step 4: Login to Google Analytics After 1-2 Days

After installing Google Analytics, you’ll need to wait 1-2 days until it starts tracking your data.

In the meantime, you can login to your Google Analytics account and setup some custom Google Analytics dashboards. Custom dashboards should help you organize your data in a more digestible format. If you setup dashboards before the couple days it takes for Google Analytics to start tracking, you won’t see any data. But don’t worry, it will be there shortly.


Were you successful in installing Google Analytics on your WordPress site? Leave me a comment and let me know how it went. I also offer Google Analytics consulting if you need more insight on how to use Google Analytics.

If you enjoyed my article, please share it with a friend who might like it too. I would really appreciate that.



You Might Also Like:


  1. Great help
    Made it work on one site – now I also have a great starting point to find out why no stats show up on an other. (Probably some wrong setting at Google analytics’ side – or I just have to give it some time to pick up the traffic(?))

  2. Thank you, I was struggling to enter analytic code and your article helped me. I was able to download and insert my code. Its working now… great help.


Leave a Comment