How to Track WordPress Password Usage

PPWP Statistics extension gives you the ability to track password usage. You can see who visited the private content, when and from where they accessed, as well as how many times a specific password is used. All these stats can also be exported to a CSV file.

Requirements:

In this article, we will walk you through the following sections:

View your stats

Navigate to Password Protect WordPress >> Statistics from your admin dashboard.

There are four types of password statistics shown here.

Individual password usage

This table shows you the password usage of individual pages.

  • Total Usage: how many times a page has been accessed with the correct passwords. This number equals all individual password usage.
  • Protection Status: the status of a specific page – protected or unprotected

A post can be protected with multiple passwords. Click on the expand icon next to the post name to see which passwords were used.

  • Type: the type of password – global or roles
  • Total Usage: how many times a specific password has been used
  • Unique IP Addresses: the number of unique IP addresses. This figure can be less than the total usage if visitors use the same IP addresses.
  • Status: the status of a specific password – active, inactive, expired, or deleted.

Click “View Detail” to find out who has used a specific password and when they accessed the protected content.

N/A” refers to users who haven’t logged into your site. Otherwise, their usernames will display under this column.

If you’d like to get more information about non-logged-in users, you need to add an additional field to the password form and then track this piece of information with our Statistics extension.

Sitewide password usage

This table shows who has used a specific password to unlock your private site, when they got access, and where they came from.

  • Username: “N/A” refers to users who haven’t logged into your site. Otherwise, their usernames will display under this column.
  • Total Usage: the number of unique IP addresses accessing your private site. This number could be less than the total usage if users have the same IP addresses.
  • Unique IP Addresses: the number of unique IP addresses accessing your private site. This number could be less than the total usage if users come from the same IP addresses.
  • Status: the status of a specific password – active, inactive, expired, or deleted.
  • Landing Page: where users input a specific password to access your private site.
  • Redirect URL: to where users were redirected after entering the right password. The value will be N/A if there is no redirect URL set at the time users access your site.

PCP password usage

This table shows who has used your shortcode global passwords to access the private content sections.

  • Username: “N/A” refers to users who haven’t logged into your site. Otherwise, their usernames will display under this column.
  • Total Usage: the number of times a specific password has been used
  • Unique IP Addresses: the number of unique IP addresses. This figure can be less than the total usage if users have the same IP addresses.
  • Status: the status of a specific password – active, inactive, expired, or deleted
  • Post Name: the post including [ppwp] shortcode where users input the password. Once being removed, its name will display as “Deleted Content.”

Access Levels password usage

This table shows who has used Access Levels passwords to access your private categories.

  • Landing Page refers to where users enter the password. It could be the main category page or an individual post under that category.

Groups password usage

This table shows who has used Groups passwords and Partial Sitewide passwords to access your private content.

In the Group By dropdown menu, select:

  • Individual to view Group password usage
  • Sitewide to view Partial Sitewide password usage

Click “View Detail” to find out who has used a specific password and when they accessed the protected content.

  • Username: “N/A” refers to users who haven’t logged into your site. Otherwise, their usernames will display under this column.
  • Landing Page: where users input a specific password to access your protected content.

Logic & Limitation

Our extension will get and display the real-time password status whether a password is expired, deleted, or still active. So if there are a lot of passwords on your site, it may cause a timeout or 500 error.

In that case, you should skip checking the password status on the statistics dashboard page. Simply insert this line in your wp-config.php instead.

define( 'PPWP_STATS_SKIP_PWD_STATUS', true);

As a result, all the password status will display “N/A”.

  • These tables will be empty if no one enters your passwords.
  • If you create a duplicate password with the deleted one, their data will be combined.
  • N/A username refers to people who haven’t logged into your site.

Export password data

Since version 1.2.0, Statistics extension enables you to export password usage in CSV format.

Simply select which type of passwords you want to export, then click on the “Export to CSV” button in the top-right corner of the screen.

Timeout error

Sometimes you might get a timeout error message when exporting a large amount of data. You can resolve that error using one of the options below.

Filter data to be exported

Instead of exporting all data, you can select historic data for a certain period of time.

Please note that this feature is available in the “Individual Password Usage” table only.

Increase the execution time

If you need to export all data, simply add the following code snippet to your (child) theme’s functions.php file to increase the export time.

add_filter( 'pda_stats_client_timeout', 'pda_stats_increase_client_timeout', 10, 1 ); 
function pda_stats_increase_client_timeout( $timeout ) { 
      return 30000; // 30 seconds 
}
Lasted updated on October 10, 2021