How to filter your WordPress users by their online status

In this article we are going to look into how you can use the online status of your WordPress users to search, filter and analyze your user activity with the help of Users Insights.

There are many situations when you might need to know when was the last time a particular user was online. Unfortunately, WordPress by default doesn’t provide any kind of information about the user online activity. The Users Insights plugin comes with a few features out of the box that makes it easy to find your recently active or inactive users.

By knowing your WordPress users’ online activity, with the help of Users Insights, you can get instant answers to questions like:

  • Which users are currently online?
  • Which users showed up only once and never came back?
  • Which new users from the last 30 days have not been on our website more than 10 times?
  • Which users signed up 60 days ago, have logged in more than 10 times but haven’t made any purchases (in WooCommerce)?
  • Which of the users that have signed up in the past 30 days have been visiting our website quite often?
  • Which customers have not been active recently? When was the last time they showed up?

wordpress filter users online

Finding who is currently online

Every time a user logs in to your WordPress website, Users Insights will detect the online status of the user and will show a green dot next to his/her username in the Users Insights user table. This is a nice and quick way for WordPress admins to get an overview of all the WordPress users who are currently online on their website.

wordpress-user-online-order-by-last-seen

Finding the users who have been recently online

Besides the detection of the user online status, Users Insights also stores the last time when the user was online. This information is available under the “Last Seen” field. If you are not seeing this field in your user table you can make it visible from the “eye” menu. If you click on the heading of this column, your user list will get sorted, showing the most recently active users first.

wordpress-user-online-order-by-last-seen2

Filtering your WordPress users by their online status

The last seen status is also available in the Users Insights filters. If you select the “Last Seen” field from the filter menu, you will see all the available filtering options for this field. The first option is the “last seen is less than”, which allows you to filter your WordPress users by how recently they were online.
For example applying the filter “Last seen is less than 60 days ago” will show you all the users who have been online in the past 60 days.

wordpress user online last seen less than

The “is more than” option on the other hand, gives you the ability to filter your users who have not been online for a specific number of days. For example, if you want to see all the users who have not been online in the last seven days you can apply the filter “last seen is more than 7 days ago”.

wordpress-user-online-order-by-last-seen-more-than

The “is exactly” filter works in a similar way, but it is more specific – it will show you all the users who have been online exactly 7 days ago.
The “is after” filter allows to filter the users that have been last online after a specific date. For example, if you want to see all the users who have shown up on your website after 1st of November, you can add the filter “Last seen is after 1 Nov 2016”.

wordpress-user-online-last-seen

The “is” and “is before” filters work in a similar way. With these filters you can pick a date on or before which the users were last online respectively.

The “is set” filter will show you all the users who have any value stored in the “last seen” field of Users Insights. Basically, this filter will show you all the users that have been online since you have activated Users Insights on your website.

wordpress-user-online-last-seen-set

The “is not set” will show you all the users who don’t have the online status detected. By using this filter, you can see all the users who have not been online since you have activated Users Insights.

Combining the online status data with other filters

Because the Users Insights filters are stackable, you have the ability to add multiple filters at once. This means that you can combine the user online status data with all the other available Users Insights filters. Here is an example of a filter showing all the users who have been online in the last 80 days, whose location is the United States and have posted at least 1 comment.

wordpress-user-online-comments

Another example is finding the users that have showed up once, but never came back. This can be achieved by using the combination of the “Last Seen” and “Sessions” filters. As we mentioned above, by applying the “Last Seen is set” filter you can find the list of users that have been online since Users Insights was installed. Then just by applying a filter “Sessions is 1”, you can further segment the user list to show you only the users that have one session.

wordpress-user-online-set

As you can see, knowing the online status of your WordPress users and having the ability to use this data to search and filter your WordPress users can be a very useful user management tool. We hope that you will find this article useful and that it is going to help you improve your WordPress user organization and management.