Google Analytics is a great and insightful Google product that gives you deep insights about your site. It’s free, easy and fairly comprehensive. Not only does it tell you number of visits & pageviews, bounce rate (time spent by visitors), keywords, traffic sources, but it goes deeper than that. By tracking all these insights, you can make amends and optimizations to your site and improve them. For example, if visitors are spending more time pages with images, you could make implement more images, which will ultimately improve your bounce rate. Or if you see that a certain type of image (cartoon, stock photo or nature-themed) is doing better than others, you could add more of those to the site. If you are anything like me, you certainly want to optimize your site for greatest gains.
In this post, we will learn how to install Google Analytics in your WordPress site. Not only that, you will be able to view major insights directly from WordPress dashboard. Let’s start.
Set up Google Analytics
Before actually installing the software, we need to sign our site up on Google Analytics. For that, follow the instructions:
- Go to Google Analytics, click on “Sign In” to top-right, then on Google Analytics (you must be logged into your Google account)
- Click “Sign up” button located on the right side of next page
- On the next page, fill in the relevant details about your site & select your time zone as shown in the screenshot
- Click “Get Tracking ID” button. Click “I Accept” to agree to the terms and conditions (who reads them anyway?!)
- On the next page, you will provided your tracking code. Generally people take this code and put them inside the opening <head> and closing </head>. That installs Google Analytics on the site. This is the manual way, but since we are looking to display Google Analytics data within WordPress dashboard, this is not how we will do it.
Now that you have a tracking code, GA for your site has been set up. It’s however needs to be installed on your site.
Install & Activate Google Analytics by MonsterInsights plugin
One of the most popular WordPress plugins has been Google Analytics by Yoast or Monster Insights. Recently though WPBeginner’s Syed Balkhi acquired the said plugin from Yoast and re-branded it suffixed as Monster Insights. The plugin has over 1 million active installs and roughly 11 million downloads. We are going to use this plugin to install Google Analytics.
- First of all, go to Dashboard > Plugins > Add New
- Search for “monster insights”, click “Install Now”
- On the next page, click “Activate plugin”
- Once activated, you should see a new menu added to the bottom left-side panel named “Insights”
Only activating the plugin will get you nothing. We have to integrate it with our Google Analytics property/account we created earlier.
- Now go to Dashboard > Insights > Settings
- Click on “Authenticate with your account” to integrate your Google Analytics property with the plugin
- Upon clicking that button, you will asked the permission for showing data on your site and MonsterInsights will be able to see the data as well, which I doubt they will unless you are Google 😛 and if you were Google, you wouldn’t be reading this in first place which means you are not Google. Oh, I digress.
- Click “Allow” if you mean that
- At this point, you will be provided with an authentication code. Copy and paste the code in WordPress’ Insights section
Google Analytics should have been successfully installed on your WordPress site. Go to Google Analytics and have fun exploring it. The service has more options than I have time to explore. Regardless I will guarantee that you won’t be able to go through it entirely in one sitting.
The way we installed Google Analytics enables us to view visits, bounce rate and basic data directly from WordPress dashboard. Just go to Insights > Dashboard. Have fun!
I hope you like this tutorial and learnt how to install Google Analytics the smart way.