mailing_timeline_clicked_week
php
array|boolean mailing_timeline_clicked_week ( number|array $shipmentId number $shipmentIdMax )Returns click counts by day of the week 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.":\n");
$data = mailing_timeline_opened_week($shipmentIdMin,$shipmentIdMax);
if (empty($data)) {
print("no opens recorded yet");
exit();
}
$weekConstants = explode(",",registry_get('WEEK_CONSTANTS'));
$len = count($data)-1;
for ($i = 0 to $len) {
$openedAmount = $data[$i];
if ($openedAmount > 0) {
print($weekConstants[$i]." ".$openedAmount."\n");
}
}The result will look similar to:
Clicks in mailings from 3 to 10: MONDAY 3 WEDNESDAY 6 FRIDAY 4