MailChimp webhook setup - OXYGEN-MARKET/oxygen-market.github.io GitHub Wiki
HOME > SNOWPLOW SETUP GUIDE > Step 2b: setup a Webhook > Mailchimp webhook setup
- 1 Overview
- 1.1 Compatibility
- 2 Setup
- 2.1 MailChimp
- 2.2 Snowplow Redshift
This webhook integration lets you track a variety of events logged by MailChimp.
Available events are:
- Subscribes
- Unsubscribes
- Profile Updates
- Email Address Changes
- Cleaned Emails
- Campaign Sending Status
For the technical implementation, see MailChimp webhook adapter.
-
Snowplow 0.9.11+ (
POST
-capable collectors for event processing, will requireGET
for initial webhook validation) - MailChimp webhook API
Integrating MailChimp's webhooks into Snowplow is a two-stage process:
- Configure MailChimp to send events to Snowplow
- (Optional) Create the MailChimp events tables into Amazon Redshift
First login to MailChimp. Select Lists from the menu panel along the left handside of the screen.
Then select Create List in the top right hand corner and fill in the required fields to create a new list.
Once we have a new list navigate to the Settings dropdown option and select Webhooks from the menu.
For the Callback URL field you will need to provide the URI to your Snowplow Collector. We use a special path to tell Snowplow that these events are generated by MailChimp:
http://<collector host>/com.mailchimp/v1
Our Webhooks setup page should look like this after we have added our Callback URL:
If you want, you can also manually override the event's platform
parameter by appending a query string to the end of the URL so:
http://<collector host>/com.callrail/v1?p=<platform code>
Supported platform codes can again be found in the Snowplow Tracker Protocol; if not set, then the value for platform
will default to srv
for a server-side application.
Before we save our MailChimp webhook we can configure what types of events MailChimp will send to our webhook and what channels will trigger these events. Simply select the boxes that are applicable to you and MailChimp will send these events to our webhook.
If you are running the Snowplow batch (Hadoop) flow with Amazon Redshift, then you should deploy the relevant event tables into your Amazon Redshift.
You can find the table definitions here:
- com_mailchimp_subscribe_1.sql
- com_mailchimp_unsubscribe_1.sql
- com_mailchimp_profile_update_1.sql
- com_mailchimp_email_address_change_1.sql
- com_mailchimp_cleaned_email_1.sql
- com_mailchimp_campaign_sending_status_1.sql
Make sure to deploy this table into the same schema as your events
table.
That's it - with this table deployed, your MailChimp events should automatically flow through into Redshift.