Campaign reports or major statistical data of campaign are obtained. In order to obtain more detailed data, additional functions have to be used.
campaignStats(string $cid) : array
Campaign statistics is represented as an array that includes:
campaignStats($cid); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignStats()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Stats for " . $cid . "\n"; foreach ($retval as $k => $v) { echo "\t" . $k . " => " . $v . "\n"; } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId) ), 'struct'); $f = new xmlrpcmsg('campaignStats', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "Stats for " . $campaignId . "\n"; foreach ($retval as $k => $v) { echo "\t" . $k . " => " . $v . "\n"; } } else { echo "Unable to run campaignStats()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId retval = api.campaignStats(cid) if api.errorCode: print "Unable to load campaignStats()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "Stats for ", cid for k,v in retval.items(): print "\t", k, " => ", v
Data is obtained about hard bounces of a particular campaign.
campaignHardBounces(string $cid, integer $start, integer $limit) : array
campaignHardBounces($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignHardBounces()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(1000) ), 'struct'); $f = new xmlrpcmsg('campaignHardBounces', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } } else { echo "Unable to run campaignHardBounces()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId start = 0 limit = 1000 retval = api.campaignHardBounces(cid, start, limit) if api.errorCode: print "Unable to load campaignHardBounces()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "E-mails returned: %d" % (len(retval)) for email in retval: print "\t", email
Data is obtained about soft bounces of a particular campaign.
campaignSoftBounces(string $cid, integer $start, integer $limit) : array
campaignSoftBounces($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignSoftBounces()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(1000) ), 'struct'); $f = new xmlrpcmsg('campaignSoftBounces', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } } else { echo "Unable to run campaignSoftBounces()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId start = 0 limit = 1000 retval = api.campaignSoftBounces(cid, start, limit) if api.errorCode: print "Unable to load campaignSoftBounces()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "E-mails returned: %d" % (len(retval)) for email in retval: print "\t", email
Data is obtained about blocked bounces of a particular campaign.
campaignBlockedBounces(string $cid, integer $start, integer $limit) : array
campaignBlockedBounces($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignBlockedBounces()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
List of all the links found in campaign is obtained, as well as the number of total clicks and unique clicks.
campaignClickStats(string $cid) : struct
Array of links consisting of:
<?php /** * This Example shows how to campaignClickStats using the MGAPI.php class and do some basic error checking. */ require_once 'inc/MGAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new MGAPI($apikey); $cid = $campaignId; $retval = $api->campaignClickStats($cid); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignClickStats()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { if (sizeof($retval) == 0) { echo "No stats for this campaign yet!\n"; } else { foreach ($retval as $url => $detail) { echo "Link id: {$detail['id']} - {$detail['url']}\n"; echo "\tClicks = {$detail['clicks']}\n"; echo "\tUnique Clicks = {$detail['unique']}\n"; } } }
<?php /** * This Example shows how execute a campaignClickStats and check the result using XML-RPC. * Note that we are using the PEAR XML-RPC client and recommend others do as well. */ require_once 'xmlrpc-3.0.0.beta/xmlrpc.inc'; require_once 'inc/config.inc.php'; $apiUrl = parse_url($apiUrl); $v = new xmlrpcval(array( 'apikey' => new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(1000) ), 'struct'); $f = new xmlrpcmsg('campaignClickStats', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); if (sizeof($stats) == 0) { echo "No stats for this campaign yet!\n"; } else { foreach ($retval as $url => $detail) { echo "URL: " . $url . "\n"; echo "\tClicks = " . $detail['clicks'] . "\n"; echo "\tUnique Clicks = " . $detail['unique'] . "\n"; } } } else { echo "Unable to run campaignClickStats()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId retval = api.campaignClickStats(cid) if api.errorCode: print "Unable to load campaignClickStats()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: if len(retval) == 0: print "No stats for this campaign yet!" else: for url, detail in retval.items(): print "URL: %s" % (url) print "\tClicks = %s" % (detail['clicks']) print "\tUnique Clicks = %s" % (detail['unique'])
Detailed list of email clicks that were made in given campaign sorted in ascending order by date when click occured.
campaignClickStatsDetails(string $cid, array $filters, integer $start, integer $limit) : array
Array of email click statistics consisting of:
<?php /** This Example shows how to campaignClickStatsDetails using the MGAPI.php class and do some basic error checking. **/ require_once 'inc/MGAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new MGAPI($apikey); $cid = $campaignId; $filters = [ // 'linkId' => '000000', 'link' => 'http://example.com/', ]; $start = 0; $limit = 25; $retval = $api->campaignClickStatsDetails($cid, $filters, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignClickStatsDetails()!"; echo "\tCode={$api->errorCode}\n"; echo "\tMsg={$api->errorMessage}\n"; } else { if (sizeof($retval) == 0) { echo "No stats for this campaign yet!\n"; } else { foreach ($retval as $detail) { echo "Email = {$detail['email']}\n"; echo "Link = {$detail['link']}\n"; echo "Date = {$detail['date']}\n"; echo "Device = {$detail['device']}\n"; echo "Browser = {$detail['browser']}\n"; echo "\n"; } } }
Data is obtained about not opened emails for a particular campaign.
campaignNotOpened(string $cid, integer $start, integer $limit) : array
Information about not opened emails is represented as an array that includes:
campaignNotOpened($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode){ echo "Unable to load campaignNotOpened()!"; echo "\tCode=".$api->errorCode."\n"; echo "\tMsg=".$api->errorMessage."\n"; } else { if (sizeof($retval)==0){ echo "No stats for this campaign yet!\n"; } else { echo "Total: ".$retval['total']."\n"; foreach($retval['data'] as $email){ echo "\tE-mail: ".$email."\n"; } } }
Data is obtained about temporary bounces of a particular campaign.
campaignTemporaryBounces(string $cid, integer $start, integer $limit) : array
campaignTemporaryBounces($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignTemporaryBounces()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
Data is obtained about generic bounces of a particular campaign.
campaignGenericBounces(string $cid, integer $start, integer $limit) : array
campaignGenericBounces($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignGenericBounces()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
List of recipients’ email domains (array) is obtained, as well as statistics about each of these email domains.
campaignEmailDomainPerformance(string $cid) : array
Array of domains. Each domain is represented as an array consisting of:
campaignEmailDomainPerformance($cid); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignEmailDomainPerformance()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { if (sizeof($retval) == 0) { echo "No Email Domain stats yet!\n"; } else { foreach ($retval as $domain) { echo $domain['domain'] . "\n"; echo "\tEmails: " . $domain['emails'] . "\n"; echo "\tOpens: " . $domain['opens'] . "\n"; echo "\tClicks: " . $domain['clicks'] . "\n"; } } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(1000) ), 'struct'); $f = new xmlrpcmsg('campaignEmailDomainPerformance', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); if (sizeof($retval) == 0) { echo "No Email Domain stats yet!\n"; } else { foreach ($retval as $domain) { echo $domain['domain'] . "\n"; echo "\tEmails: " . $domain['emails'] . "\n"; echo "\tOpens: " . $domain['opens'] . "\n"; echo "\tClicks: " . $domain['clicks'] . "\n"; } } } else { echo "Unable to run campaignEmailDomainPerformance()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId retval = api.campaignEmailDomainPerformance(cid) if api.errorCode: print "Unable to load campaignEmailDomainPerformance()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: if len(retval) == 0: print "No Email Domain stats yet!" else: for domain in retval: print domain['domain'] print "\tEmails: ", domain['emails'] print "\tOpens: ", domain['opens'] print "\tClicks: ", domain['clicks']
Unsubscribed emails are found.
campaignUnsubscribes(string $cid, integer $start, integer $limit) : array
campaignUnsubscribes($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignUnsubscribes()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(1000) ), 'struct'); $f = new xmlrpcmsg('campaignUnsubscribes', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "E-mails returned: " . sizeof($retval) . "\n"; foreach ($retval as $email) { echo "\t" . $email . "\n"; } } else { echo "Unable to run campaignUnsubscribes()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId start = 0 limit = 1000 retval = api.campaignUnsubscribes(cid, start, limit) if api.errorCode: print "Unable to load campaignUnsubscribes()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "E-mails returned: %d" % (len(retval)) for email in retval: print "\t", email
Data is obtained about countries in which emails were opened.List (array) of countries and number of opened emails in each country is returned.
campaignGeoOpens(string $cid) : array
Array of countries. Each country is represented as an array consisting of:
campaignGeoOpens($cid); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignGeoOpens()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Open from " . sizeof($retval) . " countries:\n"; foreach ($retval as $country) { echo "\t" . $country['code'] . "\t" . $country['name'] . "\t" . $country['opens'] . "\n"; } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId) ), 'struct'); $f = new xmlrpcmsg('campaignGeoOpens', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "Open from " . sizeof($retval) . " countries:\n"; foreach ($retval as $country) { echo "\t" . $country['code'] . "\t" . $country['name'] . "\t" . $country['opens'] . "\n"; } } else { echo "Unable to run campaignGeoOpens()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId retval = api.campaignGeoOpens(cid) if api.errorCode: print "Unable to load campaignGeoOpens()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "Open from %d countries:" % (len(retval)) for country in retval: print "\t", country['code'], "\t", country['name'], "\t", country['opens']
Data is obtained about forwarded emails for a particular campaign if forwarding code is embedded in the campaign.
campaignForwardStats(string $cid, integer $start, integer $limit) : array
campaignForwardStats($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignForwardStats()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { if (sizeof($retval) == 0) { echo "No stats for this campaign yet!\n"; } else { foreach ($retval as $email => $detail) { echo "E-mail: " . $email . "\n"; echo "\tFriend name = " . $detail['friend_name'] . "\n"; } } }
new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(25) ), 'struct'); $f = new xmlrpcmsg('campaignForwardStats', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); if (sizeof($retval) == 0) { echo "No stats for this campaign yet!\n"; } else { foreach ($retval as $email => $detail) { echo "E-mail: " . $email . "\n"; echo "\tFriend name = " . $detail['friend_name'] . "\n"; } } } else { echo "Unable to run campaignForwardStats()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId start = 0 limit = 1000 retval = api.campaignForwardStats(cid, start, limit) if api.errorCode: print "Unable to load campaignForwardStats()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: if len(retval) == 0: print "No stats for this campaign yet!" else: for email, detail in retval.items(): print "E-mail: ", email print "\tFriend name = ", detail['friend_name']
Data is obtained about countries in which emails were opened.List (array) of countries and number of opened emails in each country is returned.
campaignGeoOpensByCountry(string $cid, string $code) : array
Array of countries. Each country is represented as an array consisting of:
<?php /** This Example shows how to campaignGeoOpensByCountry using the MGAPI.php class and do some basic error checking. **/ require_once 'inc/MGAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new MGAPI($apikey); $cid = $campaignId; $code = 'LV'; $retval = $api->campaignGeoOpensByCountry($cid, $code); header("Content-Type: text/plain"); if ($api->errorCode){ echo "Unable to load campaignGeoOpensByCountry()!"; echo "\tCode=".$api->errorCode."\n"; echo "\tMsg=".$api->errorMessage."\n"; } else { if (empty($retval)) { echo "No stats for this country present\n"; } else { echo "Country code: " . $retval["code"] . "\n"; echo "Country name: " . $retval["name"] . "\n"; echo "Opens: " . $retval["opens"] . "\n"; } }
Messages are received from email recipient server in cases email was hard bounced. Reports are obtained only about emails that are not older than 30 days. Email list with additional parameters is returned.
campaignBounceMessages(string $cid, integer $start, integer $limit) : array
Array of bounce messages. Each message is represented as an array that includes:
<?php /** * This Example shows how to campaignBounceMessages using the MGAPI.php class and do some basic error checking. */ require_once 'inc/MGAPI.class.php'; require_once 'inc/config.inc.php'; //contains apikey $api = new MGAPI($apikey); $cid = $campaignId; $start = 0; $limit = 25; $retval = $api->campaignBounceMessages($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode) { echo "Unable to load campaignBounceMessages()!"; echo "\tCode=" . $api->errorCode . "\n"; echo "\tMsg=" . $api->errorMessage . "\n"; } else { echo "Messages returned: " . sizeof($retval) . "\n"; foreach ($retval as $msg) { echo $msg['date'] . " - " . $msg['email'] . "\n"; echo substr($msg['message'], 0, 150) . "\n\n"; } }
<?php /** * This Example shows how execute a campaignBounceMessages and check the result using XML-RPC. * Note that we are using the PEAR XML-RPC client and recommend others do as well. */ require_once 'xmlrpc-3.0.0.beta/xmlrpc.inc'; require_once 'inc/config.inc.php'; $apiUrl = parse_url($apiUrl); $v = new xmlrpcval(array( 'apikey' => new xmlrpcval($apikey), 'cid' => new xmlrpcval($campaignId), 'start' => new xmlrpcval(0), 'limit' => new xmlrpcval(25) ), 'struct'); $f = new xmlrpcmsg('campaignBounceMessages', array($v)); $c = new xmlrpc_client($apiUrl["path"], $apiUrl['host'], 80); $c->setDebug($debug); $r = &$c->send($f); header("Content-Type: text/plain"); if (!$r->faultCode()) { $retval = php_xmlrpc_decode($r->value()); echo "Messages returned: " . sizeof($retval) . "\n"; foreach ($retval as $msg) { echo $msg['date'] . " - " . $msg['email'] . "\n"; echo substr($msg['message'], 0, 150) . "\n\n"; } } else { echo "Unable to run campaignBounceMessages()!\n"; echo "\tCode=" . $r->faultCode() . "\n"; echo "\tMsg=" . $r->faultString() . "\n"; }
from lib.config import * #contains apikey from lib.MGAPI import MGAPI # This Example shows how to ping using the MGAPI.php class and do some basic error checking. api = MGAPI(apikey) cid = campaignId start = 0 limit = 25 retval = api.campaignBounceMessages(cid, start, limit) if api.errorCode: print "Unable to load campaignBounceMessages()!" print "\tCode=", api.errorCode print "\tMsg=", api.errorMessage else: print "Messages returned: %d" % (len(retval)) for msg in retval: print "%s - %s" % (msg['date'], msg['email']) print msg['message'][0:150]
Data is obtained about opened emails for a particular campaign.
campaignOpened(string $cid, integer $start, integer $limit) : array
Information about opened emails is represented as an array that includes:
campaignOpened($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode){ echo "Unable to load campaignOpened()!"; echo "\tCode=".$api->errorCode."\n"; echo "\tMsg=".$api->errorMessage."\n"; } else { if (sizeof($retval)==0){ echo "No stats for this campaign yet!\n"; } else { echo "Total: ".$retval['total']."\n"; foreach($retval['data'] as $data){ echo "\tE-mail: ".$data['email']."\n"; echo "\tCount: ".$data['count']."\n\n"; } } }
Data is obtained about not opened emails for a particular campaign.
campaignNotOpened(string $cid, integer $start, integer $limit) : array
Information about not opened emails is represented as an array that includes:
campaignNotOpened($cid, $start, $limit); header("Content-Type: text/plain"); if ($api->errorCode){ echo "Unable to load campaignNotOpened()!"; echo "\tCode=".$api->errorCode."\n"; echo "\tMsg=".$api->errorMessage."\n"; } else { if (sizeof($retval)==0){ echo "No stats for this campaign yet!\n"; } else { echo "Total: ".$retval['total']."\n"; foreach($retval['data'] as $email){ echo "\tE-mail: ".$email."\n"; } } }