Home » News Room » How To Setup Google Analytics On WordPress
Setting Up a WordPress Website is not enough for you to track the visitor’s data. You must configure Google Analytics properly. Don’t skip just scroll down slowly and you will learn how to setup google analytics on WordPress.
Google Analytics is a web based service that allows users to track visitors or user’s data. You can configure analytics on a website or app (Android or IOS). First, you need to create an account in Google Analytics. If you already have a Google account then you are done. If you don’t have Google account then first create a Google account.
Let me show you how to sign up on Google Analytics and Add property.
Visit Google Analytics homepage and click on the “Start measuring” button. Now it will redirect you to the sign-up process.
There are three steps to complete your registration. The first part is account setup, second is property setup, and third is about your business. When you finish your data submission, click on “Create” button. A popup with “Terms of Service” will appear. Just check and click continue. Enjoy the following screenshots and you will get it.
Now it’s time to get the tracking code for website. You will see “Data Streams” option like the following screenshot.
Click on your website streams. You will see “Global Site Tag (gtag.js)” option there. Click on this option and copy the code or keep this code open in your browser tab.
I recommend you to install a Child Theme on your website. Then log in to your Website Cpanel or FTP. Navigate to wp-content> Themes> Your Active Child Theme.
Upload your header.php file inside child Theme. Edit the header.php file and find out the <head> tag. Now paste the “Global Site Tag” code inside <head> tag.
[Note: If you use any blank page template, then Google will not track visitor of this page. Because a blank page template doesn’t contain any header or footer. I am just recommending you to put the “site tag code” in the header because generally, we use a dynamic header for all pages and posts. There is a problem if you update the main Themes header.php file. When you will update the Theme in future, you have to place the Google Analytics code again. ]
MonsterInsights one of the best plugin that will help you to setup Google Analytics on WordPress website.
Navigate to plugins>Add new, search for “MonsterInsights”. Install and active the first plugin. This is a freemium plugin available in WordPress plugin library. To get basic visitors data, the free version is enough. If you need more data and page target for your website, then you can move to the pro plan.
Start the setup wizard and it will take care of everything. You don’t have to manually insert anything. After starting the setup wizard, just input your all data properly and connect your Google account, which you want to link for Google Analytics.
WordPress.com made it easy for Google Analytics lovers. Inside your WordPress.com dashboard, you will see tools>marketing option. Go to traffic tab and scroll down. There is a dedicated option for Google Analytics. Just paste your Gtag, no need to put the full code.
That’s all about setting up Google Analytics service on your WordPress website. If you are non technical then you can try the plugin as a solution. You will get a lot of visitors data including behavior in Google Analytics. I recommend you to try the manual step first.