how to install google analytics code in wordpress

Google Analytics is a partially free service available by Google that tracks the visitor traffic and generates reports. Google launched the service in November 2005 after its acquisition of Urchin. Currently, Google Analytics is the most web analytics service being used on the Internet.

Why Google analytics is very important and helpful for webmasters to grow their websites, how you can install google analytics in WordPress, and how you can show analytics report follow this tutorial to do all previous things.

Here is a quick overview of what you’ll learn in this article.

Why is Google Analytics very important?

For all bloggers, google analytics is very important and helpful if you want to make data-based decisions this tool is the first choice.

Who visits your website?

This a part of analytics answers what’s the geographical location of your audience, that browser did the user use to go to your website and different vital info like screen resolution, JavaScript support, Flash support, language and additional.

This information is very helpful, and it will facilitate in various ways that. once obtaining a custom style, you’ll use the user information to form positive that your web site is going to be compatible along with your audience.

If most of your users don’t have Flash support, then you must avoid adding the flash component in your web site. If most of your users’ area unit on 1280 screen resolutions, then make certain that your style is compatible therewith resolution or smaller.

google analytics report showing countries

Track your visitors’ behavior when visiting your website

You can track which pages your users visit and how long they stay on each page, and what is the bounce rate which is the percentage of visitors exit your website on the first visit.

By using this data you can increase page views and decrease bounce rate, so you can improve your website rank and visitors experience.

You can also figure out the most popular articles, and the worst articles, and the type of content that attracts your visitors.

When do users visit your niche?

You can know at any time during the day that users like to visit your website and therefore can be identified the best time during the day you can post new topics during the presence of many visitors.

How do visitors find your niche?

The source of traffic is a crucial thing in the internet world, the source of visitors varies from Direct, Referral links from another site, Social, and Search Engines.

It also shows you what percentage of your visitors came from each of these sources.

google analytics report showing traffic sources.

How do visitors react with your website contents?

Google Analytics gives you an idea about how your users interacting with your niche contents and the links that visitors clicked on.

This data will help you to create new topics that are important to your website visitors, Simply put, eliminate the guesswork and concentrate on stats that matter, so you can make data-based decisions.

How to make a Google Analytics account?

Google Analytics account is free and very easy all you have to do create Gmail account to sign up to google analytics.

Step 1: visit the Google Analytics page to sign up.

sign in to your google account

Step 2: sign in to your account using gmail account see image below.

sign up google analytics account

Step 3: in the next screen choose if you want to add website or mobile app in this case we will choose website.

After that, you have to fill all required fields as account name, Website name, website’s URL, country, and the time zone.

google analytics creat new account

After you have filled this data, press on the Get Tracking ID button. You will be presented with Google Analytics terms and conditions click on ” I Agree ” to continue.

google analytics terms and conditions

Step 4: Now you can see Google Analytics tracking code showed up. Copy this code because you will need to use it later in your WordPress website depending on the method you will use later.

tracking code

How to install Google Analytics code in WordPress

There are many different methods to install Google Analytics in WordPress. We will explain 3 ways to install that code very easy.

Method 1: Install Google Analytics in WordPress Theme (Expert Users).

This way for advanced and expert users because It requires modification in HTML file of your WordPress theme so, you have to know what you do!

Go to WordPress Admin Panel> Appearance>Theme editor

how to edit theme in wordpress

After that page with code editor will open from the upper right corner of the page choose you to want to edit see no 1 in below image then choose the header.php from the right side to add google analytics code see no 2 in below image.

how to edit theme in wordpress

The target page will open where you can add google analytics code right after the <body> tag see the image below and then click on update file.

how to add google analytics code to wordpress theme

Look at the above image and put your codes just instead of this sentence “PUT YOUR GOOGLE ANALYTICS CODE HERE JUST AFTER <BODY> TAG”.

Method 2: Add Google Analytics to wordpress using MonsterInsights.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

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