"MailChimp" (Service Connection)

Connect to MailChimp to get detailed information about email campaigns and subscription lists. MailChimp is an email marketing service platform that provides options to design, email, and save templates of email campaigns. It supports tools to track the results of the campaigns and the responses of the mailed lists.

Connecting & Authenticating

    ServiceConnect["MailChimp"] creates a connection to the MailChimp API.

Requests

    ServiceExecute["MailChimp","request",params] sends a request to the connection identified by conn, using parameters params. The following give possible requests.

    User Subscription Lists

    Request:

    "Lists" search for available lists and filter them

    Parameters:
  • "ListID"Nonelist with a specific list ID; accepts multiple in a list
    "ListName"Nonelists with a specific name
    "FromName"Nonelists with a default "FromName"
    "FromAddress"Nonelists with a default "FromAddress"
    "Subject"Nonelists with a default "Subject"
    "CreatedBefore"Nonelists created before this date; accepts DateObject and strings
    "CreatedAfter"Nonelists created since this date; accepts DateObject and strings
    MaxItems10number of elements to return
    "Exact"Falsewhether to use exact values
    "StartIndex"1start index
    "SortField""Created"field used for sorting ("Created", "Web")
    IgnoreCaseTruewhether to ignore cases when using "SortField"
  • Members in a Subscription List

    Request:

    "ListMembers" show members in a list and filter them

    Parameters:
  • "ListID"(required)the ID of the desired list
    "Status""Subscribed"show members with a specific status ("Unsubscribed", "Subscribed", or "Cleaned")
    MaxItems10number of elements to return
    "StartIndex"1start index
    "SortField"Nonefield used for sorting ("Email", "Rating", "LastUpdateTime", or "OptionTime")
    IgnoreCaseTruewhether to ignore cases when using "SortField" and "Status"
  • Abuse Reports from a Subscription List

    Request:

    "ListAbuse" show members that complained about a campaign sent to a list

    Parameters:
  • "ListID"(required)the ID of the desired list
    "StartDate"Noneabuse reports since this date; accepts DateObject and strings
    MaxItems10number of elements to return
    "StartIndex"1start index
  • Activity Stats of a Subscription List

    Request:

    "ListActivity" show daily detailed aggregated activity stats for a given list

    Parameters:
  • "ListID"(required)the ID of the desired list
  • Clients Used in a Subscription List

    Request:

    "ListClients" clients that have been tagged as being used by the list's subscribers

    Parameters:
  • "ListID"(required)the ID of the desired list
  • Monthly Growth in a Subscription List

    Request:

    "ListMonthlyGrowth" growth history by month for a given list

    Parameters:
  • "ListID"(required)the ID of the desired list
  • Locations in a Subscription List

    Request:

    "ListLocations" show locations (countries) of the list's subscribers

    Parameters:
  • "ListID"(required)the ID of the desired list
  • User Campaigns

    Request:

    "Campaigns" search for created campaigns and filter them

    Parameters:
  • "CampaignID"Nonecampaign ID
    "ParentID"NoneID of campaign's parent
    "ListID"Nonelist ID
    "FolderID"Nonefolder ID
    "TemplateID"Nonetemplate ID
    "Status"Nonecampaign status ("Sent", "Save", "Paused", "Schedule", "Sending", "Regular")
    "Type"Nonecampaign type ("Regular", "Plaintext", "ABSplit", "RSS", "Auto")
    "FromName"Nonecampaign "FromName"
    "FromAddress"Nonecampaign "FromAddress"
    "Title"Nonecampaign title
    "Subject"Nonecampaign subject
    "SendTimeStart"Noneearliest send data for campaign (accepts DateObject and strings)
    "SendTimeEnd"Nonelatest send date for campaign (accepts DateObject and strings)
    "UsesSegment"Nonewhether to return just campaigns with or without segments
    "Exact"Truewhether to use exact values
    MaxItems10number of elements to return
    "StartIndex"1start index
    "SortField""CreateTime"sorting field ("CreateTime", "SendTime", "Title", "Subject")
    IgnoreCaseTruewhether to ignore cases when using "SortField", "Type", and "Status"
  • Abuse Reports in a Campaign

    Request:

    "CampaignAbuse" get a table with all email addresses that complained about a given campaign

    Parameters:
  • "CampaignID"(required)campaign ID
    "StartIndex"1start index
    MaxItems10number of elements to return
    "StartDate"Noneonly show messages since this date; accepts DateObject and strings
  • Clicks on the URLs of a Campaign

    Request:

    "CampaignClicks" the URLs tracked and their click counts for a given campaign

    Parameters:
  • "CampaignID"(required)campaign ID
  • Opens by Country and Region of a Campaign

    Request:

    "CampaignLocations" retrieve information on the opens of countries/regions in a campaign

    Parameters:
  • "CampaignID"(required)campaign ID
  • Summary of a Campaign

    Request:

    "CampaignSummary" retrieve a summary of campaign statistics

    "CampaignSummaryTimeSeries" some information for the first 24 hours of the campaign

    Parameters:
  • "CampaignID"(required)campaign ID
  • Recipients of a Campaign

    Request:

    "CampaignRecipients" get email addresses to which the campaign was sent

    Parameters:
  • "CampaignID"(required)campaign ID
    "StartIndex"1start index
    MaxItems10number of elements to return
    "Status"Nonefilter by status ("Sent", "Hard", or "Soft")
    IgnoreCaseTruewhether to ignore cases when using "Status"
  • Emails Opened in a Campaign

    Request:

    "CampaignOpenedBy" get email addresses that opened a given campaign

    Parameters:
  • "CampaignID"(required)campaign ID
    "StartIndex"1start index
    MaxItems10number of elements to return
    "SortField""Opened"sorting field ("Opened" or "Opens")
    IgnoreCaseTruewhether to ignore cases when using "SortField"
  • Emails Not Opened in a Campaign

    Request:

    "CampaignNotOpenedBy" get email addresses that did not open a given campaign

    Parameters:
  • "CampaignID"(required)campaign ID
    "StartIndex"1start index
    MaxItems10number of elements to return
  • Unsubscribed Emails in a Campaign

    Request:

    "CampaignUnsubscriptions" get all unsubscribed email addresses for a given campaign

    Parameters:
  • "CampaignID"(required)campaign ID
    "StartIndex"1start index
    MaxItems10number of elements to return

Notes & Issues

    Use of this connection requires an internet connection and a MailChimp account.

Examples

Basic Examples  (1)

Create a new connection by launching an authentication dialog:

In[1]:=
Click for copyable input
Out[1]=

Retrieve all the lists defined for your user account:

In[2]:=
Click for copyable input
Out[2]=

Review individual entries in a list:

In[3]:=
Click for copyable input
Out[3]=

Get a list of available keys from the "Lists" query:

In[4]:=
Click for copyable input
Out[4]//TableForm=

Get a restructured association based on a selected key:

In[5]:=
Click for copyable input
Out[5]//TableForm=

Get a restructured association of the first two items based on a set of selected keys:

In[6]:=
Click for copyable input
Out[6]//TableForm=

Filter lists by a specific "ListID":

In[7]:=
Click for copyable input
Out[7]//TableForm=

Filter lists by creation date:

In[8]:=
Click for copyable input
Out[8]=

Access up to the previous 180 days of daily detailed aggregated activity stats for a given list:

In[9]:=
Click for copyable input
Out[9]=

Get all email addresses that complained about a campaign sent to a list:

In[10]:=
Click for copyable input
In[11]:=
Click for copyable input
In[12]:=
Click for copyable input
In[13]:=
Click for copyable input

Retrieve the clients that have been tagged as being used by the list's subscribers, based on user agents seen:

In[14]:=
Click for copyable input
In[15]:=
Click for copyable input

Analyze list data:

In[16]:=
Click for copyable input
In[17]:=
Click for copyable input
In[18]:=
Click for copyable input
In[19]:=
Click for copyable input
In[20]:=
Click for copyable input
In[21]:=
Click for copyable input
In[22]:=
Click for copyable input
In[23]:=
Click for copyable input
In[24]:=
Click for copyable input
In[25]:=
Click for copyable input

Get the list of campaigns and their details matching the specified filters:

In[26]:=
Click for copyable input
Out[26]=

Get a quick look at the entries in one of the campaigns:

In[27]:=
Click for copyable input
Out[27]=

Get a list of available keys from the "Campaigns" query:

In[28]:=
Click for copyable input
Out[28]//TableForm=

Get a list of the email addresses of the recipients of a campaign:

In[29]:=
Click for copyable input
Out[29]//TableForm=

Retrieve aggregate campaign statistics of a campaign:

In[30]:=
Click for copyable input
Out[30]=

Get the open rate of a campaign, or what fraction of delivered campaigns were opened by subscribers:

In[31]:=
Click for copyable input
Out[31]=

Get the click rate of a campaign, or how many successfully delivered campaigns registered at least one click:

In[32]:=
Click for copyable input
Out[32]=

Create a plot from the filtered query:

In[33]:=
Click for copyable input
Out[33]=
In[34]:=
Click for copyable input
Out[34]=

See Also

ServiceExecute  ▪  ServiceConnect  ▪  Mixpanel