How to install Google Analytics and track User Engagement in Wordpress
You are able to track your user activity on your WordPress blog site, because it's the most important point to cover because it helps you strategically plan your site for growth.For this purpose, using Google Analytics is most popular. Google Analytics (step by step) on your WordPress blog and how to do it. to track user engagement with it.
HOW TO INSTALL GOOGLE ANALYTICS
1. How to Signup with Google Analytics
Step 1: First you need to create an account on Google Analytics. For this, visit Google Analytics Signup Page.
You will see a screen as below. Or if you already have a Google or Gmail account, then you can use that sign-in. If you do not have a Gmail account, then you will have an account for yourself.
Step 2: Once you finish signing in with your Gmail account, you will be forwarded to a screen like shown below. This is where you will be able to signup for Google Analytics.
Step 3: In next step, there will be a screen with a choice between a website or mobile app. Make sure you select this website as you are doing it for your WordPress site.
It's a great place to start, and it's a great place to start!
Once you have filled in the data, click on the Get Tracking ID button. You will be shown with Google Analytics terms of service.
Step 4: Now you will have a tracking code for your Google Analytics. You should copy this tracking code because you will need it even when installing Google Analytics on your site.
We do not recommend that you use this site as a site.
Now that you have setup a Google Analytics account, let's take a look at how to install Google Analytics in WordPress.
2. Installing Google Analytics in WordPress Theme
This method is for advanced users or we can get developers familiar with code. It is somewhat unreliable because your code will disappear if you switch or update the theme. So, we recommend to take a back-up before doing so.
i) Adding code in header.php file
Simply, you have to edit the header.php file in your WordPress theme. Paste the code you copied in step 4 right after the <body> tag.
Save your changes and upload the file back to your server.
ii) Adding via Functions File
You have another option to add Google Analytics tracking code in WordPress functions file. It will automatically add code to your WordPress site.
You will need to add this code to your theme's functions.php file.
<?php
add_action(
'wp_head'
,
'wpb_add_googleanalytics'
);
function
wpb_add_googleanalytics() { ?>
// Paste your Google Analytics code from Step 4 here
<?php } ?>
Tracking User Engagement with Google Analytics
Google Analytics has a number of options to show you a treasure of data collected from your stats. You can use it to track user engagement or traffic on your site.
1. Tracking Your Most Popular / Visited Blog
The first thing you want to check out is which blog posts and pages are the most popular amongst your users? These are the most traffic.
Figuring out what's on your site can help you plan a content strategy that's already working.
You will find your most popular content under the 'Top posts and pages' section.
2. Tracking Bounce Rate in Google Analytics
Bounce rate is the percentage of users who land on your homepage and decide to leave for a second page and that is a bad thing for a website.
To check your website's bounce rate, you will need to login to your Google Analytics dashboard and then visit Audience »Overview page.
What is the acceptable bounce rate for a website?
Here is a general overview of the bounce rate from acceptable to non-acceptable.
An excellent bounce rate is between 30% and 50%. However, most websites lie between 50% and 70% bounce rate. Bounce rates are better than 70%.
But not all websites have the same average means of bounce rate.
Take a look at the chart below:
3. Tracking Time Spent on Your Website
Another factor that shows us is the amount of time you spend on your site.
If you are looking for a place to stay, you need to be careful.
Google Analytics can show you the average time users spend on your site per session. Simply go to Audience »Overview page, and you can see it in other stats.
4. Tracking Page Views with Google Analytics
Number of Page views per day. Increase in number of page views per session.
Google Analytics shows you the total page views for a given time slot on Audience »Overview page. However, you can also see page views per session.
This helps you to identify which traffic channels you are looking for.
We hope this article guided you on how to track user engagement in WordPress with Google Analytics.










