Subscribe to Download


(Shamir) #1

What I am looking is essentially "Subscribe to Download: plugin. But I do not want users who has already subscribed to get added to mailchimp again and again. Also if the user is registered with site, he/she need should be able to see the link straight away.

Any help is very much appreciated.


(Anh Tran) #2

I did that manually for my themes like this. Basically, there are some steps:

  • Output the modal HTML in a invisible div, that will open when clicking the link. You can use any popup/modal JS lib like Bootstrap (probably too much) or write your own. In my case, I just write some simple CSS for the modal.
  • When user submit the form, send an ajax request to our plugin.
  • The plugin receives the user email, then adds the email to MailChimp using this library. This library is minimal, small and will auto check for duplicates.
  • After adding the user, return the URL for download
  • On the frontend, the JS gets the download link and redirect user to that page.

That’s all :slight_smile:

Good luck!


(Denis B) #3

I use easy digital downloads for this. There’s a plugin for free downloads that you can use to capture emails for downloads.
It then sends the download link to your email.


#4

There are lots of different kind of plugins that do what you want. Here are some categories and examples:

Mailchimp is pretty smart about this. If you are setting up segments or triggers or whatever, folks aren’t going to get harassed by a bunch of messages. What I mean to say, I wouldn’t worry about adding people to your lists multiple times, Mailchimp will make the best of it.

I am assuming by “registered” you mean logged in. That is a fairly common pattern, but a question occurs to me: will the registered users be signed up to Mailchimp just by visiting the link? If not, then you probably want to make two sections on your site, one for users and one for visitors without accounts.

I know that seems counter-intuitive, but you are talking about “gate keeping”, and it is actually two different pipelines from a technical standpoint.

Finally, how secure do you want your files? If the link to the file is publicly addressable (meaning I can put it in a browser and start downloading it, no password or anything) then your work is cut out for you. However, if you want to lock it down so each person gets their own link or has to log in to see it, well, that is a bit more complicated. Consider your return on that investment. :slight_smile: