Email Statistics

You can get statistics for individual emails, quickly and simply.

You can use the id returned from Mandrill (see Email Response Example) to get instant statistics.

Example

Email Statistics Form
Email ID

Step By Step

Step 1

First you need to follow the guide for integrating the DLL and setting up Easy Email at Setting Up.

Step 2

Next add the following code to the click event of your statistic button, or wherever you want to check your statistics from.

EasyEmailForMandrill.Messages.GetEmailInformation getEmailInformation = 
new EasyEmailForMandrill.Messages.GetEmailInformation(txtEmailID.Text);
                       

//Show the response
lblOut.Text =
"Number of clicks in the email: " + 
    getEmailInformation.SentEmailInformation.NumberOfClicks;
    

Step 3

A class will be returned with the information about the template you just updated. It will contain the following information.

{
    "TimeStamp": 1365190000,
    "ID": "abc123abc123abc123abc123",
    "Sender": "sender@example.com",
    "Template": "example-template",
    "Subject": "example subject",
    "Email": "recipient.email@example.com",
    "Tags": [
        "password-reset"
    ],
    "NumberOfOpens": 42,
    "Opens": [
        {
            "TimeStamp": 1365190001,
            "IPAddress": "55.55.55.55",
            "Location": "Georgia, US",
            "UserAgent": "Linux/Ubuntu/Chrome/Chrome 28.0.1500.53"
        }
    ],
    "NumberOfClicks": 42,
    "Clicks": [
        {
            "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": {
        "UserID": "123",
        "Website": "www.example.com"
    },
    "SMTPEvents": [
        {
            "TimeStamp": 1365190001,
            "Type": "sent",
            "Information": "250 OK"
        }
    ],
    "Resend": [
        {
            "TimeStamp": 1365190001,
            "Email": "Test@Test.com"
        }
    ]
}