You are here

function MCAPI::campaignStats in Mailchimp 7

Same name and namespace in other branches
  1. 5.2 MCAPI.class.php \MCAPI::campaignStats()
  2. 5 MCAPI.class.php \MCAPI::campaignStats()
  3. 6.2 MCAPI.class.php \MCAPI::campaignStats()
  4. 6 MCAPI.class.php \MCAPI::campaignStats()

Given a list and a campaign, get all the relevant campaign statistics (opens, bounces, clicks, etc.)

Stats

@example mcapi_campaignStats.php @example xml-rpc_campaignStats.php

@returnf integer syntax_errors Number of email addresses in campaign that had syntactical errors. @returnf integer hard_bounces Number of email addresses in campaign that hard bounced. @returnf integer soft_bounces Number of email addresses in campaign that soft bounced. @returnf integer unsubscribes Number of email addresses in campaign that unsubscribed. @returnf integer abuse_reports Number of email addresses in campaign that reported campaign for abuse. @returnf integer forwards Number of times email was forwarded to a friend. @returnf integer forwards_opens Number of times a forwarded email was opened. @returnf integer opens Number of times the campaign was opened. @returnf date last_open Date of the last time the email was opened. @returnf integer unique_opens Number of people who opened the campaign. @returnf integer clicks Number of times a link in the campaign was clicked. @returnf integer unique_clicks Number of unique recipient/click pairs for the campaign. @returnf date last_click Date of the last time a link in the email was clicked. @returnf integer users_who_clicked Number of unique recipients who clicked on a link in the campaign. @returnf integer emails_sent Number of email addresses campaign was sent to.

Parameters

string $cid the campaign id to pull stats for (can be gathered using campaigns()):

Return value

array struct of the statistics for this campaign

File

./MCAPI.class.php, line 481

Class

MCAPI

Code

function campaignStats($cid) {
  $params = array();
  $params["cid"] = $cid;
  return $this
    ->callServer("campaignStats", $params);
}