Finally there is a simple way to create password protected landing pages for Mautic. Can you imaging cheaper way to craft an intranet page? I can’t. In fact I’m sharing 2 different ways to do it.
This tutorial contains 2 different ways to create a password protected landing page in mautic. The first method is public, the second one is for PRO subscribers only.
Create password protected pages for Mautic
We can utilize built-in Mautic features to create our password protection using a landing pages, dynamic content, a form, a custom field and a campaign. If you are a programmer, then this method is not unusual:
1. Create a custom field for password
First we will create a custom field, where we store the password for each user. It should be a text field, nothing fancy. I named it password.
2. Create a login form
Our login form will be just another form with some special settings. It will have 2 fields: email and password:
The Email field will be hidden if known, this way we can make sure the users won’t overwrite their previous values. Also make sure it’s mandatory.
The Password field will have some unusual settings. It will be Password field type. We never autofill this data. That is super.important.
3. Create 2 dynamic web contents for the logged-in state and not logged-in state.
The first Dynamic Web Content we create is for the case, when someone is not logged in yet. We inform the person to log in, and display the form above. My form ID was 92.
We have to watch the followings:
- We add the form, so people can log in
- We need to define the slot name
- The content must not be campaign based! This way we can set the filter tab:
You can also use combination of emails and passwords as well if you like, I only added one for the purpose of this tutorial.
Now let’s create the second content, which will be the protected one:
This is our protected content. We give another name to the the slot and make sure it’s not campaign based. Our filter is exactly the oposite of the one above:
In other words: if the Password field entered in the form equals the Password I’ve chosen, then the person will be able to see this content.
4. Our Protected landing page
Now it’s time to create our landing page and place our dynamic content on it. But which one? Both of course. The logic filter dictates, that only one of them will be visible since the password is either good or bad.
We can place the embed code for both dynamic contents on the landing page:
<div data-section-wrapper="1"> <center id="if8r"> <table data-section="1" width="600" cellpadding="0" cellspacing="0" id="irwu"> <tbody> <tr> <td id="i17i"> <div data-slot="dwc" data-param-slot-name="content1"> <h1> </h1> </div> <div data-slot="dwc" data-param-slot-name="content2"> <h1> </h1> </div> </td> </tr> </tbody> </table> </center> </div>
5. Testing time
If you test the page in the same browser as you are logged in into Mautic as admin, you won’t see anything. You need to use another browser to be able to display the dynamic contents.
You should see something like this:
After successfully submitting the login information the hidden content is shown:
6. Let’s make it more secure!
Of course this is no industry grade security behind this, but we can still make it more secure. A coder would give an expiry to the password, and we can do the same thing in Mautic too.
Let’s create a segment with contants having a password value saved:
Now we can delete the password value after 2 hours for example. We can’t delete, but we can overwrite the contact’s password with dummy data:
Make sure your contacts can restart campaigns!
Congratulations, your password protection is done.
But is there a more elegant way where we don’t have to create a bunch of dynamic fields, and we can just choose any landing page to be password protected? For sure there is! The following tutorial is for PRO members only:
Let’s have another approach!
Our plan is to create a system, where any landing page with ‘intranet’ in the URL would be password protected. No forms, no dynamic contents, no segments, no campaigns. Just works.
Upgrade now and wee the PRO tutorial how to password protect landing pages just by adding intranet to the landing page alias! That easy!
Do you have other ideas of password proofing your landing pages? Leave a comment!