Product Support

MailChimp Integration

Integrates Participants Database with your MailChimp account.

Product Setup

This plugin requires you have an account established with MailChimp before you configure it. Once you have your MailChimp account set up, you’ll need to get an API Key.

Getting Your MailChimp API Key

On your avatar menu (upper right corner while logged in to MailChimp) click on “account.” Once there, under the “extras” menu, select “API Keys.” On that screen, you’re given a way to create an API key. You can have several keys, so even if you have a key, it’s a good idea to create a new one for this purpose. Give it a name so you know where it is being used. Once the key code is generated, copy and paste it into the “API Key” setting in the MailChimp Integration settings menu, found under Participants Database in the WP admin.

Setting Up Your Mailing List

When you click on “Save Changes” the API Key will be used to get your list of mailing lists at MailChimp. You will need to have at least one mailing list established in order to use the plugin because new subscribers have to go to a specific list. In the “Subscription List” dropdown will be your mailing lists at MailChimp. If you don’t see it, click on “Save Changes” to refresh the list.

Select the list you want your Participants Database signups to be subscribed to.

Set Up Your “Opt-In” Checkbox

In most cases, you’ll want to provide a way for your users to opt-in to your mailing list. Do this by creating an opt-in field that consists of a check box with the values “yes,no” You can default it to “yes” if you want it checked to begin with. If you are not showing the field to the user in the signup form, you must set the default value to “yes” if you want the person siogning up to be automatically added to your subscription.

Once that is set up, you need to tell the plugin which field it is in the List Select Field setting.

If you want to use another language or give the checkbox a different label, you can use the value label format like this: Yes::yes,No::no

As long as the saved values (the second of each :: pair) are “yes” and “no” it will work.

Completing the Setup

Once you have the API Key and mailing list set up, you can make sure the rest of the settings are what you want. Take a look at the “Settings” tab here for more explanation.

Importing Subscribers

When you import records using a CSV file, these will also be synchronized with your MailChimp list. You can use a CSV import to add a bunch of subscribers or update their subscription status over at MailChimp.

If you already have records in your Participants Database and you want to add them all to your MailChimp list, you need to export them, then re-import them (using the record ID as a match field so you won’t end up with duplicates) which will update all of them with your MailChimp list. Be sure the needed fields are configured to be included in the CSV export by having the “CSV” box checked in the field definition.

Note: CSV imports must contain both the “email” and “list select field” data in order for the subscriber to be added or updated at MailChimp.

Two-Way Synchronization

the webhook link…yours will look different.

When a subscriber receives an email you’ve sent using MailChimp, there is an unsubscribe link they can use to be unsubscribed. In order for this to be reflected in your Participants Database record, a communication link between MailChimp and your WordPress site must be established. This is done using a “webhook” which is a secure URL that the MailChimp list can use to communicate to your WP site.

To set up a webhook, first find the webhook URL that you will see at the top of the MailChimp Integration settings page in your WP admin.  Copy that URL. We’re going to use that over at MailChimp, but first you must flush the permalinks to activate the webhook URL. To do this, go to the “permalinks” setting under the Settings item in your WP admin. On the permalinks settings page just click on “Save Changes” and that will flush the permalinks and make sure the webhook URL is set up to receive data from MailChimp.

Now, go to MailChimp and select the list you are using with Participants Database. Go to the settings page for that list and find the “webhooks” setting.

On the webhooks page, click on the “Create New Webhook” button found on the upper right. This will open a form where you can paste the webhook URL you got from the plugin settings. Once that is saved, you will be able to select what type of messages will be sent. Just accept the defaults and save the webhook.

If you get some kind of error message when trying to set up the webhook, make sure you copied in the exact URL given in the plugin settings. Also, flush the permalinks to be sure WP has the URL set up. Errors such as a 500 or 403 indicate possible security rules on your web server designed to block unauthorized access. Talk to your web host about the problem in cases like this. MailChimp also has a support page for webhooks that could be helpful.

Manually Updating Multiple Records

As of version 1.5, it is possible to update multiple records in a single operation. This is done on the “List Participants” page in the Participants Database admin, there are new MailChimp functions in the “With Selected” dropdown.

To update (synchronize with MailChimp) multiple records, selected the records you want updated, then select “Update to MailChimp” and click “Apply.” All your merge fields and subscribe statuses will be updated to MailChimp, so all the subscriber’s info there will match the info in Participants Database.

Mass Subscribe/Unsubscribe

If you need to subscribe or unsubscribe multiple records, you can to that in a similar way.

Product Settings

API Key

This is the key code provided by MailChimp that is unique to your MailChimp account.

Subscription List

Once you have entered your API key and saved the settings, you can select which list people will be signed up to when they register.

List Select Field

This is the name of the field used to opt in to your list. Usually, it’s a checkbox where they simply say “yes” to being added to the list.

Use Double Opt-In

This means that when someone signs up and indicates they want to join the list, MailChimp sends them an email where they can confirm that choice. This is a really good idea to avoid trouble such as people getting your newsletter who actually don’t want it, or getting spam email addresses into your list. Please note that in some countries, a double-opt-in is a legal requirement for mass email.

The way this works is new registrations will have a “pending” status when they sign up. When (or if) they confirm the subscription, their status will be changed to “subscribed.”

Note: when using double opt-in, new registrations will not be visible in MailChimp until they confirm their subscription. Before they confirm, they are considered “pending” and will not show up in your lists at MailChimp. You can find those registrations at MailChimp if you search for the email address.

Pending Label

While a registrant has a pending status, this label is used for the value of the List Select Field. You can use this in list searches to find people who have not confirmed their subscription yet.

Merge Fields

This setting uses a special string to define additional fields that will be saved in the MailChimp list. Typically, this is their first and last name, but it can be just about anything. It does have to be a field that is included in the Participants Database form because otherwise there won’t be any value to save to the MailChimp subscriber list. The default value for the setting is:

first_name:FNAME,last_name:LNAME

The way this works is this is actually a map of the Participants Database field to the MailChimp field. The format is pdb_field:MAILCHIMP_FIELD with each field pair separated by commas. This is a simple one-to-one mapping: for instance it’s not possible to combine several Participants Database fields into a single MailChimp field.

The Mismatched Merge Fields Warning

If the list of merge fields you have defined in this setting don’t match the list of merge fields defined at MailChimp, you will get a warning message. You can ignore this if you want, the main functionality will work as expected, and any merge fields that do match will work.

What it means is that, for instance, if you didn’t have a “city” merge field defined here, and you did at MailChimp, the data for the registrant’s city will not be sent to MailChimp. The warning is so you will know why your merge fields are not getting populated with data.

F.A.Q.

If a user unsubscribes on their profile page, will they be unsubscribed at MailChimp?

Yes, every time a record is updated on your site, that info is passed to MailChimp, so they can unsubscribe in either place, it won’t matter, they stay synchronized.

I'm not getting subscriber updates from MailChimp, how do I get webhooks working?

To troubleshoot webhooks, follow these steps:

  1. Check the “Subscription List” setting in the add-0n settings and make sure you have the correct list selected
  2. Check the webhook URL at the top of the page. Now go to MailChimp and check the webhook for the list (found in the list’s settings page) Make sure they are the same.
  3. Copy the webhook URL and try it in a browser. You should get a “No request details found.” message. If you get a 403, or a 500, check your site security filters or contact your web host with the information.
  4. If you get a 404, refresh the permalinks in the general settings of your WordPress site, then try to open the webhook URL in the browser again.
I have Double Opt-In checked, and I'm getting signups, but they aren't appearing at MailChimp, what's happening?

Having Double Opt-In checked changes how things work in several ways.

If you have “Use Double Opt-In” checked, and someone signs up, their info is sent to MailChimp only if they have the “List Select Field” checked. In both cases, you won’t see them at MailChimp at first.

If they agree to be on the list when they sing up, their info will be sent to MailChimp, but you will not see them in the list there until they confirm the opt-in by email. You can still find them with a search, however. You’ll see their status is “pending.”

If they don’t agree to join the list, their info won’t be sent to MailChimp at all. In this case, if they later update their record to join the list, their info will be sent to MailChimp at that time and they will need to confirm in order to join the list.

How do I set up user-selected list segmentation?

“Segmentation” is the technique of using only part of your mailing list based on some value in the person’s subscription data. For example, if you have several newsletters based on various interests, you can provide a control such as a multi-checkbox where the user can select their areas of interest.

To make this work, you need to set up a merge field for this purpose. In Participants Database, create your field where the user can make their selection. Then go to your MailChimp account and set up a merge field for this information.

In the PDB MailChimp Integration settings, add your merge field to the list of merge fields. In the merge field setting, use the “name” of the field you created and the merge field name provided by MailChimp. This establishes the relationship between the field you created in Participants Database and the merge field in MailChimp. When the user signs up or edits their record, the value is sent to MailChimp to update the merge field value in the user’s subscription data.

When you want to send your newsletter, you can segment your list using the value in the merge field. The instructions for doing this are available from MailChimp.

When a signup is submitted, a new subscriber is not added to the MailChimp audience

To start with, here is a checklist of things to make sure your configuration is complete:

  • The merge field list must match what is defined for the list at MailChimp. You’ll see a warning about that on the settings page, that must be resolved for things to work
  • Email field in the signup form must be the same field as selected in the “Primary Email Address Field” setting in Participants Database
  • The “List Select Field” must be correctly configured: check the documentation for the details on that, pay close attention to the “options” setting
  • If your signup form should automatically add the person to the MailChimp list, you must set the default value of the List Select Field to “yes”

This is less likely than a configuration issue, but the data transfer to MailChimp can fail if there is something in your server configuration that is blocking the communication. For example, a security setting that blocks the request. If you do not manage your server, you will probably need the help of your hosting provider to address issues like this.

I'm getting a warning message about merge fields, how do I clear it?

First thing to check is the message will describe an issue with a specific merge field. Correct this in your settings, either at MailChimp or in the MailChimp Integration plugin settings.

Also make sure you have the correct audience selected in the MailChimp Integration settings, and that you’re looking at that same audience at MailChimp.

Be sure to dismiss the warning message before saving the settings, so if it comes back you know it pertains to the newly-saved settings.

If the warning comes back, first double-check the merge tags settings all around. If it looks good, but the messages keep coming back, then there are a couple of steps you can take to re-synchronize the settings.

First, check the merge fields in your MailChimp audience settings. Each tag will have two names: the default name and the user-defined name. The default name will be something like MERGE4. Try using that iname in the MailChimp Integration merge tags settings instead of the user-defined name. Clear the warning message and save the settings. This should force the settings to resync.

You can change it back to the user-defined merge tag name if you want. It works the same either way.

Support Discussions for MailChimp Integration

  • Is there a limit to the number of MERGE fields one can keep sync’ed to MailChimp? I’m finding that after 10 fields, the fields are no longer recognized.

    • There is no limit. Are you getting the mismatch warning message? Look for any errors in your merge fields configuration string (in the MailChimp plugin settings) that might be causing a mismatch.

      • I started with 13 merge fields. Initially, I got a mismatch error for a specific field which was in the list, but if I removed a field, I would get a new mismatch error for a different field in the list until I got down to 10 fields, at which point it worked normally.

        Here’s the strings in question:
        The one that fails:
        first_name:FNAME,last_name:LNAME,property_number:PROPNUM,property_street_name:PROPSTRN,dues_paid_year:DUESPDYR,date_paid:DATEPAID,zone:ZONE,membership_status:MEMBRST,owner:OWNER,occupant:OCCUPNT,receive_invoice:INVOICE,newsletters:NEWSLTR,email_alerts:EMAILALRT,list_in_member_directory:LISTDIR

        and here’s the working string:

        first_name:FNAME,last_name:LNAME,date_paid:DATEPAID,dues_paid_year:DUESPDYR,email_alerts:EMAILALRT,receive_invoice:INVOICE,list_in_member_directory:LISTDIR,membership_status:MEMBRST,newsletters:NEWSLTR,occupant:OCCUPNT

        • I just added an 11th field, and it worked OK, so perhaps there was some other issue.

        • The mismatch error triggers on the first field that doesn’t match. Instead of taking it out, check it to make sure it’s correct both in the the Participants Database field definition and in the merge field defined at MailChimp.

  • Is there any way to NOT delete the entire PDB record when someone unsubscribes from the MailChimp list?

    We have a more or less permanent entry for each home in our organization. When someone leaves, we would typically clear their email address, and then enter the new email address for the next resident when they move in. Some PDB entries have NO email address, and therefore no link to MailChimp.
    There is lots of other per home information that remains valid regardless of email address, and we would like to keep that after someone unsubscribes.

    We would like MailChimp unsubscribes to only clear the fields associated with the MailChimp record; these would typically be Email, First Name, and Last Name, but obviously could be any field listed in the plugins mapping between PDB and MailChimp fields.

    • To answer my own question; it appears as though you can control what events trigger the “webhook” in MailChimp, so you can ignore events like unsubscribe and the PDB record will not be effected. This level of granularity is just fine for what I want to do.

    • When someone unsubscribes, only the field that holds the user’s subscription status is changed. Records are not deleted when someone unsubscribes.

  • Hi Roland, where can i check if syncronization doesn’t work? Users can resgister via Mailchimp (double optin) but does not appears in PBD? Plugin is upgraded and everything seems setup ok.
    Thank you

    • The MailChimp add-on doesn’t add people to Participants Database if they register with MailChimp. It’s meant to work the other way around: people register or sign up using Participants Database, and they get added to MailChimp.

  • I am getting a “Fatal error: Can’t use function return value in write context in /home/content/34/9320634/html/LasVegasPromoModelsCOM/wp-content/plugins/participants-database/classes/PDb_File_Uploads.class.php on line 159” when I attached a file on a participant form. The file size is under the maximum and the file format is in the list of accepted files. I just noticed this problem today. I believe the problem started a month ago based on the last successful sign up. Any help or assistance or direction I can take will be greatly appreciated. Thank you in advance.

    • Hi John, thanks for the heads up…that was in a recent update, so it’s only been a day or so. I’ve got a fix coming, meanwhile, I supplied a patch you can apply yourself in an email.

  • hello.

    i’ve installed the plugin and checked double-opt-in. api installed, webhook ok. message ok when put in browser… i added an opt-in-email in mailchimp. there is only one list in mailchimp – selected correctly on website, list select field is a checkbox defaulting to checked…

    but still: new subscribers are added automatically to my site without an opt-in email from mailchimp, asking for allowance to add them. also – they are not (as none of them opted in) are listed in the mailchimp list.

    where should i go and have a third look?

    have a nice day,
    stefan.

    • The double opt-in is for the MailChimp list only. The registrants will be added to Participants Database in all cases.

      On the MailChimp side, new subscribers are not normally visible until they opt in. If you don’t use double opt-in, they are visible right away. You can see the new not-opted-in subscribers in MailChimp by searching for “pending” subscribers.

    • ok – i found out – it works :)

      i didn’t realize that i need to integrate a mailchimp form instead of the Participants Database signup Form.

      have a nice day!

      • You don’t need to integrate a MailChimp form. The plugin makes it possible for the Participants Database signup form to also register people who sign up with MailChimp. Make sure you have the “List Select Field” configured (this is usually just a checkbox to let them choose to be included) and the new signups will be added to your MailChimp list.

  • I believe I found a bug/flaw in regards to the merge fields. In specific I’m using a multi select other checkbox field as two of the merge fields but in the real database they look like this instead:
    a:2:{i:1;s:8:”Saturday”;i:2;s:6:”Sunday”;}

    I think this is breaking the API and webhook callback with perhaps the inclusion of the semi-colons?

    If I edit any field in mailchimp, the participants database gets the check to the field that has the (a:2:{i:1;s:8:”Saturday”;i:2;s:6:”Sunday”;} data in it deleted.

    I have some other fields that aren’t updating while others are and I’m wondering if this is related also. In this case, it’s when I’ve turned off the webhook or just using the API.

    • Brian,

      I never tested this use case. At any rate, what you’re seeing there is a serialized array, which is a way of representing a set of values as a string. This is how the value of a multiselect element is stored in the database. I suppose that what you’d want to save in the merge field would be a comma-separated list of values.

      I’ll write this up, I’ll probably need to issue an update to allow multiselects to be used as merge fields.

    • In the 1.6 release, this has been fixed. It is now possible to use multiselect fields in your MailChimp merge fields.

  • I am getting the same message “The merge fields defined in the settings here do not match the merge fields defined for this list at MailChimp, which can result in lost data.”. I have the default “first_name:FNAME,last_name:LNAME” and verified field names/segments.
    However, my subscribers in PD are currently being added automatically in MailChimp but the message about the merge fields is worrisome.
    Please let me know what I need to check to resolve this problem.

    Thank you.
    John n.

    • The message is telling you that you have a different set of merge fields set up in your MailChimp list than is configured in the setting. For instance, if you have a merge field named “CITY” at MailChimp, you should match that to a field in your Participants Database configuration. If your city field in PDB is named “city”, your setting would be something like:

      first_name:FNAME,last_name:LNAME,city:CITY

      OR, you could decide you don’t want to collect the city field, so you would remove it from MailChimp and leave the PDB MailChimp setting the same.

      • Problem fixed. It looks like there is a limitation of 10 fields that you can merge. I’m not sure if the limitation is on PD or MC. I only have the basic MC subscription. Anyone got this to work for more than 10 fields with premium MC subscription?

        Thanks.
        John N.

        • Participants Database has no limit to the number of merge fields. I suggest you contact MailChimp support about this if you need more than 10 merge fields.

  • I’ve got a database for two types of sign ups. One for participants of an event and one for the volunteers of the event. I just bought the plugin and it looks like there’s only room for one web hook to one list.

    Would there be a work around on this maybe with the main Mailchimp plug in “Mailchimp for WP”? Send the volunteers to a form pre-filled?? Or is their another idea?

    Thanks, Brian

    • Hi Brian,

      Yes, the plugin can currently only manage a single list. Participants Database forms won’t work with other MailChimp plugins, so that won’t help you. One thing that could work is the addition of another field that indicates which form was used for the signup, and then you can pass that as a merge field to MailChimp and segment your one list that way. I’m sorry it isn’t easier than that, I have it in the queue of improvements, just haven’t gotten around to implementing it yet.

      • Yes! Segments! I’ll look into how to do that unless you have a quick hit suggestion.

        • The first step is to add a dynamic hidden field to your forms. This would record the name of the page the form is on, which can be used to identify the type of signup the record represents. You would then add this field as a merge field in MailChimp and in the MailChimp add-on settings.

  • I’ve got the integration setup and working OK, but when I add a new member to the database they are added to the mailing list and immediately ‘unsubscribed’. Any ideas why this would happen? Thanks.

    • Hi Douglas,

      Take a look at the ‘List Select Field’ if it has no default value or defaults to a ‘no’ value then new records will start out unsubscribed if that field is not specifically set to a yes value.

  • Hi, API key installed and checked, Webhook installed and checked. Email lists down loaded. however even first_name:FNAME,last_name:LNAME gives the following message on hitting save settings.

    “The merge fields defined in the settings here do not match the merge fields defined for this list at MailChimp, which can result in lost data.”

    Do I need a one to one correspondence for ALL the Mailchimp fields? There are some that will no longer be used but need to be retained for the time being. And not all have corresponding PDBfields either

    Thanks
    Andrew

Got a Support Question?

Your email address will not be published. Required fields are marked *

Would you like to be notified of followup comments via e-mail? You can also subscribe without commenting.