Skip to content

mailing_timeline_opened_hour ​

php
array|boolean mailing_timeline_opened_hour ( number|array $shipmentId number $shipmentIdMax )

Returns click counts by hour for the selected mailings. Arguments: $shipmentId - one mailing ID or an array of selected mailing IDs. $shipmentIdMax - if provided, defines the mailing range from $shipmentId to $shipmentIdMax.

Example:

php
$shipmentIdMin = 3;
$shipmentIdMax = 10;

print("Opens in mailings from ". $shipmentIdMin.
" to ".$shipmentIdMax." by hour:\n");
$data = mailing_timeline_opened_hour($shipmentIdMin,$shipmentIdMax);

if (empty($data)) {
print("no opens recorded yet");
exit();
}

$len = count($data)-1;
for ($i = 0 to $len) {
$openedAmount = $data[$i];
if ($openedAmount > 0) {
print($i." ".$openedAmount."\n");
}
}

The result will look similar to:

Opens in mailings from 3 to 15 by hour:
15 10
16 5
17 24
20 3
22 17