How to Track Additional Information for Unlocking Password Protected WordPress Content

In this article, we will show you how to require users to provide additional information, such as their emails or usernames, in order to unlock the protected content.

Requirements:

Add additional field to password form

First, you need to add a field to password form in order that your users input additional information. To do so, navigate to Password Protect WordPress >> Misc tab from your admin dashboard and enable the corresponding option.

If you don’t see this option, please make sure you have installed and activated PPWP Password Suite extension.

Once saved, a new field named “Email” will be added to the password form as shown below.

You can change the label of this field via WordPress Customizer. Simply go to Customize >> Password Protect WordPress Form >> Password Form and scroll to the bottom of this panel.

Change “Email” to whatever you desire, e.g. “Username”.

If you want to change the order of these fields, add the code snippet below to Customize >> Additional CSS section. This sample code will show the password field on the top of the password form.

.ppw-ppf-field-container {
    display: flex;
    flex-flow: column;
}
.ppw-pwd-label {
    order: 1;
}
.ppw-email-label {
    order: 2;
}
.ppw-ppf-field-container input[type="submit"] {
    order: 3;
}

Track users’ additional information

Once this option is enabled, users have to enter their email and password to unlock a protected content. This information will be tracked with PPWP Statistics.

To see recorded data, navigate to Password Protect WordPress >> Statistics from your admin dashboard.

Click on “View Detail” to see who has used your password to unlock a specific content.

If users logged into your site, their username will be shown under WP Username.

It is important to remember that the quick access link will bypass this function. That means if users access your content via a quick access link, they will provide neither email/username nor password. As a result, N/A will display under the “Additional Info” column.

Lasted updated on May 2, 2020