Skip to content

campaign_timeline_opened_day ​

php
array|boolean campaign_timeline_opened_day ( number $campaignId )

Returns open counts by day for the campaign whose ID is supplied as the parameter. Returns false if the campaign ID does not exist.

Example:

php
$campaingId = 1;

print("Opens in campaign ". $campaingId." by day:\n");
$data = campaign_timeline_opened_day($campaingId);

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

$len = count($data)-1;
for ($i = 0 to $len) {
print(key($data)." ".current($data)."\n");
next($data);
}

The result will look similar to:

Opens in campaign 1 by day:
2014-10-08 10
2014-10-13 5
2014-10-16 24
2014-10-20 3