t_campaign_statistics
php
array t_campaign_statistics ( string $kampania [, array|boolean $okres] )Returns general statistics for transactional mailings in the selected campaign and time range.
Parameters
In $kampania, specify the name of the campaign to retrieve statistics for.
In $okres, you can specify the time range to retrieve statistics for in the campaign.
- If omitted, returns statistics for the entire campaign duration.
- array(
$okres_od,$okres_do) - returns statistics for the specified time range (timestamps). - A single numeric value - returns statistics from the specified timestamp to the present.
Returned statistics
- Number of messages sent in the selected time range
- Number of messages received in the selected time range
- Number of clicked messages in the selected time range
- Number of addresses that unsubscribed from the campaign
- Number of bounces in the campaign
Example
php
$kampania = 'trans';
$startTime = strtotime('-14 days');
$endTime = strtotime('-7 days');
$wynik = t_campaign_statistics($kampania, array($startTime, $endTime));
print_r($wynik);Result
Array
(
[0] => 14
[1] => 11
[2] => 5
[3] => 0
[4] => 0
)