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

  • I have been trying to get this to work. I have followed all the setup steps. subscription list selected, list select field defined. Merge feild define with matching Syntax (copy and Pasted). Records do not update the mail chimp list. merge error lists fields that are not even in my MailChimp list. Please Help

    • oddly enough i create a new list and mapped to that and it updated. not sure what was different

      • It sounds like the plugin must have been out of sync with the list before.

        There is a known issue with merge field mismatch warnings that won’t go away, and for that, I have a fix coming…but it doesn’t affect the functioning of the plugin as far as keeping lists in sync.

        Have you tried going back to the original list so see if it is now updating correctly?

  • Can this work for the signup messages as well? Can we trigger those through mailchimp instead of through the participant’s database extension? I would love to take advantage of mailchimp’s templating.

    • Do you mean that if someone uses the MailChimp subscription form, they would also be added to Participants Database? This is certainly possible, although it would be something you’d have to do specifically for your site, I don’t know that it could be added as a general feature to this plugin.

      • No, I mean for sending welcome emails when they add new records, lost password requests, change to records alerts, and maybe the contact email form, etc.

        • I hadn’t thought of that. The Email Expansion Kit is designed to provide better and more flexible email templating. What are you looking for that isn’t offered in that add-on? Thinking of ways to improve it.

  • Roland, I’m really struggling to get this functional. Current warnings are below. Please note that I have a list selected, so not sure why the first warning. I tried Deactivating then deleting the plugin so I started (again) from scratch. No luck. Not sure where to go from here.

    Warning: Invalid argument supplied for foreach() in /home1/ursula/public_html/wp-content/plugins/pdb-mailchimp-integration/pdbmailchimp/service/merge_fields.php on line 36

    Warning: Cannot modify header information – headers already sent by (output started at /home1/ursula/public_html/wp-content/plugins/pdb-mailchimp-integration/pdbmailchimp/service/merge_fields.php:36) in /home1/ursula/public_html/wp-admin/includes/misc.php on line 1114

    Warning: Cannot modify header information – headers already sent by (output started at /home1/ursula/public_html/wp-content/plugins/pdb-mailchimp-integration/pdbmailchimp/service/merge_fields.php:36) in /home1/ursula/public_html/wp-includes/pluggable.php on line 1216

  • Just activated the plug-in and have the following errors. How do I get back to my dashboard so I can correct mistakes on the setup?

    Warning: Invalid argument supplied for foreach() in /home1/ursula/public_html/wp-content/plugins/pdb-mailchimp-integration/pdbmailchimp/service/merge_fields.php on line 36

    Fatal error: Class ‘PDb_Admin_Notices’ not found in /home1/ursula/public_html/wp-content/plugins/pdb-mailchimp-integration/pdbmailchimp/Plugin.php on line 96

    • The warning is only because you don’t have the list selected yet. For the error, you must use the latest version of Participants Database.

      • Roland, these errors are preventing me from getting back to the dashboard to fix the problems. I get an HTTP Error 500. Any suggestions on how to get around this? In the meantime, my website is down.

        • You need to deactivate the MailChimp plugin. If you can’t get to the admin plugins page, then you need to use FTP. In your FTP, go to the plugins folder, find the ‘pdb-mailchimp-integration’ folder and rename it…just add a “0” to the end of the name. Now you will be able to open the admin plugins page. Update Participants Database, then go back to your FTP and change the name of the MailChimp plugin back to what it was. You can now activate the MailChimp plugin.

  • Since two days im seeing this warning with two fields (didn’t change any configurations):

    “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.

    The merge fields setting is missing the MMERGE4 field”

    • Make sure that all the merge fields that you have defined for your mailing list at MailChimp are matched to Participants Database fields in the “Merge Fields” setting in the MailChimp Integration plugin settings. Make sure you have MMERGE4 in your Merge Fields configuration.

      • Thank for quick answer Roland.
        Very strange issue, i’ve checked out in Merge Fields configuration look right but there’s still a double error regarding country field called MMERGE3… can i post screenshot?

        • You can’t post screenshot here, you can email it to support@xnau.com

          Be sure to include a screenshot of your MailChimp merge field setup too.

        • I’m getting this same sort of thing. I used this last year for an event and now that I’ve come back to work on it this year I’m getting 2 messages that are and have been matching fields. FNAME being one of them.
          Was there any resolution on this post?

        • I don’t know the exact issue you are seeing there. The message indicates that the merge fields you have defined in the MailChimp add-on are different from the merge fields defined for the list at MailChimp. For each merge field you have at MailChimp, you should have a corresponding field defined in the add-on. Also, make sure the syntax of the add-on setting is correct…for example:

          first_name:FNAME,last_name:LNAME,birthday:BIRTHDAY,city:CITY,country:COUNTRY

          The first part of each pair must be a defined Participants Database field. Sorry for the general answer, but I don’t know the specific problem you’re having…just having everything configured correctly should solve the problem, however.

  • First of all Happy 2018!
    When i update or change a record in PDB, this is unsubscribed in MC…
    what im doing wrong?

    • When a record is updated, those changes are synchronized with MailChimp. Take a look at the configuration of your “list select field” if it’s set up correctly, it should show the correct subscription status in the record editor. If it shows that the person is not subscribed when in fact they are, updating the record will unsubscribe them. Your list select field should be a checkbox with the values “yes,no” the default value won’t matter if the record has a saved value for the field.

  • The problem is with a date field in the update record. When I submit a record from the PDB admin, MailChimp rejects it because a field with a date of December 27, 2016 is transmitted to MC as “1482803793”, and it returns an invalid resource error. I’m guessing this field is seconds from the origin 1/1/1970.

    If I fix the date on the MC record, and send back another change, the change is accepted by PDB, The date field sent by MC is “2016-12-27”, but that gets displayed as “January 1, 1970” in PDB, so PDB is not checking the date for something it considers reasonable. It does properly reflect the other changes in the update from MC.

    I have the full debugs, but can’t include them in this comment field, as they are seen as code.

    • The MailChimp plugin doesn’t support date fields at this time, I’m sorry. I’m adding it as a feature, but until I release the update it won’t work correctly.

  • I’m having difficulty with getting the subscribe and unsubscribe functions to work from PDB into MailChimp. When I unsubscribe on PDB, it correctly sets the “Approved” field to No (blank actually), but it doesn’t unsubscribe the user in MailChimp. I added this field to MC after having imported the list on PDB; do I need to re-import in order for the connection to be correct?

    • The unsubscribe and approval fields are different fields. I don’t recommend you use the “approved” field as your “List Select Field” It’s better to define a checkbox field as your opt-in field and use that as your “List Select Field” field for MailChimp. You don’t need to reimport.

      Once you’ve set up your list select checkbox, you can subscribe/unsubscribe your users on the record edit page, and it will be synchronized with MailChimp. You can’t do it on the list page…at least not in the current version.

      • If I import 10 records, I find that they are properly setup in MC. The first time I access one of the records from the PDB admin, select a single record and SUBMIT the changes, it gets updated in MC. Subsequent to that, either selecting another record or the same record, it stops keeping MC synchonized. If I submit a change to that record on the MC side, it appears to synch the change, but their two, and the first record, the changes no longer seem to be synched.

        Is there some debugging I can turn on to help determine what’s gone wrong?

        • If you set up your PHP error log and then enable WP_DEBUG, you’ll see a data dump each time the plugin communicates with MailChimp

  • I have a date field in PDB, initially set to “27-Dec-16” as exported to CSV, and then re-imported to PDB. When that field is viewed on MailChimp, I see a nonsense date, and if I correct it to 12/27/2016, it shows up on PDB as January 1, 1970.

    • If I enter the date in PDB as 12/26/2016, it properly shows up in MailChimp.

    • Date fields have to be a string that con be consistently interpreted by PHP. Years must have 4 figures, for instance.

  • I’m having some problems with importing PDB users into MailChimp.

    1) If a PDB user record does not have an email address set, it doesn’t import into MailChimp, as you’d expect. However, if I later on I add an email address to the PDB record, there is no method to subscribe the user to MC, other than deleting their PDB record, and re-importing it.

    2) If I change the email address portion of the PDB record, it appears to disconnect the MailChimp record, such that I must delete the MailChimp record separately. Even if I set the email address back to the subscribed email address, it does not reconnect to the MailChimp record.

    I’d like the integration to be able to handle updates of the email address cleanly on the PDB side. If an email address doesn’t exist at initial creation time, it should be able to add it later to MailChimp, if it changes, it should either change the email address on the MC record, or delete that record and add a new record with the new email address.

    As always, Mahalo for your plugin!

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.