Latest SeedProd News

WordPress Tutorials, Tips, and Resources to Help Grow Your Business

How to Track Logged In WordPress User Activity

How to Track WordPress User Activity with Google Analytics 

Written By: author image Stacey Corrin
author image Stacey Corrin
Stacey has been writing about WordPress and digital marketing for over 10 years and on other topics for much longer. Alongside this, she's fascinated with web design, user experience, and SEO.
     Reviewed By: Turner John
reviewer image Turner John
John Turner is the co-founder of SeedProd. He has over 20+ years of business and development experience and his plugins have been downloaded over 25 million times.

Do you want to learn how to track the activity of logged-in users on your WordPress website? With accurate WordPress user activity tracking, you can easily see what logged-in users are doing and which device they use to access your site.

While it might seem difficult to track user activity, it’s with the WordPress activity log plugin. In this article, we’ll show you how to track WordPress user activity in Google Analytics with the best tracking plugin for the job.

Before we start, let’s get to the bottom of what WordPress user activity actually is.

What Is WordPress User Activity?

When we talk about WordPress user activity, we’re referring to the different things that users do when they interact with a WordPress site. This can include things like user logins, failed login attempts, creating or editing content, leaving comments, updating user profiles, and so on.

WordPress core has a built-in system that lets administrators keep track of this user activity. So, every time a user does something on the website, that action gets recorded in the wp activity log. The log will include things like the date and time the action was taken, the user’s IP address, and what specific action they took.

These user activity logs are helpful for website admins to track what’s going on with their site. For example, if a user is making changes to content, the admin can use the log to check they’re following the site’s guidelines and policies.

There are also plugins available that can extend the functionality of these logs, giving admins even more detailed information and analytics about user behavior on the site.

For example, if you run a community WordPress site where users can register an account, such as an eCommerce site, membership site, or forum site, you can use Google Analytics to track individual users.

You can do this by enabling individual user ID tracking in Google Analytics, which is what we’ll focus on in this guide.

But before we dive into the steps, let’s explore how WordPress user-activity tracking can help you in a little more detail.

WordPress User Activity Helps Track Data Accurately

With WordPress user activity tracking enabled, you can keep tabs on individual users, regardless of which device they use to log in.

Instead of using the Client ID, Google Analytics will use the WordPress User ID to identify registered users.

The Client ID describes the unique device people use to engage with your content. So if a single person uses 2 different devices to browse your website, it’s recorded as 2 different users instead of 1.

On the other hand, the WordPress User ID represents just one user, even if they use multiple devices.

For example, if someone arrives on your website through a social media campaign on their phone, then completes a conversion like purchasing a product from their desktop, you can link that conversion back to the original campaign as a single user to understand their journey better.

WordPress User Activity Helps Tailor User Experience

You can also use WordPress user activity tracking to learn what each user does on your website. Then you can use that data to offer each person a more personalized experience. 

Let’s say a specific user added several products to their shopping cart but abandoned it before completing the purchase. Later you can find their contact details from your WordPress admin panel and send them an email with a special discount to check out.

It’s also possible to use logged-in user activity tracking to offer content tailored to individual user’s interests to boost your conversions. For example, product suggestions based on previous purchases, etc.

Now that you know the benefits of WordPress user-activity tracking, let’s explore how to implement it in Google Analytics.

How to Easily Track WordPress User Activity

The easiest way to track logged-in WordPress user activity is with the MonsterInsights WordPress plugin. MonsterInsights is the best Google Analytics plugin for WordPress, and it lets you replace the anonymous Client ID with the WordPress User ID with a few clicks.

What’s more, it integrates with popular membership plugins like MemberPress to better track and manage your registered users.

Note: MonserInsights offers a free version. For this guide, we’ll use the premium version, which has more advanced features than the free plugin.

Follow the steps below to enable user activity tracking for WordPress using MonsterInsights.

1. Install and Connect MonsterInsights

MonsterInsights best WordPress Googel Analytics plugin

First, click here to get started with MonsterInsights. Then upload and activate the plugin on your website. If you need help, you can follow this step-by-step guide to install a WordPress plugin.

Once the plugin is installed, you need to connect MonsterInsights to your Google Analytics account. The process is pretty straightforward and doesn’t require any coding knowledge.

To get started, click on Insights » Settings from your WordPress dashboard menu. Under the Google Authentication heading, click the Connect MonsterInsights button.

Connect MonsterInsights to Google Analytics

On the next screen, choose the Google account you’d like to connect.

 Choose which google account to connect to MonsterInsights

Next, click the Allow button to give MonsterInsights access to your Google Analytics data.

Click Allow to give MonsterInsights access to your Google Analytics data

After that, choose the website profile you want to authenticate and click the Complete Connection button.

Choose which website profile you want to connect with MonsterInsights

Now that you’ve properly connected MonsterInsights with Google Analytics, you can move on to activating user tracking.

2. Activate User Tracking in MonsterInsights

For this step, you need to ensure the eCommerce addon is installed and activated in MonsterInsights.

To do that, navigate to Insights » Addons and find the eCommerce addon. Then click Install and Activate.

Install and activate the MonsterInsights eCommerce addon

Next, to enable user tracking in MonsterInsights, navigate to Insights » Settings from your WordPress dashboard and click the eCommerce tab at the top of your screen.

Click the eCommerce tab on the MonsterInsights settings page.

Then scroll to the User ID Tracking section and turn the Enable User ID Tracking toggle to the on position.

Enable User ID tracking in MonsterInsights

After that, click the Save Changes button at the top of the page.

3. Enable User Tracking in Google Analytics

Once you’ve enabled user tracking in MonsterInsights, you also need to enable the same feature in Google Analytics and create a new User ID View.

To do that, log in to your Google Analytics account and click the website where you’d like to enable user tracking.

 choose a website in your Google Analytics account to set up WordPress user tracking for

Next, click the Admin button at the bottom-left of the page.

Click the admin button in google analytics

Now, click the Tracking Info link in the middle column, and click the User ID link below.

Click the tracking info heading and then the User-ID link in Google Analytics

Now, a new area expands, revealing the User-ID Policy. To agree to the policy, turn the switch from the OFF position to ON and click the Next Step button.

Agree to the Google Analytics User ID  Policy

On the next page, you only need to click the Next Step button.

You don't need to do anything next apart from clicking the Next Step button

For the following screen, click the Create button to create the User ID View.

Click the create button to create the User ID View in Google Analytics

The next screen asks you to enter a Reporting View Name. It’s good practice to add “User ID” somewhere in the name, so you know which view has user tracking activated.

You also need to turn the Show User ID Reports button to the ON position.

Name the User ID view and turn on User-Id Reports

After that, you can click the Create View button.

Click on the Create View button

In Google Analytics, you’ll see a quick success message, then it will revert to the Admin screen.

Explore your new user ID view in Google Analytics

Finding WordPress User Activity Reports in Google Analytics

It’s important to note that you won’t see any data in the User ID view right away. It can take up to 24 hours to collect data, and it won’t include any data from the past. However, Google Analytics will start gathering information now so you can see it in the future.

When you want to view WordPress user activity data in Google Analytics, you can see it in the user activity tracking reports.

To find the reports, click the Google Analytics logo at the top of your screen.

 click the google analytics icon at the top of your screen.

Then click the User ID view you created earlier.

Choose your newly created user id view

As you can see below, each user is listed with their WordPress user ID.

Users are now listed in google analytics with their WordPress user id

After that, click Audience » User Explorer to see your user data.

Click audience then user explorer to view your data

Clicking each User ID reveals more information about each person.

Clicking each user ID shows information about each session on your website

If you want to match a particular User ID to the right WordPress user, simply head to your WordPress dashboard and navigate to Users » All Users.

Next, hover your mouse over the user whose ID you want to find. Doing so reveals a URL at the bottom of your browser.

hover your mouse over a WordPress use to find the user ID number in the url at the bottom of your screen

Near the middle of that URL, you’ll see this phrase: “user_id=.” The number after the phrase is the user’s ID number.

You can also click Edit on a user to show the same URL in your browser’s address bar, as demonstrated below.

You can click edit on any user to view the WordPress user id in the address bar.

Prefer a Simpler GA4 Dashboard?

If you’re looking for a quick and easy way to view your Google Analytics 4 data, check out OnePageGA. It provides a simplified, one-page dashboard with all the key metrics you need to grow your business website.

OnePageGA Simple, easy to understand one page Google Analytics 4 Dashboard

Say “Goodbye” to complicated GA4 reports and “Hello” to easier analytics!

Get a 14 day free trial one OnePageGA today.

That’s it!

You now know how to track and find logged-in WordPress user activity successfully. This will not only make it easier for you to correctly track how people use your website but also tailor their experience to drive more conversions for your business.

If you’re interested in more ways to improve user experience and drive more leads and sales, check out this guide on how to customize the WordPress login page.

And don’t forget to follow us on Facebook and Twitter for more helpful tips and tutorials.

author avatar
Stacey Corrin Writer
Stacey has been writing about WordPress and digital marketing for over 10 years and on other topics for much longer. Alongside this, she's fascinated with web design, user experience, and SEO.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. We only recommend products that we believe will add value to our readers.