Thread tagged as: Question, MailChimp

Mailchimp groups

Hi guys

I have a client who runs events, and gives people the option to download a brochure or report by giving their email address, which gets added to Mailchimp for sending updates relating to that event, or general updates.

The way this happens is to create groups within Mailchimp, and then add people to groups relating to the event their interested in - which may mean they're on the list already but need to be added to more than one group if they show interest in more than one event.

The behaviour his site needs to show is this. Someone is interested in an event - they add their email to download the brochure. The site checks whether they're already on the mailing list. If not, they go into the Mailchimp system, and they get the email to confirm their email address. If yes, then they get added to the group for that event, and then get sent the confirmation email with the link to the download page.

Does the Mailchimp app support the ability to add someone to a group within Mailchimp, or otherwise give tools to support the use case described here?

Thanks - Mallen

Mallen Baker

Mallen Baker 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think the Mailchimp app has support for groups.

It doesn't, but if you're happy to tweak a little code here's a workaround to allow for a radio button.

In your form add an input with mailer="group" and id="the grouping id", eg

<perch:input type="radio" id="1285" options="Group one, Group Two, Group Three" mailer="group" />

Then in PerchMailchimp_Subscribers.class.php, at line 55 add this code:

case 'group':
     $merge_vars['groupings'] = array(
               'id' => $fieldID,
               'groups' => array($Form->data[$fieldID])