How to Install Google Analytics in WordPress?

You need to know that as blogger, you should have a statistics on your website. It’s a few ways to know, how many users do you have monthly and what they are doing on your page. Let’s meet Google Analytics. I would like to show you how to install Google Analytics in your WordPress blog with simple code.

Why Google Analytics?

Every blogger need to know, how many visitors have and where they come from. With GA you have access to information like: user language, javascript support, device type, screen resolution.

This data you can use to know, which Google AdSense ad will be the best for most users. If your website is not supporting responsive web design and you know that for visitor page is loading incorrectly, you will know what to do.

Signup to Google Analytics

Go here to signup. If you have now Google account, sign in with this account. If not, create account.

On next screen you need to enter information like: account name, website name, website URL, industry category and reporting time zone. If you want to track users on website, check website. You may choose mobile app if you have mobile app. After this, click Get Tracking ID button!

You will be redirected to a page, where is your Google Analytics Tracking Code.

How to Install Google Analytics in WordPress?

After signup and installation processes, you are ready to do implementation Google Analytics with WordPress. This is really simple and may take 2-3 minutes for beginners!

Tracking Code need to be on every website page. I writed small function for WordPress with which you can do this. Add this short code to functions.php in your WordPress theme.

<?php add_action('wp_head', 'skilledwp_googleanalytics'); 
function skilledwp_googleanalytics() { ?>
// Paste Google Analytics code (Tracking Code)
<?php } ?>

Save file and since now, you will see reports in Google Analytics about your visitors.

I hope this tutorial helped you how to install Google Analytics in WordPress and you will use data from analytics to see, which pages are important to your visitors.

One Comment

Leave a Comment

Your email address will not be published. Required fields are marked *