Streaming live at 10am (PST)

Mailchimp Integration issues

Hi,

I have a form with Email Address and a phone number; i’ve followed the instructions exactly as described in the instructions, but upon submitting a form on the published page, it states something went wrong. Can anyone please help? I’ve got the action and methods setup correctly as far as im aware.

https://preview.webflow.com/preview/test-8c962c?utm_source=test-8c962c&preview=dc1aac3b32a32db88a8127c8d0492920

Looks ok on my end, can you share your staggered webflow domain please?

I know that you’ve said you’ve done it before, but I really recommend you going over the settings both in MailChimp as well as in Webflow:

Please. follow every step and double-check each one from the link below:

This is the published domain: test-8c962c.webflow.io

The form works if the whole mailchimp code is embedded instead of using webflow’s form block.

Is there a similar solution for MailerLite ?

I think you need the field “name”

Not in the Webflow university.

Maybe you’re forgetting some details, as setting the correct Action URL? Setting the email as required? Having a field called FNAME?

Hi, I’m running into a similar issue with the Webflow/Mailchimp integration.

Minimal sample site is here, set up per the Webflow University episode: https://form-test-94b795.webflow.io/

If I post to Mailchimp using Postman with the data that Webflow generates, I get a (sort of) valid response:

?({"result":"success","msg":"Almost finished... We need to confirm your email address. To complete the subscription process, please click the link in the email we just sent you."})

Note that this is jsonp including the ‘?’ that was provided as the callback function name - I’m unclear why exactly Webflow is using ‘?’ for this, or how it plans to parse ?().

When Webflow receives this response in submitMailChimp(data) however it results in a jQuery ajax parsererror, as jQuery expected an ‘anonymous’ function as the callback which is then never called:

fail parsererror Error: jQuery331005864688326717293_1555015853676 was not called

I’m having difficulties crafting the correct jQuery ajax call to succeed with Mailchimp here. I suspect it has to do with this: https://stackoverflow.com/a/11736771, where Mailchimp expects a callback name provided in c=, but jQuery automagically jams it into context=. Not sure how to reconcile this, and if this is indeed the case, how this integration ever worked (which I assume it did/does). Per this answer, the c=? is part of the magic.

Certainly from a debugging perspective it would be nice if the fail handler in the following code was a little more verbose so we could determine if these things are an issue with Webflow or Mailchimp.

      url: url,
      data: payload,
      dataType: 'jsonp'
    }).done(function (resp) {
      data.success = resp.result === 'success' || /already/.test(resp.msg);
      if (!data.success) {
        console.info('MailChimp error: ' + resp.msg);
      }
      afterSubmit(data);
    }).fail(function ( /* why no use of jqXHR, textStatus, errorThrown? */ ) {
      afterSubmit(data);
    });

And as a general comment, I wish all of these email campaign tools would just let us set up a proper CORS header to allow us to leave this easily exploitable jsonp nastiness in the past where it belongs. The awful state of this mess is somewhat summed up in this Webflow source comment: // Use the (undocumented) MailChimp jsonp api.

Thanks for considering!

Well damn.

Just a heads up that after a day of digging into this and trying to figure out what the heck was going on, my issue turned out to be me using the Brave browser which silently blocks cross-site requests (as an ‘ad or tracker’) to Mailchimp, but not other list managers (e.g., ActiveCampaign).

Per my earlier request for better error detection in the webflow form tools, I’d appreciate it if more robust failure handling was in place, especially as more people use ad and tracker blockers.

Thanks for considering!

1 Like

mailchimp API is not working??? what to do??

Well, damn indeed. THANK YOU for bringing this to our attention! I spent way too long trying to figure what the hell I was doing wrong, here. It isn’t the first time I’ve been bitten by Brave—love it, love what it does, and generally want to keep using it—but I have to make a note for myself to check whether “it’s a Brave problem” first.

THANK YOU