Mautic Community Forums

If user is already subscribed...

Hi all,



We have a website that is using Mautic to capture email sign-ups to download .pdf files - the user must enter their email address and then they can download the file. However we want to make it so that if a user is already signed up and a Contact, they do not have to enter this information again. What would be the best approach to achieve this?



Thanks

Hi all,

We have a website that is using Mautic to capture email sign-ups to download .pdf files - the user must enter their email address and then they can download the file. However we want to make it so that if a user is already signed up and a Contact, they do not have to enter this information again. What would be the best approach to achieve this?

Thanks

There is a feature called “Auto fill data” which can be configured for form fields. The tooltip explains it pretty well.

Thanks for the reply. Interesting but that’s not wuite what I’m after - is there a cookie I can reference to see whether or not the current user is a contact in Mautic so that the form will not show at al?

I understood what you are after, but I would not recommend that - it does not seem to be failsafe and it would be complex to be built: you need to evaluate the cookies, dynamically display/hide forms or direct download links, you would have to provide login/logout functionality.

Except for sites with real register/login functionality: I have never seen something like that. It is normal to enter your data multiple times or check pre-filled forms and accounts are merged in the backend. This is a way that is almost failsafe und therefore I consider it a best practice.

But it would be great if you kept us in the loop. Maybe you find a way which is both failsafe and convenient. :slight_smile:

[quote=26565:@PeterTL

Except for sites with real register/login functionality: I have never seen something like that.[/quote]

Brian Dean from backlinko.com has this solution. It is probably leadpages soft.

AFAIK Leadpages offers pre-filled fields as Mautic does (with a little difference) but no functionality to recognise leads and hide forms.

Yes, you are right.

On backlinks You need to enter an email. Later, the system checks if you are a subscriber. If so, you can download the file. If not, you must confirm your email.

My mistake, sorry for the confusion.

@cparx, you can do that easily with Dynamic Content and some client-side scripting (JS).

  1. make sure every user you want to address is in a segment

  2. generate a campaign, set its source as Contact Segments (and not Campaign Forms)

  3. put a dynamic request-push pair in the campaign

  4. generate Dynamic Content with some unique predefined text and put it in a hidden div

<div style="visibility:hidden">my_unique_dynamic_div</div>
  1. put the Dynamic Content’s HTML code on your webpage that is Mautic-enabled (mtc.js) instead of the Mautic form that you have now (the one requiring the user to write down the email address)

  2. if the visitor will be part of the segment (defined in 2.) your custom dynamic content will be shown on that page to that visitor

  3. use something like jQuery’s $(document).ready() to check if you custom dynamic content (you can identify by its unique content) exists on the webpage (…indexOf(“my_unique_dynamic_div”) or similar)

8A. if found, put JS code of a form that only includes a “download” button (i.e. dynamically load Mautic form’s JS code in order to show a button-only form that does not require a user to write his/her email)

8B. if not found, put JS code of the form you already have (the one requiring the user to write down the email address)

Best,
d.

@denispavliha, great approach!

Is it possible to put the form’s HTML and JS (or the automatic JS) into a dynamic content element? Because that would make the “workaround” with the jQuery evaluation of the (hidden) content obsolete.

I don’t remember. But I believe that probably the script wasn’t loaded properly, which is why I implemented this workaround.

Or maybe I just assumed it, and you might be right. Dunno. :slight_smile:

You are right, the JS is removed in the dynamic content object…

if you use wordpress you can do something like that with a couple of plugin.

I’m using wordpress + mautic + simple membership plugin

simple membership lets you to protect some pages content based on access level you gave them.

I do the following:

  1. user leave me mail and name

  2. user receive a mail from a campaign based on form subscription with a button that links to a confirm url like this: www.mywebsite.it/registrationpage?email={leadfield=email}&name={leadfield=firstname}

  3. url in point 2 is a link to the registration page of membership plugin (i edited php code of the plugin form page to read the get parameters and autofill email and name so user doesn’t have to write them)

  4. then user will be registered to membership plugin with an access level that can be both free and paid and you can create one or more pages with protected content

if you want to try the free registration, this is my website: www.cittanet.it

Thanks for the answers, some good points made here.

I think the Dynamic Content method is best for this situation but have a couple of questions…(new to Mautic)

  1. I’ve set up a new Campaign with the Segment containing all of our Contacts as the Contact Source.
  2. I’ve made a new Dynamic Content that contains an empty div with a class (“user-is-contact”)
  3. I have added this Dynamic Content as a “Request Dynamic Content” Decision under my Segment in the Campaign Builder. Then as an Action “Push Dynamic Content”.

If I add the dynamic web content shortcode on to the page, will it add the Dynamic Content div with my class “user-is-contact” to the page if the user is part of my Segment? Then I can add JS to fire only if this class is found on the page.

Will this work?

It should, yes.