Mailchimp's embedded signup forms open up new tabs. We want users to stay on our site after they click the subscribe button. All you need is your Mailchimp User and List id. Install via npm, import module, initialize with your ids — et voilà. You're done.
npm i --save mailchimp-async-form
With Webpack:
import 'mailchimp-async-form';
const mcAsyncForm = mailchimp-async-form('.your-signup-div');
mcAsyncForm({uid, listId});
Vanilla:
Include mailchimp-async-form.{js,css}
.
Insert the embedcode into your markup.
Replace uid
and listId
respectively.
Happiness.
Licensed under MIT. Very much WIP.
(c) FanMatics, Hamburg