As a blogger, you probably know the importance of Google Analytics.
It’s a free data tool that gives you an insight into your audience. By understanding your audience, you can improve your content and create better campaigns.
In this post, we’ll show you the best WordPress plugin for Google Analytics install.
Google Analytics is quite a complex tool, but with the right plugin, it can become much easier to set up and use.
Best WordPress Plugin For Google Analytics Install
How to Install Google Analytics in WordPress
There are a few different ways to set up Google Analytics in WordPress. We will show you three methods where the first option is the easiest and the last is the hardest.
You can choose the one that best suits your needs.
Note: You need to use only one of these methods on your website to avoid double tracking of page views in your Google Analytics account.
Method 1. Google Analytics for WordPress by MonsterInsights
MonsterInsights is the most popular Google Analytics plugin for WordPress. Over 3 million websites use it including the likes of Bloomberg, PlayStation, Zillow, WPBeginner, and more.
It is the easiest and by far the best way to add Google Analytics to WordPress (for all users beginners and experts alike). Plus, it offers a Dual Tracking feature that lets you add Universal Analytics and Google Analytics 4 to your WordPress website without editing code.
MonsterInsights is available as both, a paid premium plugin, and a free version. In this tutorial, we will be using the MonsterInsights free version.
You can use the MonsterInsights Pro version if you want more advanced features like eCommerce tracking, Ads tracking, Author tracking, etc. The process of setting them up is the same.
Let’s get started.
The first thing you need to do is install and activate the MonsterInsights plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, the plugin will add a new menu item labeled ‘Insights’ to your WordPress admin menu and you’ll see a welcome screen. Go ahead and click the ‘Launch the Wizard’ button.
Clicking on it will open the MonsterInsights setup wizard.
First, you will be asked to choose a category for your website (a business website, blog, or online store). Select one and then click on the ‘Save and Continue’ button.
Next, you need to connect MonsterInsights with your WordPress website.
Simply click on the ‘Connect MonsterInsights’ button.
This will take you to Google accounts where you will be asked to sign in or select a Google account if you are already signed in.
Go ahead and choose your Google account or enter your email to sign in.
Next, you will be asked to allow MonsterInsights to access your Google Analytics account.
Click on the ‘Allow’ button to continue.
The next step to completing the connection is to select the profile you want to track.
You need to select your website here and then click on the ‘Complete Connection’ button to continue.
After that, simply click on the ‘Complete Connection’ button to continue. MonsterInsights will now install Google Analytics on your website.
Next, you will be asked to select the recommended settings for your website.
The default settings would work for most websites. If you use an affiliate link plugin, then you need to add the path you use to cloak affiliate links. This will allow you to track your affiliate links in Google Analytics.
MonsterInsights will also ask who can see the reports. You can choose different WordPress user roles. Once you’re done, click on the ‘Save and Continue’ button to save your settings.
Next, MonsterInsights will show you a list of website tracking features you would like to enable.
You can scroll down and click on the ‘Continue’ button or the ‘Skip for Now’ option.
On the next screen, MonsterInsights will show that you’ve successfully setup Google Analytics tracking.
You can see that Google Analytics is connected, tracking code is installed, and data is now being collected.
Next, you can scroll down and see a field to enter your license key.
Go ahead and click the ‘Complete Setup without Upgrading’ option for now.
You’ve successfully added Google Analytics to your WordPress website.
Next, you’ll need to create a Measure Protocol API Secret. This will allow MonsterInsights to track events like eCommerce purchases, form conversions, and more.
To start, you can login to your Google Analytics account. Then head over to the ‘Admin’ settings page and click on the ‘Data Streams’ option.
Next, you’ll see your Data Streams.
Simply select the data stream you connected with MonsterInsights.
On the next screen, scroll down to the ‘Advanced Settings’ section.
After that, click on the ‘Measure Protocol API Secrets’ option.
You’ll now see a new window slide in with your Measurement Protocol API Secrets. Initially, this page will be empty, and you won’t have any API secrets.
Go ahead and click the ‘Create’ button.
Next, you’ll need to enter a nickname for your API secret.
Once you’ve done that, simply click the ‘Create’ button.
Your API secret will now be created.
Go ahead and copy the API secret that’s under the ‘Secret Value’ field.
Next, you’ll need to enter the Secret Value in MonsterInsights.
You can do that by going to Insights » Settings from your WordPress admin panel and then clicking the ‘General’ tab.
Then head over to the ‘Google Authentication’ section.
Simply enter the Secret Value under the ‘Measurement Protocol API Secret’ field.
You’ve successfully set up the Measurement Protocol API Secret.
Now, let’s see how to use dual tracking in MonsterInsights if you have a Universal Analytics account.
How to Set Up Dual Tracking When Using Universal Analytics
If you already have a Universal Analytics account, then MonsterInsights makes it super easy to track both Universal Analytics and Google Analytics 4 through its Dual Tracking feature. The best part is that you don’t have to edit any code.
Just note that Universal Analytics will sunset on July 1, 2023, and you won’t be able to track your website data after the sunset date. We highly recommend that you set up a Google Analytics 4 property today and start sending data to GA4.
To set up dual tracking, you can start by going to Insights » Settings from your WordPress dashboard and then click the ‘General’ tab.
After that, scroll down to the ‘Google Authentication’ section.
Under the ‘Dual Tracking Profile’ field, you can enter the Univeral Analytics (UA) code.
You can find the Universal Analytics code in Google Analytics by going to the ‘Admin’ settings page.
After that, click on ‘Property Settings’ under the Property column.
You’ll see the ‘Tracking Id’ in the following format: UA-123456789-1.
You’re now successfully tracking Universal Analytics with Google Analytics 4 on your WordPress site. Remember, it will take Google Analytics some time before showing your stats.
The best part about MonsterInsights is that you can view your Google Analytics reports inside your WordPress dashboard. Simply visit the Insights » Reports page to check out a quick overview of your analytics data.
It also comes with a Popular Posts addon that allows you to show your top-performing content to boost your traffic and pageviews.
You can use it to automatically add inline popular posts links to boost engagement.
If you’re using an online store, then it can also automatically add your top-performing products at the end of each blog post to boost sales:
Note: MonsterInsights was formerly known as Google Analytics for WordPress by Yoast. WPBeginner’s founder, Syed Balkhi, acquired the plugin in 2016 and rebranded it to MonsterInsights. Now it is part of our family of premium WordPress plugins.
Method 2. Insert Headers and Footers Plugin
This method is not as good as MonsterInsights because you will not be able to do advanced tracking configuration, and you will not be able to view Google Analytics data in your WordPress dashboard.
First, you will need to copy your Google Analytics tracking code (Global site tag) that you copied in Step 4 earlier when creating a Google Analytics account.
You can find it in the Web stream details under the ‘Tagging Instructions’ section.
Next, you need to install and activate the Insert Headers and Footers plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, you need to visit the Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics tracking code that you copied earlier into the ‘Scripts in headers’ section.
Don’t forget to save your changes to store your settings.
That’s all, you have successfully installed Google Analytics on your site.
3. Install Google Analytics in WordPress Theme
This method is for advanced users who are familiar with the code. It is somewhat unreliable because your code will disappear if you switch or update the theme.
We almost never recommend using this method.
If this is your first time adding code to your WordPress files, then you should check out our guide on how to copy paste code snippets in WordPress.
First, you will need to copy the Google Analytics tracking code that you copied in Step 4 earlier. You can view it in the Web stream details section under the ‘Tagging Instructions’ section.
Now there are two common ways to add this code to your WordPress theme files. You can choose either one of them (not both).
1. Add code in header.php file
Simply edit the header.php file in your WordPress theme and paste the Google Analytics tracking that code you copied earlier right after the <body>
tag.
Don’t forget to save your changes and upload the file back to your server.
2. Add via Functions File
You can also add Google Analytics tracking code to the WordPress functions file. It will then automatically add the tracking code to every page on your WordPress site.
You will need to add this code to your theme’s functions.php file.
1234567<?phpadd_action('wp_head', 'wpb_add_googleanalytics');function
wpb_add_googleanalytics() { ?>
// Paste your Google Analytics tracking code from Step 4 here
<?php } ?>
best free google analytics plugin for wordpress 2020
MonsterInsights
A Google Analytics plugin for WordPress helps to make data-driven decisions that help to increase sales. If you check the stats of the site on a regular basis, then you can know the traffic source of the site. The necessary measures can be taken for site growth.
The advanced tracking features in the plugin and the customizable reports allow you to take necessary actions in the WordPress dashboard. The advanced tracking of events, e-Commerce, etc. can be done with ease without taking much time.
Behavior Report lets you know about the keywords working in favor of the website. In addition, the report shows the referrer of the site as well as how your site is discovered. In a similar manner, you can explore other reports to know the situation of an audience, content, e-Commerce, etc. on the site. Furthermore, the search console report is useful in tracking the site ranking, so that you can constantly focus on-page optimization.
If you want to find out the best performing statistics depending on time, author, categories or tags, then it helps you. In addition, it lets you analyze the performance of focus keywords and SEO score.
ExactMetrics
If you are tired of writing code or hiring a developer to set up tracking of website, then ExactMetrics solves this problem for you. The live statistics of Google analytics appear in the dashboard which helps to make data-driven decisions.
You can add the advanced tracking options related to events to check user behaviors. In addition, there are other tracking options related to file downloads, outbound links, authors, ads, affiliate links, custom fields, referrals, and many more.
The custom reports can be used to check the performance of the site in the search console, e-Commerce, etc. The plugin has integration with various Google analytics tools. This is the reason that it is active in 1 million sites.
GA Google Analytics Plugin for WordPress
The plugin has multiple features and it is fast as it is lightweight. It adds tracking code in all desired pages either in header or footer. The setting of the plugin allows you to create a custom markup with different panels that can toggle.
There is no need to track own statistics when you open or close your own site. There is a provision to disable the tracking of admins so that the data are more accurate. The tracking code is customizable that can be also enabled from the admin area.
Woocommerce Google Analytics Integration
As the name suggests, the plugin integrates WooCommerce with Google analytics. If you want to provide a referral link at the time of purchase, then the plugin allows it. In addition, you can add the transaction information in the Google analytics data for making data-driven decisions.
Furthermore, it supports the advanced e-Commerce event tracking that helps to increase the conversions.
You can have a look at Best Free WooCommerce Plugins.
Analytify WordPress Google Analytics Plugin
There is no need to copy any Google Analytics code manually while you add a tracking code to the website. The statistics are available in its own dashboard, frontend and in the backend too. It makes statistics tracking simple for posts, pages as well as custom post types.
The statistics include traffic coming from top cities, countries, referrers, etc. Furthermore, you can change the appearance with the help of custom CSS. You can focus on your top keywords and average time on site to study the nature of the visitors.
In addition, you can get full features in the premium version of this plugin. Both the simple and advanced shortcode is available to check the custom statistics as well as the real-time statistics of the site is available in the dashboard.
Check the Best Free WordPress Plugins as well.
Conclusion
Let us know your thoughts in the comment section below.
Check out other publications to gain access to more digital resources if you are just starting out with Flux Resource.
Also contact us today to optimize your business(s)/Brand(s) for Search Engines