How to setup Google Analytics on WordPress


One thing that is crucial for knowing all your hard work on your blog or website is paying off is using analytics. Google Analytics is amazingly powerful, especially for a free tool. I’ll walk you through the step-by-step of setting up Google Analytics. It’s not that hard even if you don’t know how to write code.

1. You have to have a Google or Gmail account. If you don’t you can get one at the Google Analytics page. Go here: and click sign in if you have an acccount already or signup.

2. Click “Admin” in the upper righthand corner and you will see “Add Account”

3. You will be asked to name the Account — You can call this your website title, then url. I would advise you to put — use the www. You may in the future want to do a subdomain such as

4. Once you are setup you will be given the code to add to your website. If you don’t and can’t figure out how to find it follow these steps:
a. Click in the upper left side for accounts and click on the website domain you want.
b. Click Admin in the upper right corner if you are not already in there.
c. Then in the middle of the page you will see “Tracking Code”.
d. You will see #1 – leave this single domain unless you have some other setup.
e. You will see #2 – Copy all of that code inside of the box.

5. In your WordPress installation these are the steps (if you can ftp in you can do this in the actual PHP header files).
a. Click on Appearance>Editor
b. You should see Header. If not it could be named something else but you will see brackets such as (header.php) under the names on the right. Click that file.
c. Either do a ctrl+f(win) or cmd+f(mac) and put in “/head” — without the quotes.
d. Right above the “/head” paste your code that you got from Google Analytics.
e. Hit “Update File” button under the code area and that is it.

Want to make sure it is working?
We’ll show that in the next step!