How to track user activity in WordPress

WordPress user activity tracking is the process of monitoring and recording the actions and interactions of users within a WordPress website or content management system. This tracking can involve collecting data on user behaviors, such as page views, login and logout events, content edits, comments, form submissions, and more.

How to track user activity on a website?

User activity tracking in WordPress is often implemented through plugins or custom code that captures and stores relevant data, which can then be analyzed and reported to gain insights into website usage and security. This information can help website administrators make informed decisions, enhance security, and improve the user experience.

How you are going to measure your users activity essentially depends on the metrics that matter the most for your type of website.

An insight into your user activity is essential for higher conversion rates and increasing revenue. By understanding how each of your website’s users engage with your content, you can tailor future content on your site to better serve each individual customer.

WordPress user page visit counts

In this guide, we will show you how to track user activity on your WordPress site and how you can learn more about your audience and figure out how they’re using your website.

How to track user activity wordpress

User activity in WordPress can be tracked through activity tracking plugins like Users Insights, custom code, and integration with tools like Google Analytics, event tracking, and integration of specific e-commerce tracking features.

How you are going to track user activity and thereafter measure your users activity essentially depends on the metrics that matter the most for your type of website. For blogs or any kind of website where the content is the product, user activity is usually measured by the number of times a particular user has visited the website or the time he has spent exploring and reading the content of the site.

woocommerce abandoned cart report profile last seen

What are the different ways to track user activity in WordPress?

Tracking user activity in WordPress can be achieved through various methods, including plugins and custom code. Here are some common ways to track user activity in WordPress:

  1. Activity Log Plugins: Use plugins like “Users Insights”, or if you want to track activity with more basic features, you can use free versions of WordPress plugins like “WP Security Audit Log”, “Simple History”, “Activity Log plugin”, and “WP Activity Log”, to monitor user actions, check user login events, and content changes with user-friendly dashboards.
  2. Google Analytics: If you are into all website visitor tracking and not only user tracking, you can Integrate Google Analytics for insights on page views, traffic sources, and overall site performance.
  3. Custom Code: Develop custom PHP and JavaScript scripts to track specific actions, such as form submissions and button clicks.
  4. Event Tracking: Set up event tracking to monitor interactions like video views, file downloads, and link clicks.
  5. Login Security Plugins: Enhance login security and track login attempts with dedicated security plugins for WordPress
  6. Heatmaps and Session Recording: Use tools like Hotjar or Crazy Egg to visualize user behavior through heatmaps and session recordings.
  7. E-commerce Plugins: Utilize features for plugins like WooCommerce to monitor product views, cart additions, checkouts, and purchases.
  8. Server Log Analysis: Analyze server logs for technical data, including user requests and IP addresses, to identify issues and security threats.

The choice of method should align with your specific goals, whether it’s security monitoring, content auditing, user engagement analysis, or e-commerce performance optimization.

How to find active users with the Users Insights WordPress plugin

Many different parameters can be used to track user activity, but the two most important metrics that show your WordPress users’ activity are the user logins, sessions, and online activity. Our main goals for today are:

  • How to see which users are online
  • Understanding the last seen field
  • Showing the number of sessions
  • Average number of sessions
  • Page visit tracking
  • Combining multiple filters for better segmentation

How to see which users are currently online

Timing is everything when it comes to business. So, creating last time offers or interacting with your users as they are online is very compelling.

The sense of urgency added to contact done as your users are online is much higher. Also, it’s nice to know how many users you have online over different periods of the day.

If you have Users Insights installed, you can see that by the online activity icon:

wordpress online users

For a broader view, you may plot how many users you have over time to compare and see how that’s evolving.

Understanding the last seen field

Even though you may track your users down, you won’t see them every single time they log in. That’s when you can look for their latest WordPress activity with the “last seen” field.

The last seen field, as the name suggests, shows when the user has last visited your site (while logged in). You can easily order the users list table by “last seen” to see which users have been active most recently.


wordpress last seen user

This field allows you to not only see your user login history but also to order them by that. You can see the users who haven’t logged in for a long time by clicking the column title:

Order by last seen

This information is very valuable as you can remind them about your site. In this way, you may recover a potentially lost user. And using the reverse filter (most recent logins first), you can see your most active users. Therefore you could reward the most active customers and try to regain the least active ones.


Showing the number of sessions

Although the Last Seen information is useful, it is limited as you won’t know how often these users visit your site. Using the number of sessions column will allow you to gather this information.

The number of sessions field shows how often a user has visited your site (while logged in). Every time a user visits your WordPress website, the plugin will update the user activity log by one, meaning that the WordPress activity log will show the total number of sessions a specific user has made. Ordering your users table by the number of sessions gives you a simple and quick way to monitor the user activity of your most active users right from the WordPress dashboard. You can do this by clicking on the sessions field in the Users Insights table.

wordpress user sessions

Now you’ll know how often every single user visits your site. As well as with the last seen column, you can order your users by the highest or lowest number of sessions.

This information will tell you the most active users of your site. This, in combination with the last seen filter, can help you understand your WordPress user login history. For example, you can check how many sessions your most recently active users have.

Using smart filters, you can easily further segment your users’ data and get more detailed results. For example, if you want to see the list of users with more than 50 sessions on your WordPress site, all you need to do is add a session field filter and set the condition to be bigger than 50.

filter wordpress users by activity


Average number of sessions

An average is a good way of understanding your data. But there is no easy way to get an average number of sessions for your users. So we’ll need to create our own.

In our example, we will check how many users logins per 30 days (month). For that, we’ll need a few ingredients. The first one is the date registered. This way, we’ll know how long this user has been around.

Then we’ll also need the number of sessions, as that will be divided by the number of days registered. So this is our final view:

Date registered for users

We can use spreadsheet software to get the average, so you must export these users with this data. Then, create a new column for this number.

Now, we need to divide the number of sessions multiplied by 30 by the number of days registered. This is our final result:

Average sessions for users

Page visit tracking

Another way to monitor user activity is by tracking which pages they are visiting and how often. When enabled, this feature will record the visit in the custom event log every time a user visits one of the tracked pages (independent of which WordPress theme you use). This allows you to find all the users who have visited a selected page or post.

WordPress filter users by visited pages

Also, you can explore the total number of page visits that Users Insights has in the activity log record for each user. You can easily filter and sort the table to find the most or least active users in terms of page visits:

WordPress user page visit counts

Combining multiple filters for better segmentation

You can combine two or more filters to create a more specific user list and to further segment your users’ data. For example, having the number of sessions for each user can be helpful, but this doesn’t show if that user has been active recently. Combining the “last seen” filter gives you more precise results. Now you can make a filter that shows you all of the users that have more than 15 sessions and have been active in the last month.

wordpress active users

There are various situations when knowing who the most active users on your website are can be an instrumental piece of information:


  • Maybe you need some customer testimonials for your website from the customers who use and love your product
  • You might want to run a survey and ask your users to provide some valuable feedback about your products or services
  • You are planning to run a social media campaign and need some love from your customers
  • You are launching a new product and need to find people who are willing to do beta testing for you
  • Or simply you want to reward your most loyal customers by giving some discount coupons or exclusive offers

Here is a short video showing how to find the most active users that have been active in the last 30 days:



If you run an online store, you are probably also interested in your users’ shopping activity. The WooCommerce module of Users Insights allows you to track and analyze your customers’ shopping activity. You can search and explore your customer purchase history and filter your customers by ordered products or lifetime value. Unlike other analytics services like Google Analytics, Users Insights is a WordPress plugin that works locally inside your WordPress dashboard to pull the data from your WordPress website automatically.

When running a membership website or a community forum, you are going to be more interested in the activity of content creation and communication with your users. To track and analyze this kind of activity, we need to be able to search and filter our users by the content that they have created. If you are using BuddyPress, you can check our tutorial about how to track and analyze your BuddyPress activity.

Whatever the reason is, the Users Insights plugin makes it easy to find your most active users. Because these are the users who show greater interest in your product, they are going to be more willing to participate in any activity that involves your website or products.

What is the primary goal of user activity tracking?

The primary goal of WordPress user activity tracking is to monitor and record user interactions and behaviors within a WordPress website, focusing typically to:

  1. Security: Detect and prevent unauthorized access or suspicious activities on the website, such as multiple failed login attempts or unusual user behavior.
  2. Auditing: Keep a record of changes made to the website’s content, including who made the changes, when they were made, and what specific modifications were implemented. This is important for accountability and compliance purposes.
  3. User Engagement: Analyze user interactions and behaviors to gain insights into how visitors engage with the website’s content, helping site owners make informed decisions about improving user experience and content.
  4. Website performance Optimization: Monitor website performance and user load to identify potential issues or bottlenecks affecting the site’s speed and responsiveness.
  5. E-commerce Performance Optimization: This includes analyzing user behaviors like product views, cart additions, checkouts, and completed purchases.