EastCoastGreenwayAlliance / ecg-map

Interactive map and trip planner for the ECGA
https://map.greenway.org
7 stars 0 forks source link

Wire email form to MailChimp #18

Closed danrademacher closed 7 years ago

danrademacher commented 7 years ago

Here's the form: http://greenway.us11.list-manage1.com/subscribe?u=1912b94880f9bb2c2834cbcf6&id=962cce34d4

And the documentation on how to wire it up: http://kb.mailchimp.com/lists/signup-forms/host-your-own-signup-forms

danrademacher commented 7 years ago

related to #11

clhenrick commented 7 years ago

@danrademacher do we have Greeninfo one we can test with?

I'm not sure if this is working or not after following the Mail Chimp documentation. After submitting my email in the form in webpage via the link you provided above it displays a Captcha asking to verify that I'm a human. Only after I do that do I receive an a confirmation email in my inbox asking if I'd like to subscribe.

When I follow the documentation and add the necessary code to the website, I do not get a confirmation email in my inbox, nor do I know if the ECG Mail Chimp account received my email.

danrademacher commented 7 years ago

Here's a GreenInfo form for testing: http://eepurl.com/cQ6YSL

Admin login is in 1P

List should be here: https://us8.admin.mailchimp.com/lists/dashboard/overview?id=756397

Also called "Form Testing"

clhenrick commented 7 years ago

Hmmm, looks like you need to include some other javascript and CSS libraries? An alternative is to use the Mailchimp API which seems more promising:

https://www.codementor.io/mattgoldspink/integrate-mailchimp-with-nodejs-app-du10854xp

danrademacher commented 7 years ago

If better, go for it! To be honest, I thought docs I originally posted were a bit of a cheatsheet for the API doing exactly what we need. But looking back, maybe more of a hack of existing form (weird that they have this posted on an official Mailchimp site if API better), but anyway probably better to use API methods

clhenrick commented 7 years ago

Ugh, an hour later I happen to find this while debugging:

MailChimp does not support client-side implementation of our API using CORS requests due to the potential security risk of exposing account API keys.

Could set up a proxy somewhere, but that seems like extra work.

clhenrick commented 7 years ago

Appears to be working using the GIN Mailchimp account:

screen shot 2017-06-19 at 5 15 28 pm

Just need to add Mailchimp credentials for those of ECGA, which I opened a separate issue for #28