You can use your PostHog event data to create and update contacts in Mailchimp. Here's everything you need to get started.
Requirements
Using this requires either PostHog Cloud with the data pipelines add-on, or a self-hosted PostHog instance running a recent version of the Docker image.
Configuring Mailchimp
First, create a new API key in your Mailchimp account.
You'll also need your Mailchimp audience ID.
Finally, while logged into Mailchimp, check the subdomain of your account. You'll need this to configure the destination, as your Mailchimp datacenter id
.
Configuring PostHog’s Mailchimp destination
- In PostHog, click the Data pipeline tab in the left sidebar.
- Click the Destinations tab.
- Click New destination and choose Mailchimp's Create button.
Insert your API key, audience ID, and datacenter ID. You can also choose a different property to use as the contact's email; PostHog will default to person.properties.email
.
You can additionally forward all event properties to Mailchimp, or select specific ones using the merge field section.
Filtering
As you'll be collecting or updating contact emails, you should configure the destination filter to only accept events that have an email property set.
Testing
Once you’ve configured your Mailchimp destination, click Start testing to verify everything works the way you want.
Option | Description |
---|---|
Mailchimp API Key Type: string Required: True | See the docs here: https://mailchimp.com/help/about-api-keys/ |
Mailchimp audience ID Type: string Required: True | See the docs here: https://mailchimp.com/help/find-audience-id/ |
Mailchimp data center ID Type: string Required: True | You can find your Datacenter ID in the Mailchimp url in your browser when you're logged in. It's the 'us1' in 'https://us1.admin.mailchimp.com/lists/' |
Email of the user Type: string Required: True | Where to find the email for the contact to be created. You can use the filters section to filter out unwanted emails or internal users. |
Enable double opt-in Type: boolean Required: True | If enabled, Mailchimp sends a confirmation email to that user, and that email is tagged with a pending subscriber status. The subscriber status automatically changes to subscribed once the user confirms the email. |
Include all event properties Type: boolean Required: True | If set, all person properties will be included. Individual properties can be overridden below. |
Merge field Type: dictionary Required: False | Map of Mailchimp merge fields and their values. You can use the filters section to filter out unwanted events. Check out this page for more details: https://mailchimp.com/developer/marketing/docs/merge-fields/#add-merge-data-to-contacts |
FAQ
Is the source code for this destination available?
PostHog is open-source and so are all the destination on the platform. The source code is available on GitHub.
Who maintains this?
This is maintained by PostHog. If you have issues with it not functioning as intended, please let us know!
What if I have feedback on this destination?
We love feature requests and feedback. Please tell us what you think.
What if my question isn't answered above?
We love answering questions. Ask us anything via our community forum.