Install Google Analytics in WordPress

A Successful Website will always track their audience how they are interacting with it. The possible best option to know your website audience is through your traffic stats and this can be achieved via Google Analytics which is available for free. In this article, we will show how to install Google Analytics in your WordPress blog.

Why is Google Analytics important for Websites?

Google Analytics allow you to know audience behavior Which Audience visits your website Google Analytics provides the geographical location of the visiting audience,the browser they used to reach your website,it also gathers important information such as users screen resolution,JavaScript ,Flash,Operating System and much more. Gathering this information can be extremely useful,if your audience is using mobile browser more,then you can update website theme with mobile theme,If the visiting audience is not using JavaScript or Flash,then you can remove the unnecessary JavaScript from your website,This helps in better audience interaction and decrease bounce rate hugely. Keep a track ,what they are doing in your website With Google Analytics,we can keep track of audience visiting pages ,where they are likely to visit,how long they are staying in your website,What type of pages they like,By using this kind of information, we can decrease the bounce rate and increase the depth of page views much more. When do they visit your website By analyzing the most viewed hours of your website's posts, we can pick the time when we have to publish the post to reach the maximum audience within short period of time , Where did they visit your website from Via G-Analytics,we can get the information where did the user came from ie..,From Search Engines,Referral Links from other sites)

How to Signup with Google Analytics

Step 1: First you would need to create a Google Analytics account. To do this Visit google analytics. If you already have a Google account, then sign-in with that account. If you do not have a Google account, then you would have to create an account for yourself.

Google Signup

Step 2: After logging your Google account, you will be prompted with screen below,where you will be signing up for analytics with your Google  account.

Analytics Signup

Step 3: After the above screen, you will be given choice to choose between website or mobile application. Now select Website here in this step Select Either Universal Access account ( which is in beta and comes with extra features) or Classic Analytics

Analytics Universal Access

Fill the additional fields. You enter your Website’s URL, Account name, country etc.

Analytics creating website name

After completing the above step,click on the Get Tracking ID button. You will be presented with Google Analytics terms and service which you must agree to, so click on I Agree button. Step 4: Now you will be shown with Googleanalytics tracking code. Copy this tracking code to enter it in your WordPress site.

Google Analytics Tracking code

How to Install Google Analytics in WordPress

Method 1

There are lots of plugins available to add Google Analytics to your wordpress website. However,we made a plugin just for this purpose,It is extremely light weight .Download and install this in your wordpress Wordpress Google Analytics by AMKapps After installing the plugin,just paste the copied analytics code in the plugin’s setting page.

Method 2

Open header.php in your installed WordPress theme and paste the copied analytics tracking code right after the <body> tag

Method 3

Open functions.php in your installed WordPress theme and add the following code snippet to it at the end of it.Make sure you replace

"// Paste your tracking code"

with copied tracking code.

<?php add_action('amkapps_footer', 'add_google_analytics_tracking_code');
 function add_google_analytics_tracking_code() { ?>
// Paste your tracking code
<?php } ?>