Skip to content

tag_clicked_all ​

php
boolean|array tag_clicked_all ( [number $afterTime] )

Returns tag click counts for the currently processed address. If a timestamp is provided as the parameter, counts only clicks after that time.

Returns an array whose keys are tag names and whose values are click counts.

Warning

Requires an address context.

Example:

php
$daysAgo = 7;
$after = time()-($daysAgo*60*60*24);

$tagsClicks = tag_clicked_all($after);

$email = get_val("email");
$clickText = " clicked tagged links within the last ".$daysAgo." days.\n";

if (empty($tagsClicks)) {
    print("Email: ".$email." has not".$clickText);
} else {
    print("Email: ".$email.$clickText);
    $len = count($tagsClicks)-1;
    for ($i = 0 to $len) {
        print(" ".key($tagsClicks).": ".current($tagsClicks));
        next($tagsClicks);
    }
}

Result:

test@sare.pl clicked tagged links within the last 7 days.
  produkt: 3
  promocja: 5