Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get stats through API about an email sent with Mandrill?

Tags:

email

mandrill

I can't find a way to get all stats related to one email sent through Mandrill app? Do you use Mandrill api to get the stats?

like image 571
Alexandru R Avatar asked Oct 29 '12 20:10

Alexandru R


People also ask

How do I send an email using Mandrill API?

Click on “Launch Mandrill”. Click on “Setup your sending domain” button and add your domain name. It will ask you the email associated with the domain name in order to verify it. It will send you an email, click on the link to verify your account.

What is Mandrill API?

Mandrill is a transactional email API for MailChimp users. It's reliable, powerful, and ideal for sending data driven emails, including targeted e-commerce and personalized one-to-one messages.

What is Mailchimp transactional API?

Mailchimp Transactional is a powerful email delivery service that lets you send personalized, one-to-one emails like password resets, order confirmations, and welcome messages.


1 Answers

I think at this time 1+ years later it is now possible to query based on individual messages via Mandrill "Messages Calls" e.g. at https://mandrillapp.com/api/docs/messages.JSON.html#method-info

JSON Request

{
"key": "example key",
"id": "abc123abc123abc123abc123"
}

JSON Response

{
"ts": 1365190000,
"_id": "abc123abc123abc123abc123",
"sender": "[email protected]",
"template": "example-template",
"subject": "example subject",
"email": "[email protected]",
"tags": [
    "password-reset"
],
"opens": 42,
"opens_detail": [
    {
        "ts": 1365190001,
        "ip": "55.55.55.55",
        "location": "Georgia, US",
        "ua": "Linux/Ubuntu/Chrome/Chrome 28.0.1500.53"
    }
],
"clicks": 42,
"clicks_detail": [
    {
        "ts": 1365190001,
        "url": "http://www.example.com",
        "ip": "55.55.55.55",
        "location": "Georgia, US",
        "ua": "Linux/Ubuntu/Chrome/Chrome 28.0.1500.53"
    }
],
"state": "sent",
"metadata": {
    "user_id": "123",
    "website": "www.example.com"
},
"smtp_events": [
    {
        "ts": 1365190001,
        "type": "sent",
        "diag": "250 OK"
    }
]
}

hth somebody :)...

like image 169
Wayne Earnshaw Avatar answered Oct 15 '22 15:10

Wayne Earnshaw