Monitoring WordPress User Login History – Why?
Do you know how many users do login on your WordPress website? From where are they doing login and how long do they remain active on your site? Do you want to target your visitor by knowing their geographic locations? Unfortunately, WordPress by default does not provide all these above functionalities. To track these activities, you must either develop your own plugin or use third party plugin.
Through this post I would like to let you know about my free WordPress plugin i.e. User Login History which can help you to track all such activities.
Here are a few reasons for tracking WordPress user login activity can help your site:
Security. If someone does log into your website from two or more different location in very short interval of time, you can take needful steps e.g. temporarily you can block such user’s account to prevent miss use of their account.
Analytics. With help of the tracked data i.e. login time, ip address, browser etc., you can easily decide how and where to spend time and money for your campaign advertisement. This can also help you to generate a good lead and to improve sales.
Time Tracking. If you are running a WordPress website for your employees and you want to track their timings and locations based on IP address, this plugin will be the best one for your need.
I hope that I have convinced you to track all your users’ login activity and now I am going to show you how to do it exactly through my plugin.
How to get User Login Details just after login?
User Login History WordPress Plugin lets you track many attributes of users while they do login.
Here is the list of all the attributes which can be tracked through the plugin:
- Login Time
- Logout Time
- Last Seen Time
- Session Duration: How long user remains active on website.
- User ID
- IP Address
- Operating System
- Current Role
- Old Role – the role while user gets loggedin
- Country Name
- Country Code
- Time zone
Sounds good. Here’s how to use it:
Step 1: Installation
Since this plugin is free and hosted on WordPress.org directory, you should be able to install it directly from your WordPress dashboard:
Step 2: Configuration
Once you’ve activated the plugin, you’ll get a new User Login History tab in main menu of your dashboard sidebar and a new tab under settings menu. You can configure the plugin by going to Settings → User Login History.
In Frontend Options tab, there are two settings:
Columns: You can select the columns that you want to show on frontend listing table.
Pagination: You can enter number records that you want to show on frontend listing table.
Step 3: View login history of all the users in admin panel
Go to Dashboard–>User Login History:
If you need to filter the listing table, you can use the search form.
If you want to manage the columns and pagination for the listing table, you can use screen options given on top right side.
Step 4: View login history of current loggedin user on frontend
To see the records of current loggedin user in frontend, you can use the following short-code either in your template file or in page.
For template file, use this following code:
<?php do_shortcode('[user-login-history]'); ?>
For page, use this following shortcode in description area:
Now visit the page on frontend.
So, this is the end of tutorial and I hope that I explained it very well.
If you have any query, feel free to ask. You can comment on the post.
Thanks for reading the post.