How to Add/Install Google Analytics in WordPress

Do you wonder what exactly happens when someone comes to your website? How they react, how much time they spend on a page and what are traffic sources. Well you can find information like this using a free tool Google Analytics. It is very easy to setup and we have explained in detail the exact process to do the same.

Google Analytics

You can follow these steps to add Google Analytics to your WordPress website.

Step 1 – Creating your account

So for starters you would have to create an account at Google Analytics. Simply go to http://www.google.com/analytics/sign_up.html and sign in with your Google account. You can also create a new one.  If you are already logged into your Gmail Account, you can to the homepage of Google Analytics, and Click on “Access Google Analytics” button on the top right corner.

Step 2 – How to Sign up for Google Analytics

After you sign into your google account you would be prompted to sign up for Google Analytics. In order to start using Google Analytics, you need to simply click on the “sign up” link and you can use Google Analytics.

Step 3 – What to track?

You can use Google Analytics for tracking either your website or your mobile app. But since you need to add Google Analytics to WordPress, simply select the website option. Now you need to setup your account. Add details like website name, URL, Category and Reporting time.

After that simply click on “Get Tracking ID”. This ID is used by google to identify your website and track it.

Step 4 – Add the Tracking Id to your WordPress Website

Next, you are given a tracking ID code. You need to enter this to your WordPress site. Copy this code and leave the Tab open.

You can add this Google Analytics code to your website using two simple methods:-

Using Plugins –

You can install Plugins like “All in One SEO”. You can paste your code directly on the Google Analytics option of this plugin. You can use any other SEO plugin of your preference to paste the code.

Add code directly-

To do these simply go to Appearance->Editor Section of your Admin Panel. Open the header.php file and paste your code just under the <body> tag.  In some themes you may find a tag like <body <?php=”” body_class();=”” ?=””>>. You need to paste the code after this tag. Then finally update this header file.

Once you are done with this go back to the Google Analytics page where you received the tracking code and click on “save”.

Step 5 – The Magic Begins

So after completing the simple 4- Step process you have successfully added Google Analytics to WordPress. Now you can click on the Reporting option and access the overview of your website. Please note that it takes around 12-24 hours for google to start the reporting process.

Note – You can track multiple websites using the same Google Analytics Account.

How can Google Analytics help you?

Now that you have added Google Analytics to your WordPress site, let’s discuss on how you can use it effectively.

Using Google Analytics you get a track of the people who visit your website. You learn about their demographics, their age, their gender. Using this information you can analyse, what kind of people are visiting your website. For example if your website has more views from females of the age group 18-22, then you can plan your future content in a such way that it appeals to that class of girls.

You also learn at what time your website receives the most hits. Using this information you can schedule your posts accordingly so that users can read the latest content when they visit your website.

Source of your traffic is an important criterion for the success of your Website. Your top traffic Sources might be the search engines (Google, Bing Yahoo), Direct Links, Social Media Websites (Facebook, Twitter) and some other websites.

So you can then promote your website on sources where you most likely to get traffic from. If your major traffic is coming from Search Engines, then you can focus on ranking your website for more “keywords” and thus increasing your traffic.

Another great way to benefit from Google Analytics is the different kind of testing.  You can change the design of your WordPress Site and see how the audience react to it. Do they spend more time on it? Or do they just leave? You can then use the best design and maximize the user interaction.

So you can clearly see that Google Analytics is a must have tool, so start using it today.