Back to Documentation Overview

listGrowthHistory

public static listGrowthHistory(string apikey, string id)

Access the Growth History by Month for a given list.

Section:
List Related
Parameters:
apikey a valid API Key for your user account. Get by visiting your API dashboard
id the list id to connect to. Get by calling lists()
Returns:
array   -  array of months and growth
Returned Fields:
string month The Year and Month in question using YYYY-MM format
integer existing number of existing subscribers to start the month
integer imports number of subscribers imported during the month
integer optins number of subscribers who opted-in during the month

Examples (1)

download example code

[1] mcapi_listGrowthHistory.php

  1. <?php
  2.  
  3. // Include the MailChimp API code. Do Not Edit This!
  4. require_once 'inc/MCAPI.class.php';
  5. require_once 'inc/config.inc.php'; //contains apikey
  6.  
  7. $api = new MCAPI($apikey);
  8.  
  9. $history = $api->listGrowthHistory($listId);
  10.  
  11. if ($api->errorCode){
  12. echo "Unable to run listGrowthHistory()!\n\tCode=".$api->errorCode."\n\tMsg=".$api->errorMessage."\n";
  13. } else {
  14. foreach($history as $h){
  15. echo $h['month']."\n";
  16. echo "\tExisting=".$h['existing']."\n";
  17. echo "\tImports=".$h['imports']."\n";
  18. echo "\tOptins=".$h['optins']."\n";
  19. }
  20.  
  21. }
  22.  
  23. ?>
  24.  
  25.  
Add New Note User Contributed Notes for listGrowthHistory
No notes, yet... Will you be the first??