Jump to content

CampaignSummary()

Returns a summary which includes total active recipients, unique clicks, total clicks, unique opens, total opens, unsubscribes and bounces for the provided campaign

Parameters

ApiKey (Required)
    Your application authentication key. Click here to find out more.
CampaignReportID (Required)
    The CampaignReportID for the delivered campaign.  Note: in API version 1, this parameter was named EmailID.  Click here to find out more

Return Value

On success, this method returns the following values:

  • Recipients - the total number of subscribers who were sent the campaign
  • Total Opens - the number of times the received campaign email was opened by all who received it. This includes multiple opens by the same subcriber.
  • Unique Opens - the number of subscribers who opened the received campaign email at least once. This does not factor in multiple opens by the same subscriber, so this number may be smaller than the Total Opens number.
  • Total Clicks - the number of link clicks between all links and subscribers. This includes links that are clicked more than once by the same subcriber.
  • Unique Clicks - the number of distinct link clicks. Links clicked more than once by any given subscriber are counted just once, so this number may be smaller than the Total Clicks number.
  • Unsubscribed - the number of subscribers who unsubscribed from the list to which the email campaign was sent. Unsubscribes could come from clicking the "unsubscribe" link in the footer of the email, or if enabled, from a direct update to their email preferences by clicking the appropriate link in the email footer.
  • Bounced - the number of email bounces of all types (hard and soft). For a breakdown of hard and soft bounces, use the CampaignBounces method.
  • Complaints - the number of times subscribers reported their received email as "unwanted" or "spam" using their email client.
  • Date Started - the specific date/time the email campaign started to send out, in ISO 8601 format, YYYY-MM-DDThh:mm:ss.sTZD (example: 2011-05-21T15:30:45.00+05:00, or May 21, 2011 3:30pm GMT+5)
  • Date Finished - the specific date/time the email campaign completed sending, in ISO 8601 format, YYYY-MM-DDThh:mm:ss.sTZD (example: 2012-12-21T11:11:00.00-04:00, or December 21, 2012 11:11am Eastern Time). If the campaign has not finished or is in the paused/stopped status, Date Finished will come back as an empty string.

On failure, a SOAP fault exception is thrown with one of the fault codes below.

Usage Notes

Note that CampaignReportID values are not the same as CampaignID values. CampaignReportIDs are retrieved from the Reports tab, as explained here.

Fault Codes

200 - Invalid CampaignReportID
    The Associated Campaign Report is not valid

100 - Invalid API Key
    The API key is not valid or expired

SOAP Sample Request


    
    
        
            
                STRING
                INT
            
        
    

SOAP Sample Response


    
    
        
            
                INT
                INT
                INT
                INT
                INT
                INT
                INT
                INT
                STRING
                STRING
            
        
    

Code Sample - PHP

// Import the eConnect Email API Toolkit
require_once('eConnectEmail_API_Toolkit.php');

$eConnectEmailApi = TheKeyMakerClient('YOUR_API_KEY');

$result = $eConnectEmailApi->ReturnUnsubscribed(LIST_ID, 'START_DATE');
// Show the results
print 'Response: <pre>';
print_r($result);
print '</pre>';

Code Sample - ASP.NET C#

            TheKeyMaker_v20 api = new TheKeyMaker_v20();
            // Set up input parameters
            CampaignParams campaignParams = new CampaignParams();
            campaignParams.ApiKey = txtApiKey.Text;
            campaignParams.CampaignReportID = int.Parse(txtCSCampaignReportID.Text);

            // Invoke method and store result
            CampaignSummaryReturn campaignSummary = api.CampaignSummary(campaignParams);

            // Display results
            lblResult.Text = FormatValue("Recipients", campaignSummary.Recipients.ToString())
                + FormatValue("Total Opened", campaignSummary.TotalOpened.ToString())
                + FormatValue("Unique Opened", campaignSummary.UniqueOpened.ToString())
                + FormatValue("Total Clicks", campaignSummary.TotalClicks.ToString())
                + FormatValue("Unique Clicks", campaignSummary.UniqueClicks.ToString())
                + FormatValue("Unsubscribed", campaignSummary.Unsubscribed.ToString())
                + FormatValue("Bounced", campaignSummary.Bounced.ToString())
                + FormatValue("Complaints", campaignSummary.Complaints.ToString())
                + FormatValue("DateStarted", campaignSummary.DateStarted)
                + FormatValue("DateFinished", campaignSummary.DateFinished);