So you want to install Google Analytics in WordPress from Scratch? Yes.
First you need to create a Google Analytics account. Ok.
How to Signup with Google Analytics
Step 1: To do this, visit Google Analytics Signup Page.
You will see a screen like the one below. If you already have a Google or Gmail account, then you can use that to sign-in. If you do not have a Gmail account, then you would have to create an account for yourself. Ok then?
Step 2: Once you sign-in with your Gmail account, you will be prompted to a screen like the one below. This is where you will signup for Google analytics with your Gmail account. I’m there.
Step 3: On the next screen, you will be given choice to choose between a website or mobile app. Make sure you select website. Ok.
After that you need to enter account name (It will be the Google Analytics profile name for this website), Website name, website’s URL, country, and the time zone. Ok done!
Once you have entered this information, click on the Get Tracking ID button. You will be presented with Google Analytics terms and service which you must agree to, so click on I Agree button. I’ve selected.
Step 4: Now you will be presented with your Google Analytics tracking code. You can copy this tracking code because you will need to enter it in your WordPress site depending on the method you use below. I see.
Now that you have setup a Google Analytics account, lets take a look at how to install Google Analytics in WordPress. Ok let’s go!
There are many different ways to setup Google Analytics in WordPress. We will show you three different methods:
1. Google Analytics for WordPress by MonsterInsights
2. Insert Headers and Footers Plugin
3. Install Google Analytics in WordPress Theme
The first thing you need to do is install and activate the MonsterInsights plugin. Ok done.
Upon activation the plugin will add a new menu item labeled ‘Insights’ to your WordPress admin menu. You need to visit Insights » Settings to configure the plugin settings. Ok then!
On this screen, you need to click on ‘Launch Setup Wizard’ button to connect Google Analytics with your WordPress site. Ok what next?
This will redirect you to Google accounts where you will be asked to sign in or select a Google account if you are already signed in.Click on ‘Next’ to continue. Yes done!
Now you will be asked to allow MonsterInsights to access your Google Analytics account. Click on the ‘Allow’ button to continue. Ok done!
The final step is to select the profile you want to track. You need to select your website here and then click on the ‘Complete authentication’ button to continue. Yes I’m there.
You will be now redirected back to your WordPress site.That’s all you have successfully installed and setup Google Analytics on your WordPress site. Yeyy!
Remember, it will take Google Analytics sometime before showing your stats.The best part about MonsterInsights is that you can view your Google Analytics report inside your WordPress dashboard. Simply visit Insights » Reports page to checkout a quick overview of your analytics data. Ok!
You can also go in the Tracking tab to customize the tracking settings based on your needs: I see.
You can also view reports on Google Analytics Website. That’s great!
Google Analytics is capable of showing you a treasure of data collected from your stats. You can view this data by visiting your Google Analytics dashboard and clicking on the reporting tab. I see.
Did this resolve your issue?
Yes.
No? Let's try few more solutions.
We help website owners, agency partners and freelancer partners install Google Analytics in Wordpress.
If you’re looking for any help in this, we’ve got your back.
You can either
Choose Your Plan
Or
Schedule a call
to know more.
This method is not as 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. Oh is that so!
First, you need to install and activate the Insert Headers and Footers plugin.
Ok then?
Upon activation, you need to visit Settings » Insert Headers and Footers page. Here you need to paste the Google Analytics code that you copied in step 4 into the headers section. And don’t forget to click on the save changes button to store your settings. Ok done.
You can also view reports on Google Analytics Website. That’s great!
Google Analytics is capable of showing you a treasure of data collected from your stats. You can view this data by visiting your Google Analytics dashboard and clicking on the reporting tab. I see.
Did this resolve your issue?
Yes.
No? Let's try few more solutions.
We help website owners, agency partners and freelancer partners install Google Analytics in Wordpress.
If you’re looking for any help in this, we’ve got your back.
You can either
Choose Your Plan
Or
Schedule a call
to know more.
This method is for advanced users only who are familiar with code. It is somewhat unreliable because your code will disappear if you switch or update the theme. We almost never recommend using this method. I see.
There are two methods to add the code in file.
1. Add code in header.php file
2. Add via Functions File
Simply edit the header.php file in your WordPress theme and paste the code you copied in step 4 right after the tag.Don’t forget to save your changes and upload the file back to your server. Ok!
You can also view reports on Google Analytics Website. That’s great!
Google Analytics is capable of showing you a treasure of data collected from your stats. You can view this data by visiting your Google Analytics dashboard and clicking on the reporting tab. I see.
Did this resolve your issue?
Yes.
No? Let's try few more solutions.
We help website owners, agency partners and freelancer partners install Google Analytics in Wordpress.
If you’re looking for any help in this, we’ve got your back.
You can either
Choose Your Plan
Or
Schedule a call
to know more.
You can also add Google Analytics tracking code to WordPress functions file. It will then automatically add code to every page on your WordPress site.You will need to add following code to your theme’s functions.php file. Ok done!
<?php
add_action('wp_head', 'wpb_add_googleanalytics');
function wpb_add_googleanalytics() { ?>
// Paste your Google Analytics code from Step 4 here
<?php } ?>