1. Home
  2. Knowledge Base
  3. Document Library Pro
  4. Advanced Usage

How to collect a user's email address before downloading a file

Document Library Pro doesn't have a built-in way to require someone to enter their email address before they can download files. This article provides a suggested method for doing this.

The following method requires users to provide their email address before they can access the document library at all. The exact steps depend on your mailing list platform (e.g. Mailchimp, ActiveCampaign, Drip or Campaign Monitor) and this is the usual process:

  1. First, restrict the document library page on your WordPress site from public view so that only people with the direct URL/link can access it. Here are some suggested ways to do this, which you can mix and match depending on the level of security required:
    • Mark the page as 'noindex' to ask search engines not to index it (you should be able to do this with your SEO plugin, e.g. Yoast).
    • Make sure there are no links to the page from your public web pages or navigation menu.
    • Install the Password Protected Categories plugin and use it to restrict access to any or all of your document categories. That way, only people with the password for the category can see the hidden documents.
  2. Create a mailing list signup form and add/embed it in your site. Use clear wording to encourage people to sign up, such as "Join our mailing list to access the document library". (Remember to meet any legislation such as GDPR.)
  3. In your mailing list software, create a welcome email or automation which will automatically be sent to people when they use the form to join your mailing list. This page should contain a link to the page containing the private document library, plus the password if you have password protected it.

Related Articles

If searching the knowledge base hasn't answered your question, please contact support.