smsCampaignClickStats()

List of links on which receivers have clicked is obtained, as well as the number of total clicks and unique clicks.

smsCampaignClickStats(string $cid) : struct
Input parameters
  • cid - SMS campaign ID
Information obtained

Array of links. Each link is stored as a key of resulting array and its corresponding value is an array consisting of:

  • clicks - number of clicks
  • unique - unique clicks

Examples

mgapi_smsCampaignClickStats.php
smsCampaignClickStats($cid);
 
header("Content-Type: text/plain");
if ($api->errorCode) {
    echo "Unable to load smsCampaignClickStats()!";
    echo "\tCode=" . $api->errorCode . "\n";
    echo "\tMsg=" . $api->errorMessage . "\n";
} else {
    if (sizeof($retval) == 0) {
        echo "No stats for this sms campaign yet!\n";
    } else {
        foreach ($retval as $url => $detail) {
            echo "URL: " . $url . "\n";
            echo "\tClicks = " . $detail['clicks'] . "\n";
            echo "\tUnique Clicks = " . $detail['unique'] . "\n";
        }
    }
}

© 2010-2017 Mailigen. All rights reserved.