Assign Subscribers to Preselected Groups

This feature requires Manager user level or higher.

Customize your embedded signup form code to automatically put subscribers in groups you choose in advance, what we call "preselected" groups. Preselected groups can help you send targeted campaigns to subscribers without having to manually add subscribers into groups.

For example, if you have different pages for your German, French, and English-speaking customers, you can create signup forms with preselected language groups so that people who sign up on one country's page are added to that country's group.

This is an advanced feature and is recommended for users familiar with custom coding. Contact your developer, or hire a MailChimp Expert if you need assistance.

Below, you'll learn how to modify your embedded form code to automatically add subscribers to visible or hidden groups in your list when they sign up on your website.

Create Your Group

Create the group in your list. Choose to have groups appear As checkboxes, if you want be able to add subscribers to more than one group, or As radio buttons, if you want to be able to add subscribers to only one group. Make sure to leave your group visible in the Form Builder.

Modify Your Form Code

You can modify your embedded form code to hide or show your groups. If you leave your groups visible, subscribers can remove themselves from the preselected group or add themselves to a different group. To keep subscribers from altering their group assignment, use hidden groups.

Hidden Groups

After you've created your group, follow the steps below to modify your form code.

  1. Navigate to the Lists page.
  2. Click the drop-down menu for the list you want to work with and choose Signup forms.
  3. Select Embedded forms.
  4. Choose either the Classic or Naked embedded form, and copy and paste the form code into your website.
  5. To hide groups on your embedded form, scroll or use Command/Control + F to locate the <div> container with the group code, and add the following code inside the opening <div> tag.
    style="display:none"
  6. Locate the <input> tag for the group you want subscribers to be added to automatically. Add the word checked just before the closing bracket to force the form to check the box for your hidden group. Your code should look like this.
    <ul><li><input type="checkbox" value="8" name="group[01245][8]" id="mce-group[01234]-01234-0" checked><label for="mce-group[16521]-01234-0">English site</label></li>

Repeat these steps for each page where your embedded signup form appears, and modify group code as needed. For example, set up a different page for your German, French, and English-speaking customers, and modify the code for each page so customers who sign up from that country's page are added to that country's group.

Hide Your Group in the Form Builder

After you've modified your form code, be sure to  hide the groups in the Form Builder. This prevents other people from seeing or subscribing to your hidden groups when they sign up to your list or  update their profiles from your MailChimp-hosted signup form.

Visible Groups

After you've created your group, follow the steps below to modify your form code.

  1. Navigate to the  Lists page.
  2. Click the drop-down menu for the list you want to work with and choose  Signup forms.
  3. Select  Embedded forms.
  4. Choose either the  Classic or Naked embedded form, and copy and paste the form code into your website.
  5. Locate the <input> tag for the group you want subscribers to be added to automatically. Add the word  checked just before the closing bracket to force the form to check the box for your group. Your code should look like this.
    <ul><li><input type="checkbox" value="8" name="group[01245][8]" id="mce-group[01234]-01234-0" checked><label for="mce-group[16521]-01234-0">English site</label></li>

 

Repeat these steps for each page where your embedded signup form appears, and modify group code as needed.

For example, set up a different page for men and women's clothing, then modify the code so someone who signs up from the women's clothing page defaults to join the women's clothing promotions group but they can also choose from other visible groups.

Was this article helpful?
What can we do to improve articles like this?

Technical Support