Add Google Analytics to Wordpress · Google SEO

Manually add Google Analytics code to WordPress

This article will show you how to add the Google Analytics code to your wordpress site.

1. First you need to create a Google analytics account

2. Once you have the tracking code, copy it and log in your wordpress account. In the administration panel of wordpress, go to “Appearance” and “Editor”

GA

 

3. Once you are there, find the “header.php” and open it by clicking on it. Copy the code you obtained in the last step of this tutorial before the closing </head> tag and click on the blue button that says “Update file” to save the changes made on the header.php file.

You want to paste the google analytics code on the header of your pages, so if the user leaves your site before the entire page loaded, you will still get the data in google analytics.

(Click on picture to enlarge)

GA

and you are done!

It will take a few hours/days for google to index your site, but when it is done, if you return to your google analytics account and click on “F5” to refresh the page, and if you have done everything correctly you will see:

GA

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.