Adding google analytics to WordPress is one of the easy gigs that you can start as a freelancer. I have seen many freelancers actively doing this gig in Fiverr. And a earn a decent income by only doing this.
Today I will tell you the step by step approach to add Google Analytics to a WordPress website. Adding google analytics code to WordPress site is not a big deal. Any one who has worked with WordPress can do this gig.
In the first section of the article describes the steps to create a google analytics account. After that you can get the tracking code from the Google Analytics . Then we can discuss on how to add google analytics code to WordPress site.
In this article
1. Creating a Google analytics account and getting a tracking code
2. Adding Account info
3. Setting up Property Info
4. Getting the Tracking code
5. Add the google analytics using WordPress Plugin
How to get a Google Analytics Tracking code?
Visit Google Analytics and signup using Gmail account
Visit the google analytics website first. If you are not already signed in to google, you’ll be asked to login using your Gmail account.
After completing the step you’ll be prompted to a page like below. From here you can signup to the google Analytics.
Click Start measuring and you will be prompted to the account setup page as given below
Adding Account Settings
Start by entering the Account Name. You can Give a name like your business name and click the Next button
Next comes the Property Setup
Adding Property Info
You can give your website name or any name that will represent your website here .
Most Important Point !!!
Before Going to the next step click Show advanced options.
Click and switch on the Create a Universal Analytics Property Button. Add your Complete Website URL.
Tick on Create both a Google Analytics and a Universal Analytics property and Click Next
Most of the famous WordPress plugins supports only universal analytic property.
Next select your website category, business size and the reason respectively.
Most of these data are for google to know the usage of their analytics tools and these selections do not affect your site performance or analytics.
Accept the terms and conditions by google. Click I Accept and proceed.
After that you will get a page like below.
Get the Google Analytics Tracking Code
Click on Global site tag to get your analytics tracking code.
copy the Global site tag. You may need the code if you chose to manually add the code to your WordPress site. Copy the code to a separate notepad or keep the tab open as you need the code in future.
There are 3 main ways to add Google analytics to a WordPress site and I will cover each of them. Based on the client’s need you can select either of them.
1. Install Google Analytics using a plugin for free
2. Insert Google Analytics code using a plugin
3. Insert Google Analytics code manually
I will start with the most common and the easiest one when adding google analytics code to WordPress site.
How to Add Google Analytics to WordPress using a Free Plugin
In this method you don’t have to manually copy paste the generated tracking code. I must say this is one of the easiest way to add google analytics to WordPress. WordPress plugin manages to install it automatically. So without further delay lets get started.
There are different google analytics WordPress plugins. Most Common WordPress plugin to add Google Analytics to WordPress is the MonsterInsights plugin. I can say MonsterInsights is the best google analytics plugin for WordPress. It has the most number of installs and positive reviews.
To install Mosterinsights plugin you can go to the WordPress dashboard plugins section and click add New.
In the search bar search for the word monster and hit enter. First result is Monsterinsights plugin install and activate the plugin
Configuring the MonsterInsights Plugin
After installing and activating the plugin you can see a menu called insights in your WordPress admin panel. Click on it to start setup wizard.
Select the category of your website and click save and continue
Click “Connect MonsterInsights“
This will get you to the Google account login page. Select your account and get connected.
Here you can click allow to give necessary permission to monsterinsights plugin.
From the drop down list select your analytics profile you created to track your website.
After that monsterinsight installs the analytics code in your website. In the next step you can see the recommended settings . Default settings are fine with most of the sites. If you are working with affiliate marketing you can try out these settings.
Next MonsterInsights ask to install WPForms. It’s a great WordPress contact form plugin. Its not a part of analytics installation. You can skip it. Click Skip this step.
You are all set. Click Finish Setup & Exit Wizard.
After that you can view your google analytics from the WordPress dashboard.
But if you want to make the maximum output of the analytics you have to visit Google Analytics site and log with your account. Using google analytics to boost your traffic is a story for the next time.
In the upcoming blogs I will add the other methods of adding google Analytics
Insert Google Analytics code using a plugin
Insert Google Analytics code manually
Monsterinsights does not recognize my analytics profile.
The reason for not recognizing google analytics profile in MonsterInsight is that you have missed to activate the create a universal analytics property when setting up the profile.
Read this section again. Click the advanced option and select it. Earlier Universal analytics property was selected as default. Now you have to select it manually