Launching Mailchimp Popup on Click

When I added an email newsletter to this site, I wanted to have a link for readers to subscribe. I’m using MailChimpto send the emails and they provide a few options for the destination of that link:

  1. Dedicated subscribe page, hosted by MailChimp.
  2. Automatic inline popup, which appears a specified amount of time after arriving at the site.
  3. An API to roll your own solution.

The first option works, but feels disconnected from the site.

The second option is a mixed bag. The popup is nicely designed and keeps the reader connected to the site by appearing over the page. It’s also evil by appearing automatically, and I wish MailChimp wouldn’t encourage this sort of behavior on the web.

The third option just requires work. I’m not willing to put in the time to make it look and feel as good as the MailChimp provided popup.

The second option was exactly what I wanted, except for it appearing automatically. So, I set out to use the pop-up that MailChimp provides, but have it only appear after a user has clicked a link. This way the reader’s experience isn’t interrupted.

A quick bit of searching online, and Stack Overflow had the answer (as always). Two new click handlers are required, but overall an easy fix.

See how it works by clicking the “Email” subscribe link in the sidebar.