Our website uses cookies.

Our website uses cookies to improve your user experience. If you continue browsing, we assume that you consent to our use of cookies. More information can be found in our Privacy Policy.

How to Install Google Analytics on a WordPress Site

4 Aug, 2015 McKell Naegle

How to add code on a WordPress site: Google Analytics


The following is the second in a three-part series about Google Analytics, addressing common how-to questions.


Google Analytics is a great tool, allowing you to see all types of statistics about your website. For you to be able to access this data, code from Google Analytics must be placed on your website, so Google knows when your site is visited and can gather data. There are two main ways to accomplish this: first, by placing the code directly into the header on the site, and second, by using a WordPress plugin.


Step 1: Find the Tracking Code


Login to Google Analytics, navigate to the “Admin” tab and click on “Tracking Code.”

Google Analytics Word Press | Fluid Advertising


Locate the tracking code and copy and paste.

Google Analytics Word Press | Fluid Advertising


Once you’ve located and copied the code, there are two ways to place it in WordPress.


Method 1: Header


In the back end of your site, go to “Appearances” > “Editor.” Find the header.php file, and paste the tracking code at the end of the head tag.


Method 2: WordPress Plugin


Instead of going into the code yourself, you can simply install a plugin and past the code there. Google Analytics by Yoast is a good plugin to use.


Once you’ve placed the code, Google Analytics will be set up for your website!

Also check out...

Want to hit a button?

It's just a harmless contact page.