Mailchimp
Datafly Signal delivers behavioural events to your Mailchimp audience server-to-server using the Marketing API Add Event endpoint. Each event is attached to an existing contact (matched by email) and records a snake_case event name plus event properties. You can use these events for behavioural segmentation, event-property merge tags, and — on paid marketing plans — automation triggers.
Mailchimp’s Add Event endpoint attaches events to existing contacts only. It does not create or update contacts. The contact’s email must already be in the target audience (for example, synced from your commerce or CRM system, or added via a Mailchimp signup form) before Signal sends an event for them.
Prerequisites
Before configuring Mailchimp in Signal, you need a Mailchimp Marketing API key, your data-center prefix, and the Audience (List) ID you want events attached to.
Create a Marketing API key
- Log in to Mailchimp and go to Account & billing > Extras > API keys.
- Click Create A Key and give it a label (e.g. “Datafly Signal”).
- Copy the key. It looks like
0123456789abcdef0123456789abcde-us6.
The API key grants full account access. Store it securely, as you would a password.
Find your data-center prefix
The data-center prefix is the part of your API key after the final dash. In ...-us6, the prefix is us6. You can also read it from your Mailchimp admin URL — https://us6.admin.mailchimp.com/ means your prefix is us6. The prefix determines which API host Signal calls.
Find your Audience (List) ID
- Go to Audience > Audience dashboard.
- Open Settings > Audience name and defaults.
- Copy the Audience ID (a short alphanumeric string such as
a1b2c3d4e5).
Configuration
| Field | Required | Description |
|---|---|---|
api_key | Yes | Your Mailchimp Marketing API key (ends in a -us6-style suffix). |
dc | Yes | Data-center prefix (e.g. us6) — the part after the dash in your API key. |
list_id | Yes | The Audience (List) ID events are attached to. |
Configure in Signal
- Go to Integrations > Add Integration > Mailchimp.
- Enter your
api_key,dc, andlist_id. - Select the consent categories that should gate delivery (typically
marketing). - Choose the Default variant and click Save.
API Endpoint
POST https://{dc}.api.mailchimp.com/3.0/lists/{list_id}/members/{subscriber_hash}/events- Authentication: HTTP Basic — the username is ignored and the API key is the password. (Mailchimp also accepts
Authorization: Bearer {api_key}.) {subscriber_hash}is the MD5 hash of the lowercased contact email. Signal derives this from each event’s identified email, so the event lands on the correct contact.
Identity Signals
Mailchimp matches every event to a contact by email address. Signal needs an identified email on the event to compute the subscriber hash.
Call datafly.identify() when a user logs in, registers, or submits a form:
datafly.identify("user-123", {
email: "jane.doe@example.com"
});Signal lowercases and trims the email, then sends the event to that contact’s Mailchimp record. Events for visitors with no known email are dropped — there is no contact to attach them to.
Unlike advertising integrations, Mailchimp stores the email as a first-party customer record, so the email is used to compute the subscriber hash rather than being hashed for privacy-preserving match. PII never leaves your infrastructure except as the legitimate contact identifier Mailchimp requires.
Event Mapping
The Default preset maps Signal’s snake_case events to Mailchimp event names:
| Signal event | Mailchimp event name |
|---|---|
page | page_viewed |
Products Searched | products_searched |
Product Viewed | product_viewed |
Product Added | product_added |
Checkout Started | checkout_started |
Order Completed | order_completed |
Signed Up | signed_up |
Logged In | logged_in |
Mailchimp recommends a verb_noun naming convention with an underscore delimiter, which these names follow. Event context is recorded under the Mailchimp properties object. To customise, edit the integration’s Field Mappings in the Management UI.
Example: Order Completed
Datafly.js call:
datafly.identify("user-123", { email: "jane.doe@example.com" });
datafly.track("Order Completed", {
order_id: "ORD-001",
revenue: 129.99,
currency: "USD",
coupon: "WELCOME10"
});Mailchimp Add Event request sent by Signal:
POST https://us6.api.mailchimp.com/3.0/lists/a1b2c3d4e5/members/{md5(jane.doe@example.com)}/events{
"name": "order_completed",
"occurred_at": "2026-06-06T12:00:00+00:00",
"properties": {
"order_id": "ORD-001",
"revenue": "129.99",
"currency": "USD",
"coupon": "WELCOME10"
}
}Mailchimp event properties values must be strings. Numeric values such as revenue are sent as strings.
Testing
- Add a known test contact to your audience (e.g. via the Mailchimp UI), then trigger an event for that email from your site.
- In Mailchimp, open Audience > All contacts, click the contact, and check the Activity feed — the event appears with its name and properties.
- Build an event-based segment (Audience > Segments) on the event name to confirm the event is queryable.
- On a paid marketing plan, you can also wire the event to an automation as the trigger.
Troubleshooting
| Problem | Solution |
|---|---|
404 / event not recorded | The contact does not exist in the audience. Add the contact first — Add Event does not create contacts. Also confirm list_id and dc belong to the same account as the API key. |
401 Unauthorized | Wrong or revoked API key, or the dc prefix does not match the key. Regenerate the key and re-enter both fields. |
400 Bad Request on event name | The event name contains unsupported characters. Use verb_noun snake_case with letters, digits, _, or - only. |
| Event missing properties | Mailchimp property values must be strings — ensure numeric/array values are stringified in the field mapping. |
| Automation not triggering | The Event API automation trigger requires a paid Mailchimp marketing plan. Event-based segments and merge tags work on all plans. |
| Events for some visitors never arrive | Those visitors have no identified email. Call datafly.identify() with an email before tracking events you want sent to Mailchimp. |