fbpx

How to Add Google Analytics in WordPress under 5 minutes?

Do you want to know about How to Add Google Analytics to WordPress with the help of various methods?

Yes, you should know about How to Install Google Analytics on WordPress. If you will know about various Google Analytics Installation method then you can pick an easy one.

Because with the help of Google Analytics, you will know about how your audience engages with your blog or website content in terms of bounce rate, session duration, and other metrics.

Google Analytics will help you to reach out to your blogging success. Google Analytics will help you to set your Goals and Conversion rate in terms of success.

It is a free tool provided by Google to measure your website traffic. It gives you all the stats about users, sessions, bounce rate, etc. So this tool is important for all the websites or blog owners.

You should install Google Analytics because of its usefulness. This tool will help the users to do an in-depth analysis of traffic. It will give you the complete scenario of how you can increase your traffic or conversions.

So you should know about the 6 best ways to add Google Analytics in WordPress. You can choose any method and implement it for your WordPress website or blog.

6 Best Ways to Add Google Analytics in WordPress Website or Blog Click To Tweet

6 Best Ways to Add Google Analytics in WordPress:

Before installing Google Analytics to WordPress, you should sign up for a Google Analytics Account.

How to Sign Up for Google Analytics?

Step 1: Go to Google and Search Google Analytics or type analytics.google.com.

Step 2: Sign up for Google Analytics. Click Set up for Free.

Set up for Free

Step 3: Put your Website name in the Account name. Click on Next.

Account Details

Step 4:  Choose what do you want to measure. In our case, we want to measure Web traffic. So we choose the 1st option. Click on Next.

What do you want to measure

Step 5: In Property setup, put your Website Name, URL, Industry Category, and Reporting Time Zone.

Property setup

Step 6: Click on Create.

Step 7: It will ask for accepting the Google Analytics Term Service Agreement. Accept all and Click I Accept.

Accept Analytics Terms

Step 9: After accepting the policy, Google Analytics will give you the Tracking Code (Global Site tag or gtag.js) and Tracking Id.

Step 10: Copy the Tracking Code or Global Site tag. Tracking Code is like this.

Analytics Tracking Code

This code should be paste before </head> or </body>.

First method:

1. How to Insert Google Analytics Tracking Code to WordPress without Plugin:

Step 1: Go to Appearance > Theme Editor.

Theme Editor

Step 2: Open header.php file and paste this code before </head> tag otherwise you can paste this code before </body> tag in footer.php file.

Note: You will find the header.php file in the Theme Files section on the right side.

Paste the Analytics Tracking Code

Step 3: After pasting the Google Analytics Tracking Code, Click on Update File.

So, this is the complete process of How to Add Google Analytics Code to WordPress without Plugin.

How to Add Google Analytics to WordPress without Plugin? Click To Tweet

Second Method:

2. Insert Google Analytics Tracking Code using Insert Headers and Footers Plugin:

If you want to insert analytics tracking code through plugin follow the below steps.

Step 1: Go to Plugins > Add New.

Step 2: Install and Activate Insert Headers and Footers Plugin.

Insert headers and footers

Step 3: Go to Settings > Insert Headers and Footers.

Insert Headers and Footers Settings

Step 4: Paste the Google Analytics Tracking Code in Scripts in the Header box.

Step 5: Click on Save.

Your Analytics is successfully installed in WordPress using Insert Headers and Footers plugin.

How to Add Google Analytics Tracking Code using Insert Headers and Footers Plugin? Click To Tweet

Third Method:

3. Insert Google Analytics Tracking Code using cPanel:

If you do not want to use code inserter plugin and add your analytics tracking code through cPanel. Follow these steps.

Step 1: Login into your WordPress website or blog cPanel using your username and password.

Step 2: Go to File Manager.

File Manager

Step 3: Open public_html.

public_html

Step 4: Go to wp-content > themes > Your Theme.

Step 3: Open header.php file.

header.php file

Step 4: Paste the Google Analytics tracking code before the </head> tag.

Paste the Tracking Code in header file

Step 5: Save the header.php file.

So you have successfully added analytics to WordPress using cPanel.

Note: Sometimes you have not found header.php file directly in public_html. So you can find header.php file through wp-content/themes/yourthemefolder/header.php.

How to Add Google Analytics to WordPress using cPanel? Click To Tweet

Fourth Method:

4. How to Install Google Analytics in WordPress through GADWP Plugin?

GADWP Plugin means Google Analytics Dashboard for WP plugin.

First, you should sign up for Google Analytics through your Gmail Id before using the plugin. The process is the same above for sign up in Google Analytics. After completing the sign up follow the below procedure.

No need to copy the tracking code or id in this process.

Step 1: Go to Plugins in WP-Admin. Click Add New.

Step 2: Search Google Analytics Dashboard Plugin for WP by Exact Metrics.

Google Analytics Dashboard for WP by ExactMetrics (formerly GADWP)

Step 3: Install and Activate this Plugin.

Step 4: Go to General Settings of this plugin. It will ask for plugin authorization.

General Settings

Step 5: Click on Authorize Plugin. Do not choose the developer mode.

Step 6: After Click the Authorize Plugin, it will ask you for Access Code.

Get Access Code

Step 7: Click Get Access Code in Red color. This will redirect you to Gmail Account. Sign in with Gmail id and it will give you Access Code.

Step 8: Copy the Access Code and Paste in Access Code in WordPress Admin. Click Save Access Code.

Put your Access Code

Step 9: After this process, it will show you the Google Analytics Data. After this, you will click the Lock Selection of your website and save the changes.

Lock Selection

Step 10: If you want to show your website traffic data then you will go to the Dashboard of your website and it will show your website data like this.

Google Analytics Dashboard

So this is the complete method of How to Install Google Analytics on WordPress with the help of the plugin.

Note: In Google Analytics Dashboard for WP by Exact Metrics plugin, it will not ask tracking code or id. But in other plugins, they will ask tracking id.

How to Install Google Analytics in WordPress through GADWP Plugin? Click To Tweet

Fifth Method:

5. How to Integrate Google Analytics to WordPress through Google Tag Manager?

First, you should follow the signup process and copy the Analytics Tracking Id.

Step 1: Login into your Google Tag Manager Account with your Gmail id and password. Open your Container.

Step 2: Click on Add a New tag in the New Tag section.

Add a New Tag

Step 3: Rename your tag. Choose Tag type in Tag Configuration.

Step 4: Choose Tag type as Google Analytics: Universal Analytics.

Step 5: Choose Page View in Track Type and Choose New Variable in Google Analytics Settings.

Put your Page View & Select New Variable

Step 5: When you choose New Variable It will ask your Google Analytics Id. Put your Analytics Tracking Id. Click on Save.

Step 6: Choose a trigger option in Triggering.

Choose a Trigger

Choose Firing Trigger as All Pages.

Step 7: Click on Save in the blue button at the upper right corner.

Step 8: Submit Your Workspace.

Submit Your Workspace

Step 9: After submitting Workspace, Put your Version Name and Description otherwise you can leave as it is.

Publish Your Container

Click on Publish on the upper right side.

So your Google Analytics is successfully added to WordPress through Google Tag Manager.

How to Integrate Google Analytics to WordPress through Google Tag Manager? Click To Tweet

Sixth Method:

6. How to Setup Google Analytics for WordPress using MonsterInsights?

You have to complete Google Analytics sign up process before using MonsterInsights.

MonsterInsights is the best Google Analytics WordPress Plugin which will help you to install Google Analytics in WordPress.

So follow these steps for Google Analytics Installation.

Step 1: Go to Plugins > Add New.

Step 2: Install and Activate Google Analytics Dashboard Plugin for WordPress by MonsterInsights plugin.

Google Analytics Dashboard Plugin for WordPress by MonsterInsights

Step 3: After activating, it will ask to click on Launch the Wizard.

Launch the Wizard

Step 4: Choose your Website Category. Here are three categories available.

a. Business Website

b. Publisher (Blog)

c. ECommerce

We have chosen the second option. After choosing the option, click on Save and Continue.

Choose Your Category

Step 5: It will ask you to connect MonsterInsights with your WordPress blog or website. Click on Connect MonsterInsights.

Connect MonsterInsights

Step 6: It will authenticate your account by choosing your Gmail Id.

Choose Your Account

Step 7: It will ask you to access your Google Account. Click on Allow.

Step 8: Pick your Website or blog profile or account.

Step 9: Click on Complete Connection.

Recommended Settings

Leave Recommendation settings as it is and Click on Save and Continue.

Leave Recommended Addon as it is. Click on Save and Continue.

Skip WPForms step and Click on Save and Continue.

Click on Compete setup and Exit Wizard.

Congratulations message will send by MonsterInsights. Click on View Report.

Overview Reports

So you can view your Google Analytics Data through MonsterInsights plugin.

If you have a new Google Analytics account then it will take 24 hours to display the data.

This is the complete guide about How to Add Google Analytics to WordPress using MonsterInsights Plugin.

How to Setup Google Analytics for WordPress using MonsterInsights Click To Tweet

How to Check that Google Analytics is Installed or Not?

Step 1: Open your WordPress website Homepage.

Step 2: Go to Your Google Analytics Account. It shows you the active users on your WordPress website in Real-time report with location, traffic source, etc.

Real Time Reports

So with this, you have successfully shown the website visitors live in Real-time reports.

How to Add Google Analytics to WordPress under 5 minutes? Click To Tweet

Conclusion:

With the help of this guide, you can add Google Analytics on WordPress with the help of 6 best methods.

If you want to use the free plugin then you can use Google Analytics Dashboard for WP plugin for installation & apply the fourth method.

You have investment and use the premium plugin MonsterInsights and apply the sixth method.

For saving your website form heavy script, then you can use the fifth method and use Google Tag Manager for installation.

If you do not want to use the plugin then you can apply the first or third method. You can use the header.php file or cPanel for installation.

Otherwise, you can put the tracking code with the help of Insert headers and Footers plugin or second method.

So apply the method which is suitable for you. Tell us in the comment section, which method do you want to use.

Your comments are appreciated.

If you have liked this article then please share this article on social media platforms and Join our Facebook Group.

Read More:

How to Add Google Tag Manager to WordPress?

How to Install WordPress in cPanel?

11 Best Google Analytics WordPress Plugins for Bloggers & Marketers

How to Verify Google Webmaster Tools with WordPress?

How to Install Google Analytics on Blogger (2 Best Ways)

Share this article with your friends and community
Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on pinterest
Pinterest

Leave a Comment