MailChimp Setup

Overview

This document provides instructions on how to integrate MailChimp with Ultimate Member using the MailChimp extension.

The extension adds contacts to your MailChimp audience when users register on your website. Once you have contacts with data you can start segmenting your audience and create automations or campaigns. Read MailChimp documentation about segmenting, automation and campaigns if you're new to MailChimp.

Contents

Getting started #

Main steps to configure the extension:

  1. Go to MailChimp and create an account.
  2. Create a MailChimp audience.
  3. Copy MailChimp API key.
  4. Go to your site and install the MailChimp extension.
  5. Go to wp-admin > Ultimate Member > Settings > Extensions > MailChimp and paste your MailChimp API key into the field "MailChimp API Key". Save changes.
  6. Go to wp-admin > Ultimate Member > MailChimp and create a connection with the audience. Configure the connection.
  7. Go to wp-admin > Ultimate Member > Forms > Edit Form (register) and add the MailChimp field to the registration form if needed.

Get the MailChimp API Key #

Follow these steps to create your MailChimp account and get your MailChimp API key:

  • Go to the MailChimp website and create an account or login if you already have an account.
  • Click the user icon to open the user menu then click the Account and billing item.
  • On the account page click the Extras menu item then click the API keys subitem.
  • Scroll down to the Your API Keys section and click the Create A Key button.
  • Enter the API Key Name and click the Generate Key button.
  • Copy your API key and click the Done button.

Once you have an API key, go to your website and paste it into the  MailChimp API Key setting on wp-admin > Ultimate Member > Settings > Extensions > MailChimp.

Image - MailChimp user menu.

Image -  Overview screen, the "API Keys" menu item.Image - Extras screen, the Your API Keys section.

Image - Name New API Key screen.

Image - Copy New API Key screen.

Image - The MailChimp API Key setting on wp-admin > Ultimate Member > Settings > Extensions > MailChimp.

Create an audience #

For the integration between MailChimp and Ultimate Member, you need to create a MailChimp audience. Please do the following:

  • Click the "Audience" item in the MailChimp menu.
  • On the audiences page click the "Create audience" button. MailChimp allows you to create the first audience for free. The "Create audience" button is hidden if you reached a limit of audiences allowed for your plan.
  • On the create audience page fill in all the details and click save.
  • You new audience will be created.
General audience settings Description
Audience name Required
Audience ID Generated automatically
Enable double opt-in Optional. See details here
Enable reCAPTCHA Not used by the API
Default From name Recommended
Default From email address Recommended
Default Email subject Recommended

Image - Audience name and campaign defaults screen, the audience settings.

Configure settings #

Extension settings #

Once you activate the extension, you will see the MailChimp tab on the page wp-admin > Ultimate Member > Settings > Extensions. On this tab, you can find these settings:

Setting Description
MailChimp API Key This field requires you to input the API Key copied from your MailChimp account.  The MailChimp API key allows Ultimate Member to integrate seamlessly with WordPress, syncing your user data with your MailChimp audiences. This integration helps automate email marketing and user management directly within your WordPress site.
Account delete action Specifies what action to take when a user account is deleted. Choose from the following options:
  • Do nothing: the contact with the audience will not be changed.
  • Move to archive: the contact in the audience will be archived.
  • Permanently delete: the contact will be removed from the audience forever.
  • Unsubscribe member: the contact in the audience will be marked as "Unsubscribed". Recommended.
  • Actions "Move to archive", "Permanently delete", and "Unsubscribe member" stop mailing.

    Warning: The "Permanently delete" action removes a contact from the audience forever. Permanently deleted users cannot be resubscribed. Don't use this if you're not sure.

Account unapprove action  (Optional) See details here. Specifies what action to take when an account's status is unapproved or deactivated.
Groups and Tags view  Defines how to display Groups and Tags in the user profile field. You can choose from the following display options:
  • Checkboxes: Displays groups and tags as checkboxes, allowing the user to select multiple options at once.
  • Multi-Select: Allows for selecting multiple options, but displayed as a dropdown list instead of checkboxes.
Enable language field Allows members to select their preferred language for receiving newsletters. When enabled, an additional option Default language will appear. 
Default language You can select the default language from the dropdown list, with English as the default option. This ensures members receive newsletters in their preferred language.
Enable requests cache Improves performance by caching MailChimp API requests, reducing the need for repeated calls to the API. This setting must be enabled to access the Cache timeout option.
Cache timeout, s (Optional) Specifies how long cached API requests should be stored, in seconds. The default value is 600 seconds (10 minutes). A longer timeout reduces API calls but may delay updates to MailChimp data. 
Enable requests log Saves detailed information about all requests and responses sent to the MailChimp API. This feature is useful for configuring and debugging the extension. Enabling this option reveals additional settings: Log all responses and Requests log.
Log all responses (Optional) Logs responses for all API requests, including successful ones. Note that responses for failed requests are always logged by default. 
Requests log (Optional) Displays the saved log of API requests and responses. The log includes filtering and search functionality to find specific entries. You can also clear or refresh the log as needed.
Blocked Email Addresses Specify a list of email addresses and domains that you want to block from being added to the audience. Add each email or domain on a new line. Addresses listed here cannot be added to the audience, and existing contacts will be unsubscribed during the next update if automatic sync is enabled. To block an entire domain, use a wildcard format such as *@domain.com.

Requests log #

The requests log appears if the Enable requests log setting is turned on. It displays the time, status, method, request path, arguments, and referrer for each request to the MailChimp API. The extension stores a response for failed requests by default. If the Log all responses setting is turned on, the extension stores a response for all requests.

You can find the error details in the RESPONSE data. This information helps to configure and debug the extension.

You can also filter and search the requests log using the following dropdown options:

  • All requests: View all recorded requests.
  • Only requests with error: View only the requests that encountered an error.
  • Only requests to add or update: View requests related to adding or updating records.

Additionally, you can view important requests for a specific user by clicking View log in the MailChimp column under wp-admin > Users.

User Role settings #

The extension adds settings to manage what members can edit from their accounts. Go to  wp-admin > Ultimate Member > User Roles and choose the user role to modify. You will see the "Edit Role" page. Scroll down to the "MailChimp" section:

  • Can manage groups?
  • Can manage tags?
  • Can create tags?

Image - Settings on wp-admin > Ultimate Member > User Roles > Edit Role.

Create a connection #

Create a connection with the audience #

Follow these steps to create a connection with the audience:

  • Go to wp-admin > Ultimate Member > MailChimp and click the Add New button.
  • Set the title. 
  • Select the MailChimp audience in the Choose an audience dropdown.
  • Click the Create button.

Image - The MailChimp connections table on wp-admin > Ultimate Member > MailChimp.

Image - The Choose an audience dropdown on wp-admin > Ultimate Member > MailChimp > Add New.

General connection settings #

Setting Description
Mailing audience ID Show MailChimp audience ID.
Enable this connection Turn on or off this connection globally.
Enable double opt-in Send contacts an opt-in confirmation email when they subscribe to your audience. This setting can enable the double opt-in feature if it isn't enabled in the audience settings. This setting is inactive if the double opt-in feature is enabled in the audience settings.
Who can subscribe to this audience Select which roles can subscribe to the audience. Members who cannot subscribe to the audience won't see this audience in their accounts.
Automatically sync contacts Syncs a contact on registration, profile update, or role change.
Default interests Optional. Shown if the audience has groups. Defines group interests to automatically add a new member to these groups if the "Automatically sync contacts" option is enabled. Each group has a separate setting to select group interests.
Default interests for existing contacts How to apply default interests when updating existing contacts.
Default tags Optional. Shown if the audience has tags. Defines tags to automatically add these tags to a new member if the "Automatically sync contacts" option is enabled.
Default tags for existing contacts How to apply default tags when updating existing contacts.
Marketing Permission Optional. Shown if the audience setting "Enable GDPR fields" is enabled.
* Note: The extension adds new members to the audience after the email confirmation if the option "double opt-in" is enabled.
** Note: The extension adds new members to the audience after approval if the option "Automatically sync contacts" is enabled and their user role is selected in the option "Who can subscribe to this audience". The extension does not add new members before approval. The extension does not add new members if their role is not selected.

Image - The Setup audience section on wp-admin > Ultimate Member > MailChimp > Edit MailChimp connection.

Configure fields #

Once you set up the connection and updated the page the  Merge User Meta section will appear. This widget syncs form fields with audience fields.

Audience fields #

The audience should be set up in a specific way to get user data from the site. You have to create audience fields first. Do the following:

  • Go to audiences and select the desired audience.
  • Go to Audience > Settings > Audience fields and *|MERGE|* tags.
  • You will notice that the form includes Email Address, First Name and Last Name. You can use these fields.
  • Click the Add A Field button to add more fields. Select a field type and configure field's settings.
  • Save Changes.

Image - Audience fields and *|MERGE|* tags screen, the audience fields.

Merge User Meta widget #

Once you create the needed audience fields go back to the connection and refresh the page. You'll see the widget Merge User Meta, which syncs form fields with the audience fields. In this widget, audience fields are shown on the left and form fields are shown on the right. You should set relationships between audience fields and form fields created on your site. Click the Update button to save changes.

Pay attention to the required fields and choices for the "radio buttons" and "drop-down" field types. Synchronization would fail if one of the required fields is empty. Synchronization may fail if the values of the "radio buttons" or "drop-down" field type doesn't match.

The widget has tools that help you to configure field relationships and avoid mistakes:

  • required fields marked by the icon (!)
  • information about field type and choices may be seen under the icon (?)
  • a warning appears under the field if the configuration is wrong

Image - The Merge User Meta section on wp-admin > Ultimate Member > MailChimp > Edit MailChimp connection.

Field type restrictions #

The  address field in MailChimp is a complex field that consists of several subfields. You have to fill all required subfields or disable address field. Rules for address subfields:

Subfield Required Recommendation Example
Street Address Yes Must be merged with the required text field in the registration form 20 W 34th St
Address line 2 No Should be merged with the optional text field in the registration form next floor
City Yes Must be merged with the required text field in the registration form New York
State/Prov/Region Depends on country It is empty or text if there are no states in the country. It is a code of the state if the country has states. NY
Postal/Zip Yes Must be merged with the required text field in the registration form 10001
Country Yes Must be merged with the required dropdown field that contains country codes US

MailChimp does not support multi-select field types. However, multi-select form fields can be synced with text fields, where selected options are combined into a single string, with each option separated by a comma. For example, a "Sports" field with multiple selections could be synced as "Football, Basketball, Tennis."

To target specific contacts for a mailing campaign, MailChimp uses the "Segment" feature. You can create a segment by filtering based on the values stored in the text field containing multiple options. Simply use the "contains" rule to match the desired values.

Image - The Segment builder with the contains rule.

The dropdown and radio button fields in MailChimp can be synced with corresponding UM form fields (Dropdown and Radio) if the form field choices match the options in the audience field. However, we do not recommend using these field types, as synchronization can break if an option is added or removed on one side but not the other. It’s better to sync Dropdown and Radio UM form fields with a text audience field.

To simplify role syncing, we've added two virtual role fields that can be synced with a text field in the audience:

  • Role slug: Returns the role ID (e.g., "super_editor").
  • Role title: Returns the role title (e.g., "Super Editor").

Configure behavior on registration #

There are two ways to handle members on registration:

  • Auto - Members are added to the audience after registration and approval if the Automatically sync contacts setting is enabled and their user role is selected in the Who can subscribe to this audience setting. A field in the registration form is non needed to use Auto mode.
  • Manual - Add the MailChimp field to the registration form to allow members to sign up for newsletters manually. This field is visible in the registration form if the user role assigned on registration is selected in the Who can subscribe to this audience setting.
Note: There is no way to combine auto and manual modes together. Manual mode has a higher priority. The extension uses data from the MailChimp field if the field exists in the registration form ignoring default interests and tags.

Follow these steps to add a field to the registration form:

  • Go to wp-admin > Ultimate Member > Forms > Edit Form (Register).
  • Click the "+" icon to add the new field.
  • Select the MailChimp field.
  • Set the title and label, then select the connection from the dropdown.
  • Enable additional options if you need them:
    • Checked by default - The checkbox appears checked.
    • Manage groups - Additional field to select groups appears below the checkbox. Default groups are used if disabled.
    • Manage tags: An additional field to select tags appears below the checkbox. Default tags are used if disabled.
    • Manage language: If enabled, this option allows users to select and manage their preferred language from their account form.
    • Checkbox label: This setting allows you to customize the label text for the MailChimp checkbox field. You can modify the default label to better suit your form's needs or provide more specific instructions for users.
  • Click the Update button to save changes. The field should appear in the form.

Image - The MailChimp field in the Form Builder on  wp-admin > Ultimate Member > Forms > Edit Form.

Image - The MailChimp field options on  wp-admin > Ultimate Member > Forms > Edit Form > Edit Field.

Account features #

Members can manage their newsletters in the account tab Notifications. Members can subscribe or unsubscribe, and manage groups and tags (optional, depends on the role settings).

Image - The Email Newsletters section on Account > Notifications.

An error message appears if the update fails for some reason. Follow the instructions in the article How to debug MailChimp error to fix a problem.

Image - Error message on Account > Notifications.

Manual syncing #

Sync from the dashboard widget #

The plugin adds the MailChimp widget to the Ultimate Member dashboard. This widget displays statistical information and provides tools for manual bulk syncing:

Bulk Subscribe or Unsubscribe

This tool is used to select existing site users (by role and status) and manually subscribe (add) them to the audience or unsubscribe them. Users who were previously added to the audience will have their data updated. You can also use this tool to add or remove contacts.

Steps:

  1. Select role and/or status and click the "Scan now" button. The tool searches for members matching the criteria and proceeds to the next step if members are found.
  2. Select the audience and click "Subscribe" or "Unsubscribe".

Update Audience Contacts

The Update Audience Contacts tool updates contact data (fields) in the selected audience.

  • This tool does not add new contacts.
  • It shows detailed results for each updated contact, including error details if a contact update fails.

Use this tool to ensure existing contact fields are up-to-date.

Import Users from MailChimp

This tool allows you to import users directly from your MailChimp account into your Ultimate Member site. It includes the following options:

Option Description
Select Connection Choose a specific MailChimp audience to import contacts from, ensuring the correct subscribers are added or updated.
Import Only "Subscribed" Contacts Restrict the import to MailChimp contacts with a "subscribed" status to maintain a clean and relevant user base.
Update Existing Users Synchronize and update data for users already present on your site based on MailChimp information.
Create New Users Add new users to your site using data from MailChimp subscribers.
Run Import Execute the import process to sync MailChimp contacts with your site users.

Image - The MailChimp widget on  wp-admin > Ultimate Member > Dashboard.

Bulk subscribe for newsletters from the Users table #

The plugin adds tools for bulk Subscribe or Unsubscribe to the Users table. These tools work like bulk actions. Select the users you want to update, select a connection, and click a button.

Image - Bulk Subscribe on  wp-admin > Users.