Description
Use this feature to retrieve Backclick-Statistics about a newsletter.
You will get the same information as using the menu item âBackclick-Statisticsâ in the administrator surface.
Amongst other information the amount of clicks and E-Mail openings will be shown. You can either look for a specific newsletter or provide a period of time to see all applicable statistics in this period.
Backclick searches for the corresponding newsletter(s) and returns the related statistics.
If you want to request statistics for a period of time the array for the newsletter IDs must not be initialized!
Available starting from Backclick-Version 5.7.5
In order to retrieve the statistics you have to provide the following information:
- Mandator ID
- API-Key (optional authentication, if not provided the IP address will be used for authentication)
- Newsletter you want to retrieve information for (you either have to provide a list of newsletter IDs or the period of time you need the statistics for)
- List of newsletter IDs
- Period of time
- ID of mailing list you want to be searched
- Period of time to be searched in
You will retrieve a structured object containing all information as result.
The following error messages can occur in faulty requests:
- Error getting Newsletter-List-ID => The mailing list provided does not exist
Â
Example
$client = new SoapClient($wsdlUrl);
$backclickStatisticRequest = new StdClass();
$backclickStatisticRequest->mandatorId = 0;
$backclickStatisticRequest->newsletterIds = array(1);
try {
$result = $client->BackclickStatistic($backclickStatisticRequest);
var_dump($result);
} catch (Exception $e) {
echo "Fehler aufgetreten: " . $e->getMessage() . "\r\n";
}object(stdClass)#3 (1) {
["backclickStatistic"]=>
object(stdClass)#4 (22) {
["sendedByInternalMta"]=>
bool(true)
["usedConversionTracking"]=>
bool(true)
["abTest"]=>
bool(false)
["newsletterListName"]=>
string(15) "Testverteiler 1"
["newsletterSubject"]=>
string(22) "Newslettertest"
["newsletterDescription"]=>
string(22) "Newslettertest"
["newsletterId"]=>
int(1)
["newsletterListId"]=>
int(1)
["sendStartTime"]=>
string(29) "2012-10-29T11:13:00.000+01:00"
["numRecipientsUnadjusted"]=>
int(6)
["numRecipientsAdjusted"]=>
int(3)
["numSend"]=>
int(0)
["numDelivered"]=>
int(3)
["numLinksClicked"]=>
int(0)
["numOpened"]=>
int(0)
["numUniqueOpened"]=>
int(0)
["numBackclicks"]=>
int(0)
["numUniqueBackclicks"]=>
int(0)
["numActiveSuscribers"]=>
int(0)
["numConversionTracking"]=>
int(0)
["numGeneratedComplaints"]=>
int(0)
["summaryCount"]=>
int(1)
}
}$client = new SoapClient($wsdlUrl);
$backclickStatisticRequest = new StdClass();
$backclickStatisticRequest->mandatorId = 0;
$backclickStatisticRequest->newslettersInPeriod = new StdClass();
$backclickStatisticRequest->newslettersInPeriod->newsletterListId = 1;
$backclickStatisticRequest->newslettersInPeriod->timePeriod = new StdClass();
date_default_timezone_set('Europe/Berlin');
$backclickStatisticRequest->newslettersInPeriod->timePeriod->startTime = mktime(13, 10, 0, 10, 30, 2012);
$backclickStatisticRequest->newslettersInPeriod->timePeriod->endTime = mktime(13, 19, 0, 10, 30, 2012);
try {
$result = $client->BackclickStatistic($backclickStatisticRequest);
var_dump($result);
} catch (Exception $e) {
echo "Fehler aufgetreten: " . $e->getMessage() . "\r\n";
}Source code
In order to test a working example you can download the source code.