M2_Mailchimp_Reports

The Membership 2 M2 Mailchimp Reports class.

Defined (1)

The class is defined in the following location(s).

/lib/mailchimp-api/Mailchimp/Reports.php  
  1. class M2_Mailchimp_Reports { 
  2. public function __construct(M2_Mailchimp $master) { 
  3. $this->master = $master; 
  4.  
  5. /** 
  6. * Get all email addresses that complained about a given campaign 
  7. * @param string $cid 
  8. * @param associative_array $opts 
  9. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  10. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  11. * - since string optional pull only messages since this time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00" 
  12. * @return associative_array abuse report data for this campaign 
  13. * - total int the total reports matched 
  14. * - data array a struct for the each report, including: 
  15. * - date string date/time the abuse report was received and processed 
  16. * - member string the email address that reported abuse - will only contain email if the list or member has been removed 
  17. * - type string an internal type generally specifying the originating mail provider - may not be useful outside of filling report views 
  18. */ 
  19. public function abuse($cid, $opts=array()) { 
  20. $_params = array("cid" => $cid, "opts" => $opts); 
  21. return $this->master->call('reports/abuse', $_params); 
  22.  
  23. /** 
  24. * Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best 
  25. suited for display in customized reports pages. Note: some messages will contain HTML - clean tags as necessary 
  26. * @param string $cid 
  27. * @return array of structs for advice on the campaign's performance, each containing: 
  28. * - msg string the advice message 
  29. * - type string the "type" of the message. one of: negative, positive, or neutral 
  30. */ 
  31. public function advice($cid) { 
  32. $_params = array("cid" => $cid); 
  33. return $this->master->call('reports/advice', $_params); 
  34.  
  35. /** 
  36. * Retrieve the most recent full bounce message for a specific email address on the given campaign. 
  37. Messages over 30 days old are subject to being removed 
  38. * @param string $cid 
  39. * @param associative_array $email 
  40. * - email string an email address - this is recommended for this method 
  41. * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. 
  42. * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes 
  43. * @return associative_array the full bounce message for this email+campaign along with some extra data. 
  44. * - date string date the bounce was received and processed 
  45. * - member associative_array the member record as returned by lists/member-info() 
  46. * - message string the entire bounce message received 
  47. */ 
  48. public function bounceMessage($cid, $email) { 
  49. $_params = array("cid" => $cid, "email" => $email); 
  50. return $this->master->call('reports/bounce-message', $_params); 
  51.  
  52. /** 
  53. * Retrieve the full bounce messages for the given campaign. Note that this can return very large amounts 
  54. of data depending on how large the campaign was and how much cruft the bounce provider returned. Also,  
  55. messages over 30 days old are subject to being removed 
  56. * @param string $cid 
  57. * @param associative_array $opts 
  58. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  59. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  60. * - since string optional pull only messages since this time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00" 
  61. * @return associative_array data for the full bounce messages for this campaign 
  62. * - total int that total number of bounce messages for the campaign 
  63. * - data array structs containing the data for this page 
  64. * - date string date the bounce was received and processed 
  65. * - member associative_array the member record as returned by lists/member-info() 
  66. * - message string the entire bounce message received 
  67. */ 
  68. public function bounceMessages($cid, $opts=array()) { 
  69. $_params = array("cid" => $cid, "opts" => $opts); 
  70. return $this->master->call('reports/bounce-messages', $_params); 
  71.  
  72. /** 
  73. * Return the list of email addresses that clicked on a given url, and how many times they clicked 
  74. * @param string $cid 
  75. * @param int $tid 
  76. * @param associative_array $opts 
  77. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  78. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  79. * - sort_field string optional the data to sort by - "clicked" (order clicks occurred, default) or "clicks" (total number of opens). Invalid fields will fall back on the default. 
  80. * - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive) 
  81. * @return associative_array containing the total records matched and the specific records for this page 
  82. * - total int the total number of records matched 
  83. * - data array structs for each email addresses that click the requested url 
  84. * - member associative_array the member record as returned by lists/member-info() 
  85. * - clicks int Total number of times the URL was clicked by this email address 
  86. */ 
  87. public function clickDetail($cid, $tid, $opts=array()) { 
  88. $_params = array("cid" => $cid, "tid" => $tid, "opts" => $opts); 
  89. return $this->master->call('reports/click-detail', $_params); 
  90.  
  91. /** 
  92. * The urls tracked and their click counts for a given campaign. 
  93. * @param string $cid 
  94. * @return associative_array including: 
  95. * - total array structs for each url tracked for the full campaign 
  96. * - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats 
  97. * - clicks int Number of times the specific link was clicked 
  98. * - clicks_percent double the percentage of total clicks "clicks" represents 
  99. * - unique int Number of unique people who clicked on the specific link 
  100. * - unique_percent double the percentage of unique clicks "unique" represents 
  101. * - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map. 
  102. * - a array if this was an absplit campaign, stat structs for the a group 
  103. * - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats 
  104. * - clicks int Number of times the specific link was clicked 
  105. * - clicks_percent double the percentage of total clicks "clicks" represents 
  106. * - unique int Number of unique people who clicked on the specific link 
  107. * - unique_percent double the percentage of unique clicks "unique" represents 
  108. * - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map. 
  109. * - b array if this was an absplit campaign, stat structs for the b group 
  110. * - url string the url being tracked - urls are tracked individually, so duplicates can exist with vastly different stats 
  111. * - clicks int Number of times the specific link was clicked 
  112. * - clicks_percent double the percentage of total clicks "clicks" represents 
  113. * - unique int Number of unique people who clicked on the specific link 
  114. * - unique_percent double the percentage of unique clicks "unique" represents 
  115. * - tid int the tracking id used in campaign links - used primarily for reports/click-activity. also can be used to order urls by the order they appeared in the campaign to recreate our heat map. 
  116. */ 
  117. public function clicks($cid) { 
  118. $_params = array("cid" => $cid); 
  119. return $this->master->call('reports/clicks', $_params); 
  120.  
  121. /** 
  122. * Retrieve the Ecommerce Orders tracked by ecomm/order-add() 
  123. * @param string $cid 
  124. * @param associative_array $opts 
  125. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  126. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  127. * - since string optional pull only messages since this time - 24 hour format in <strong>GMT</strong>, eg "2013-12-30 20:30:00" 
  128. * @return associative_array the total matching orders and the specific orders for the requested page 
  129. * - total int the total matching orders 
  130. * - data array structs for the actual data for each order being returned 
  131. * - store_id string the store id generated by the plugin used to uniquely identify a store 
  132. * - store_name string the store name collected by the plugin - often the domain name 
  133. * - order_id string the internal order id the store tracked this order by 
  134. * - member associative_array the member record as returned by lists/member-info() that received this campaign and is associated with this order 
  135. * - order_total double the order total 
  136. * - tax_total double the total tax for the order (if collected) 
  137. * - ship_total double the shipping total for the order (if collected) 
  138. * - order_date string the date the order was tracked - from the store if possible, otherwise the GMT time we received it 
  139. * - lines array structs containing details of the order: 
  140. * - line_num int the line number assigned to this line 
  141. * - product_id int the product id assigned to this item 
  142. * - product_name string the product name 
  143. * - product_sku string the sku for the product 
  144. * - product_category_id int the id for the product category 
  145. * - product_category_name string the product category name 
  146. * - qty double optional the quantity of the item ordered - defaults to 1 
  147. * - cost double optional the cost of a single item (ie, not the extended cost of the line) - defaults to 0 
  148. */ 
  149. public function ecommOrders($cid, $opts=array()) { 
  150. $_params = array("cid" => $cid, "opts" => $opts); 
  151. return $this->master->call('reports/ecomm-orders', $_params); 
  152.  
  153. /** 
  154. * Retrieve the eepurl stats from the web/Twitter mentions for this campaign 
  155. * @param string $cid 
  156. * @return associative_array containing tweets, retweets, clicks, and referrer related to using the campaign's eepurl 
  157. * - twitter associative_array various Twitter related stats 
  158. * - tweets int Total number of tweets seen 
  159. * - first_tweet string date and time of the first tweet seen 
  160. * - last_tweet string date and time of the last tweet seen 
  161. * - retweets int Total number of retweets seen 
  162. * - first_retweet string date and time of the first retweet seen 
  163. * - last_retweet string date and time of the last retweet seen 
  164. * - statuses array an structs for statuses recorded including: 
  165. * - status string the text of the tweet/update 
  166. * - screen_name string the screen name as recorded when first seen 
  167. * - status_id string the status id of the tweet (they are really unsigned 64 bit ints) 
  168. * - datetime string the date/time of the tweet 
  169. * - is_retweet bool whether or not this was a retweet 
  170. * - clicks associative_array stats related to click-throughs on the eepurl 
  171. * - clicks int Total number of clicks seen 
  172. * - first_click string date and time of the first click seen 
  173. * - last_click string date and time of the first click seen 
  174. * - locations array structs for geographic locations including: 
  175. * - country string the country name the click was tracked to 
  176. * - region string the region in the country the click was tracked to (if available) 
  177. * - referrers array structs for referrers, including 
  178. * - referrer string the referrer, truncated to 100 bytes 
  179. * - clicks int Total number of clicks seen from this referrer 
  180. * - first_click string date and time of the first click seen from this referrer 
  181. * - last_click string date and time of the first click seen from this referrer 
  182. */ 
  183. public function eepurl($cid) { 
  184. $_params = array("cid" => $cid); 
  185. return $this->master->call('reports/eepurl', $_params); 
  186.  
  187. /** 
  188. * Given a campaign and email address, return the entire click and open history with timestamps, ordered by time. If you need to dump the full activity for a campaign 
  189. and/or get incremental results, you should use the <a href="http://apidocs.mailchimp.com/export/1.0/campaignsubscriberactivity.func.php" targret="_new">campaignSubscriberActivity Export API method</a>,  
  190. <strong>not</strong> this, especially for large campaigns. 
  191. * @param string $cid 
  192. * @param array $emails 
  193. * - email string an email address 
  194. * - euid string the unique id for an email address (not list related) - the email "id" returned from listMemberInfo, Webhooks, Campaigns, etc. 
  195. * - leid string the list email id (previously called web_id) for a list-member-info type call. this doesn't change when the email address changes 
  196. * @return associative_array of data and success/error counts 
  197. * - success_count int the number of subscribers successfully found on the list 
  198. * - error_count int the number of subscribers who were not found on the list 
  199. * - errors array array of error structs including: 
  200. * - email string whatever was passed in the email parameter 
  201. * - email string the email address added 
  202. * - euid string the email unique id 
  203. * - leid string the list member's truly unique id 
  204. * - msg string the error message 
  205. * - data array an array of structs where each activity record has: 
  206. * - email string whatever was passed in the email parameter 
  207. * - email string the email address added 
  208. * - euid string the email unique id 
  209. * - leid string the list member's truly unique id 
  210. * - member associative_array the member record as returned by lists/member-info() 
  211. * - activity array an array of structs containing the activity, including: 
  212. * - action string The action name - either open or click 
  213. * - timestamp string The date/time of the action (GMT) 
  214. * - url string For click actions, the url clicked, otherwise this is empty 
  215. * - ip string The IP address the activity came from 
  216. */ 
  217. public function memberActivity($cid, $emails) { 
  218. $_params = array("cid" => $cid, "emails" => $emails); 
  219. return $this->master->call('reports/member-activity', $_params); 
  220.  
  221. /** 
  222. * Retrieve the list of email addresses that did not open a given campaign 
  223. * @param string $cid 
  224. * @param associative_array $opts 
  225. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  226. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  227. * @return associative_array a total of all matching emails and the specific emails for this page 
  228. * - total int the total number of members who didn't open the campaign 
  229. * - data array structs for each campaign member matching as returned by lists/member-info() 
  230. */ 
  231. public function notOpened($cid, $opts=array()) { 
  232. $_params = array("cid" => $cid, "opts" => $opts); 
  233. return $this->master->call('reports/not-opened', $_params); 
  234.  
  235. /** 
  236. * Retrieve the list of email addresses that opened a given campaign with how many times they opened 
  237. * @param string $cid 
  238. * @param associative_array $opts 
  239. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  240. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  241. * - sort_field string optional the data to sort by - "opened" (order opens occurred, default) or "opens" (total number of opens). Invalid fields will fall back on the default. 
  242. * - sort_dir string optional the direct - ASC or DESC. defaults to ASC (case insensitive) 
  243. * @return associative_array containing the total records matched and the specific records for this page 
  244. * - total int the total number of records matched 
  245. * - data array structs for the actual opens data, including: 
  246. * - member associative_array the member record as returned by lists/member-info() 
  247. * - opens int Total number of times the campaign was opened by this email address 
  248. */ 
  249. public function opened($cid, $opts=array()) { 
  250. $_params = array("cid" => $cid, "opts" => $opts); 
  251. return $this->master->call('reports/opened', $_params); 
  252.  
  253. /** 
  254. * Get the top 5 performing email domains for this campaign. Users wanting more than 5 should use campaign reports/member-activity() 
  255. or campaignEmailStatsAIMAll() and generate any additional stats they require. 
  256. * @param string $cid 
  257. * @return array domains structs for each email domains and their associated stats 
  258. * - domain string Domain name or special "Other" to roll-up stats past 5 domains 
  259. * - total_sent int Total Email across all domains - this will be the same in every row 
  260. * - emails int Number of emails sent to this domain 
  261. * - bounces int Number of bounces 
  262. * - opens int Number of opens 
  263. * - clicks int Number of clicks 
  264. * - unsubs int Number of unsubs 
  265. * - delivered int Number of deliveries 
  266. * - emails_pct int Percentage of emails that went to this domain (whole number) 
  267. * - bounces_pct int Percentage of bounces from this domain (whole number) 
  268. * - opens_pct int Percentage of opens from this domain (whole number) 
  269. * - clicks_pct int Percentage of clicks from this domain (whole number) 
  270. * - unsubs_pct int Percentage of unsubs from this domain (whole number) 
  271. */ 
  272. public function domainPerformance($cid) { 
  273. $_params = array("cid" => $cid); 
  274. return $this->master->call('reports/domain-performance', $_params); 
  275.  
  276. /** 
  277. * Retrieve the countries/regions and number of opens tracked for each. Email address are not returned. 
  278. * @param string $cid 
  279. * @return array an array of country structs where opens occurred 
  280. * - code string The ISO3166 2 digit country code 
  281. * - name string A version of the country name, if we have it 
  282. * - opens int The total number of opens that occurred in the country 
  283. * - regions array structs of data for each sub-region in the country 
  284. * - code string An internal code for the region. When this is blank, it indicates we know the country, but not the region 
  285. * - name string The name of the region, if we have one. For blank "code" values, this will be "Rest of Country" 
  286. * - opens int The total number of opens that occurred in the country 
  287. */ 
  288. public function geoOpens($cid) { 
  289. $_params = array("cid" => $cid); 
  290. return $this->master->call('reports/geo-opens', $_params); 
  291.  
  292. /** 
  293. * Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured. 
  294. * @param string $cid 
  295. * @return array of structs for analytics we've collected for the passed campaign. 
  296. * - visits int number of visits 
  297. * - pages int number of page views 
  298. * - new_visits int new visits recorded 
  299. * - bounces int vistors who "bounced" from your site 
  300. * - time_on_site double the total time visitors spent on your sites 
  301. * - goal_conversions int number of goals converted 
  302. * - goal_value double value of conversion in dollars 
  303. * - revenue double revenue generated by campaign 
  304. * - transactions int number of transactions tracked 
  305. * - ecomm_conversions int number Ecommerce transactions tracked 
  306. * - goals array structs containing goal names and number of conversions 
  307. * - name string the name of the goal 
  308. * - conversions int the number of conversions for the goal 
  309. */ 
  310. public function googleAnalytics($cid) { 
  311. $_params = array("cid" => $cid); 
  312. return $this->master->call('reports/google-analytics', $_params); 
  313.  
  314. /** 
  315. * Get email addresses the campaign was sent to 
  316. * @param string $cid 
  317. * @param associative_array $opts 
  318. * - status string optional the status to pull - one of 'sent', 'hard' (bounce), or 'soft' (bounce). By default, all records are returned 
  319. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  320. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  321. * @return associative_array a total of all matching emails and the specific emails for this page 
  322. * - total int the total number of members for the campaign and status 
  323. * - data array structs for each campaign member matching 
  324. * - member associative_array the member record as returned by lists/member-info() 
  325. * - status string the status of the send - one of 'sent', 'hard', 'soft' 
  326. * - absplit_group string if this was an absplit campaign, one of 'a', 'b', or 'winner' 
  327. * - tz_group string if this was an timewarp campaign the timezone GMT offset the member was included in 
  328. */ 
  329. public function sentTo($cid, $opts=array()) { 
  330. $_params = array("cid" => $cid, "opts" => $opts); 
  331. return $this->master->call('reports/sent-to', $_params); 
  332.  
  333. /** 
  334. * Get the URL to a customized <a href="http://eepurl.com/gKmL" target="_blank">VIP Report</a> for the specified campaign and optionally send an email to someone with links to it. Note subsequent calls will overwrite anything already set for the same campign (eg, the password) 
  335. * @param string $cid 
  336. * @param array $opts 
  337. * - to_email string optional - optional, comma delimited list of email addresses to share the report with - no value means an email will not be sent 
  338. * - theme_id int optional - either a global or a user-specific theme id. Currently this needs to be pulled out of either the Share Report or Cobranding web views by grabbing the "theme" attribute from the list presented. 
  339. * - css_url string optional - a link to an external CSS file to be included after our default CSS (http://vip-reports.net/css/vip.css) <strong>only if</strong> loaded via the "secure_url" - max 255 bytes 
  340. * @return associative_array details for the shared report, including: 
  341. * - title string The Title of the Campaign being shared 
  342. * - url string The URL to the shared report 
  343. * - secure_url string The URL to the shared report, including the password (good for loading in an IFRAME). For non-secure reports, this will not be returned 
  344. * - password string If secured, the password for the report, otherwise this field will not be returned 
  345. */ 
  346. public function share($cid, $opts=array()) { 
  347. $_params = array("cid" => $cid, "opts" => $opts); 
  348. return $this->master->call('reports/share', $_params); 
  349.  
  350. /** 
  351. * Retrieve relevant aggregate campaign statistics (opens, bounces, clicks, etc.) 
  352. * @param string $cid 
  353. * @return associative_array the statistics for this campaign 
  354. * - syntax_errors int Number of email addresses in campaign that had syntactical errors. 
  355. * - hard_bounces int Number of email addresses in campaign that hard bounced. 
  356. * - soft_bounces int Number of email addresses in campaign that soft bounced. 
  357. * - unsubscribes int Number of email addresses in campaign that unsubscribed. 
  358. * - abuse_reports int Number of email addresses in campaign that reported campaign for abuse. 
  359. * - forwards int Number of times email was forwarded to a friend. 
  360. * - forwards_opens int Number of times a forwarded email was opened. 
  361. * - opens int Number of times the campaign was opened. 
  362. * - last_open string Date of the last time the email was opened. 
  363. * - unique_opens int Number of people who opened the campaign. 
  364. * - clicks int Number of times a link in the campaign was clicked. 
  365. * - unique_clicks int Number of unique recipient/click pairs for the campaign. 
  366. * - last_click string Date of the last time a link in the email was clicked. 
  367. * - users_who_clicked int Number of unique recipients who clicked on a link in the campaign. 
  368. * - emails_sent int Number of email addresses campaign was sent to. 
  369. * - unique_likes int total number of unique likes (Facebook) 
  370. * - recipient_likes int total number of recipients who liked (Facebook) the campaign 
  371. * - facebook_likes int total number of likes (Facebook) that came from Facebook 
  372. * - industry associative_array Various rates/percentages for the account's selected industry - empty otherwise. These will vary across calls, do not use them for anything important. 
  373. * - type string the selected industry 
  374. * - open_rate float industry open rate 
  375. * - click_rate float industry click rate 
  376. * - bounce_rate float industry bounce rate 
  377. * - unopen_rate float industry unopen rate 
  378. * - unsub_rate float industry unsub rate 
  379. * - abuse_rate float industry abuse rate 
  380. * - absplit associative_array If this was an absplit campaign, stats for the A and B groups will be returned - otherwise this is empty 
  381. * - bounces_a int bounces for the A group 
  382. * - bounces_b int bounces for the B group 
  383. * - forwards_a int forwards for the A group 
  384. * - forwards_b int forwards for the B group 
  385. * - abuse_reports_a int abuse reports for the A group 
  386. * - abuse_reports_b int abuse reports for the B group 
  387. * - unsubs_a int unsubs for the A group 
  388. * - unsubs_b int unsubs for the B group 
  389. * - recipients_click_a int clicks for the A group 
  390. * - recipients_click_b int clicks for the B group 
  391. * - forwards_opens_a int opened forwards for the A group 
  392. * - forwards_opens_b int opened forwards for the B group 
  393. * - opens_a int total opens for the A group 
  394. * - opens_b int total opens for the B group 
  395. * - last_open_a string date/time of last open for the A group 
  396. * - last_open_b string date/time of last open for the BG group 
  397. * - unique_opens_a int unique opens for the A group 
  398. * - unique_opens_b int unique opens for the B group 
  399. * - timewarp array If this campaign was a Timewarp campaign, an array of structs from each timezone stats exist for. Each will contain: 
  400. * - opens int opens for this timezone 
  401. * - last_open string the date/time of the last open for this timezone 
  402. * - unique_opens int the unique opens for this timezone 
  403. * - clicks int the total clicks for this timezone 
  404. * - last_click string the date/time of the last click for this timezone 
  405. * - unique_opens int the unique clicks for this timezone 
  406. * - bounces int the total bounces for this timezone 
  407. * - total int the total number of members sent to in this timezone 
  408. * - sent int the total number of members delivered to in this timezone 
  409. * - timeseries array structs for the first 24 hours of the campaign, per-hour stats: 
  410. * - timestamp string The timestemp in Y-m-d H:00:00 format 
  411. * - emails_sent int the total emails sent during the hour 
  412. * - unique_opens int unique opens seen during the hour 
  413. * - recipients_click int unique clicks seen during the hour 
  414. */ 
  415. public function summary($cid) { 
  416. $_params = array("cid" => $cid); 
  417. return $this->master->call('reports/summary', $_params); 
  418.  
  419. /** 
  420. * Get all unsubscribed email addresses for a given campaign 
  421. * @param string $cid 
  422. * @param associative_array $opts 
  423. * - start int optional for large data sets, the page number to start at - defaults to 1st page of data (page 0) 
  424. * - limit int optional for large data sets, the number of results to return - defaults to 25, upper limit set at 100 
  425. * @return associative_array a total of all unsubscribed emails and the specific members for this page 
  426. * - total int the total number of unsubscribes for the campaign 
  427. * - data array structs for the email addresses that unsubscribed 
  428. * - member string the member that unsubscribed as returned by lists/member-info() 
  429. * - reason string the reason collected for the unsubscribe. If populated, one of 'NORMAL', 'NOSIGNUP', 'INAPPROPRIATE', 'SPAM', 'OTHER' 
  430. * - reason_text string if the reason is OTHER, the text entered. 
  431. */ 
  432. public function unsubscribes($cid, $opts=array()) { 
  433. $_params = array("cid" => $cid, "opts" => $opts); 
  434. return $this->master->call('reports/unsubscribes', $_params); 
  435.