Back to Documentation Overview
campaignEmailStatsAIMAll
public static campaignEmailStatsAIMAll(string apikey, string cid, integer start, integer limit)
Given a campaign and correct paging limits, return the entire click and open history with timestamps, ordered by time, for every user a campaign was delivered to.
- Section:
- Campaign AIM
- Parameters:
apikey a valid API Key for your user account. Get by calling login() cid the campaign id to get stats for (can be gathered using campaigns()) start optional - for large data sets, the page number to start at - defaults to 1st page of data (page 0) limit optional - for large data sets, the number of results to return - defaults to 100, upper limit set at 1000 - Returns:
- array - Array of structs containing actions (opens and clicks) for each email, with timestamps
- Returned Fields:
string action The action taken (open or click) date timestamp Time the action occurred string url For clicks, the URL that was clicked - <?php
- /**
- This Example shows how to iterate through the AIM stats for every email address
- associated with a campaign and do some basic error checking.
- **/
- // Include the MailChimp API code. Do Not Edit This!
- require_once 'inc/MCAPI.class.php';
- require_once 'inc/config.inc.php'; //contains apikey
- $limit = 5;
- for($i=0;$i<5;$i++){
- $allstats = $acct->campaignEmailStatsAIMAll($campaignId, $i*$limit, $limit);
- if ($api->errorCode){
- exit;
- }
- exit;
- }
- foreach($allstats as $email=>$stats){
- foreach($stats as $stat){
- if ($stat['action']=='click'){
- } else {
- }
- }
- }
- }
- ?>
Examples (1)
download example code[1] mcapi_campaignEmailStatsAIMAll.php
|
Add New Note
User Contributed Notes for
campaignEmailStatsAIMAll |
|---|
| No notes, yet... Will you be the first?? |