Mailchimp API 3.0 How to retrieve statistics for an automation with a daterange

1.1k views Asked by At

Hi I need to build a dashboard which shows stats for our automation campaigns such as sends, opens, bounces etc.

The Mailchimp api only returns for the entire period the automation has been active. I want to see the stats for a particulier date, however I can't find an API method that accepts a date range or groups results per date. The lists/activity method is exactly what I need, but it doesn't include e-mails sent using an automation :(

I have emailed the Mailchimp support team and they recommend me to use the /reports/email-activity method. This returns a long list of all open and bounce activities for an automation. I have tried to use this, but this is also not a good solution. This means I would have to store thousands of events in MySQL and run complicated group by and where queries to get my data. Furthermore this only includes the open, click and bounce events, thus this data is worthless without knowing how much e-mails were sent on the date of an event because you can't calculate open rates.

Does anyone know a way the retrieve stats for just one date? What I am looking for is a Mailchimp version of Mandrill method: https://mandrillapp.com/api/docs/messages.JSON.html#method=search-time-series.

Thank you for you time and help

1

There are 1 answers

0
Roberto Poblete On

for the campaigns exist "Response body parameters"

  • before_send_time
  • since_send_time

    campaigns?since_send_time=2016-02-21T15:41:36+00:00&before_send_time=2017-03-10T15:41:36+00:00