Overview
  • Namespace
  • Class

Namespaces

  • MailChimp
    • AuthorizedApps
    • Automations
    • Batches
    • CampaignFolders
    • Campaigns
    • Conversations
    • Ecommerce
    • FileManager
    • Lists
    • Reports
    • TemplateFolders
    • Templates

Classes

  • MailChimp\AuthorizedApps\AuthorizedApps
  • MailChimp\Automations\Automations
  • MailChimp\Batches\Batches
  • MailChimp\CampaignFolders\CampaignFolders
  • MailChimp\Campaigns\Campaigns
  • MailChimp\Campaigns\Content
  • MailChimp\Campaigns\Feedback
  • MailChimp\Conversations\Conversations
  • MailChimp\Ecommerce\Carts
  • MailChimp\Ecommerce\Customers
  • MailChimp\Ecommerce\Ecommerce
  • MailChimp\Ecommerce\Orders
  • MailChimp\Ecommerce\Products
  • MailChimp\FileManager\Files
  • MailChimp\FileManager\Folders
  • MailChimp\Lists\Interests
  • MailChimp\Lists\Lists
  • MailChimp\Lists\Members
  • MailChimp\Lists\MergeFields
  • MailChimp\Lists\Segments
  • MailChimp\Lists\SignupForms
  • MailChimp\Lists\Webhooks
  • MailChimp\MailChimp
  • MailChimp\Reports\Reports
  • MailChimp\TemplateFolders\TemplateFolders
  • MailChimp\Templates\Templates
  1 <?php
  2 
  3 namespace MailChimp\Reports;
  4 
  5 use MailChimp\MailChimp as MailChimp;
  6 
  7 class Reports extends MailChimp
  8 {
  9 
 10     /**
 11      * Get a list of templates for the account
 12      *
 13      * Available query fields:
 14      * array["fields"]              array       list of strings of response fields to return
 15      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
 16      * array["count"]               int         number of records to return
 17      * array["offset"]              int         number of records from a collection to skip.
 18      * array["folder_id"]           string      Filter results by a specific campaign folder.
 19      * array["type"]                string      The campaign type.
 20      *                                          Possible values: regular,plaintext,absplit,rss,variate
 21      * array["before_send_time"]    string      Restrict the response to campaigns sent before the set time.
 22      *                                          ISO 8601 time format: 2015-10-21T15:41:36+00:00.
 23      * array["since_send_time"]     string      Restrict the response to campaigns sent after the set time.
 24      *                                          ISO 8601 time format: 2015-10-21T15:41:36+00:00.
 25      *
 26      * @param array $query (See Above) OPTIONAL associative array of query parameters.
 27      * @return object
 28      */
 29     public function getCamapaignReports(array $query = [])
 30     {
 31         return self::execute("GET", "reports", $query);
 32     }
 33 
 34     /**
 35      * Get a list of campaigns for the account
 36      *
 37      * Available query fields:
 38      * array["fields"]              array       list of strings of response fields to return
 39      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
 40      *
 41      * @param string $campaign_id
 42      * @param array $query (See Above) OPTIONAL associative array of query parameters.
 43      * @return object
 44      */
 45     public function getCampaignReport($campaign_id, array $query = [])
 46     {
 47         return self::execute("GET", "reports/{$campaign_id}", $query);
 48     }
 49 
 50     /**
 51      * Get a list of abuse complaints for a specific campaign.
 52      *
 53      * Available query fields:
 54      * array["fields"]              array       list of strings of response fields to return
 55      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
 56      *
 57      * @param string $campaign_id
 58      * @param array $query (See Above) OPTIONAL associative array of query parameters.
 59      * @return object
 60      */
 61     public function getAbuseReports($campaign_id, array $query = [])
 62     {
 63         return self::execute("GET", "reports/{$campaign_id}/abuse-reports", $query);
 64     }
 65 
 66     /**
 67      * Get information about a specific abuse report for a campaign.
 68      *
 69      * Available query fields:
 70      * array["fields"]              array       list of strings of response fields to return
 71      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
 72      *
 73      * @param string $campaign_id
 74      * @param string $report_id
 75      * @param array $query (See Above) OPTIONAL associative array of query parameters.
 76      * @return object
 77      */
 78     public function getAbuseReport($campaign_id, $report_id, array $query = [])
 79     {
 80         return self::execute("GET", "reports/{$campaign_id}/abuse-reports/{$report_id}", $query);
 81     }
 82 
 83     /**
 84      * Get feedback based on a campaign’s statistics.
 85      *
 86      * Available query fields:
 87      * array["fields"]              array       list of strings of response fields to return
 88      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
 89      *
 90      * @param string $campaign_id
 91      * @param array $query (See Above) OPTIONAL associative array of query parameters.
 92      * @return object
 93      */
 94     public function getAdvice($campaign_id, array $query = [])
 95     {
 96         return self::execute("GET", "reports/{$campaign_id}/advice", $query);
 97     }
 98 
 99     /**
100      * Get information about clicks on specific links in your MailChimp campaigns.
101      *
102      * Available query fields:
103      * array["fields"]              array       list of strings of response fields to return
104      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
105      * array["count"]               int         number of records to return
106      * array["offset"]              int         number of records from a collection to skip.
107      *
108      * @param string $campaign_id
109      * @param array $query (See Above) OPTIONAL associative array of query parameters.
110      * @return object
111      */
112     public function getClickReports($campaign_id, array $query = [])
113     {
114         return self::execute("GET", "reports/{$campaign_id}/click-details", $query);
115     }
116 
117     /**
118      * Get click details for a specific link.
119      *
120      * Available query fields:
121      * array["fields"]              array       list of strings of response fields to return
122      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
123      *
124      * @param string $campaign_id
125      * @param string $report_id
126      * @param array $query (See Above) OPTIONAL associative array of query parameters.
127      * @return object
128      */
129     public function getClickReport($campaign_id, $link_id, array $query = [])
130     {
131         return self::execute("GET", "reports/{$campaign_id}/click-details/{$link_id}", $query);
132     }
133 
134     /**
135      * Get information about list members who clicked on a specific link in a campaign.
136      *
137      * Available query fields:
138      * array["fields"]              array       list of strings of response fields to return
139      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
140      * array["count"]               int         number of records to return
141      * array["offset"]              int         number of records from a collection to skip.
142      *
143      * @param string $campaign_id
144      * @param string $link_id
145      * @param array $query (See Above) OPTIONAL associative array of query parameters.
146      * @return object
147      */
148     public function getClickReportMembers($campaign_id, $link_id, array $query = [])
149     {
150         return self::execute("GET", "reports/{$campaign_id}/click-details/{$link_id}/members", $query);
151     }
152 
153     /**
154      * Get information about a specific subscriber who clicked a link in a specific campaign.
155      *
156      * Available query fields:
157      * array["fields"]              array       list of strings of response fields to return
158      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
159      *
160      * @param string $campaign_id
161      * @param string $link_id
162      * @param string $subscriber_hash
163      * @param array $query (See Above) OPTIONAL associative array of query parameters.
164      * @return object
165      */
166     public function getClickReportMember($campaign_id, $link_id, $subscriber_hash, array $query = [])
167     {
168         return self::execute("GET", "reports/{$campaign_id}/click-details/{$link_id}/members/{$subscriber_hash}", $query);
169     }
170 
171     /**
172      * Get statistics for the top-performing email domains in a campaign.
173      *
174      * Available query fields:
175      * array["fields"]              array       list of strings of response fields to return
176      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
177      *
178      * @param string $campaign_id
179      * @param array $query (See Above) OPTIONAL associative array of query parameters.
180      * @return object
181      */
182     public function getDomainPerformance($campaign_id, array $query = [])
183     {
184         return self::execute("GET", "reports/{$campaign_id}/domain-performance", $query);
185     }
186 
187     /**
188      * Get a summary of social activity for the campaign, tracked by EepURL.
189      *
190      * Available query fields:
191      * array["fields"]              array       list of strings of response fields to return
192      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
193      *
194      * @param string $campaign_id
195      * @param array $query (See Above) OPTIONAL associative array of query parameters.
196      * @return object
197      */
198     public function getSocialActivity($campaign_id, array $query = [])
199     {
200         return self::execute("GET", "reports/{$campaign_id}/eepurl", $query);
201     }
202 
203     /**
204      * Get a list of member’s subscriber activity in a specific campaign.
205      *
206      * Available query fields:
207      * array["fields"]              array       list of strings of response fields to return
208      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
209      * array["count"]               int         number of records to return
210      * array["offset"]              int         number of records from a collection to skip.
211      *
212      * @param string $campaign_id
213      * @param array $query (See Above) OPTIONAL associative array of query parameters.
214      * @return object
215      */
216     public function getEmailActivity($campaign_id, array $query = [])
217     {
218         return self::execute("GET", "reports/{$campaign_id}/email-activity", $query);
219     }
220 
221     /**
222      * Get a specific list member’s activity in a campaign including opens, clicks, and bounces.
223      *
224      * Available query fields:
225      * array["fields"]              array       list of strings of response fields to return
226      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
227      *
228      * @param string $campaign_id
229      * @param string $subscriber_hash
230      * @param array $query (See Above) OPTIONAL associative array of query parameters.
231      * @return object
232      */
233     public function getMemberActivity($campaign_id, $subscriber_hash, array $query = [])
234     {
235         return self::execute("GET", "reports/{$campaign_id}/email-activity/{$subscriber_hash}", $query);
236     }
237 
238     /**
239      * Get top open locations for a specific campaign.
240      *
241      * Available query fields:
242      * array["fields"]              array       list of strings of response fields to return
243      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
244      *
245      * @param string $campaign_id
246      * @param array $query (See Above) OPTIONAL associative array of query parameters.
247      * @return object
248      */
249     public function getTopLocations($campaign_id, array $query = [])
250     {
251         return self::execute("GET", "reports/{$campaign_id}/locations", $query);
252     }
253 
254     /**
255      * Get information about campaign recipients.
256      *
257      * Available query fields:
258      * array["fields"]              array       list of strings of response fields to return
259      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
260      * array["count"]               int         number of records to return
261      * array["offset"]              int         number of records from a collection to skip.
262      *
263      * @param string $campaign_id
264      * @param array $query (See Above) OPTIONAL associative array of query parameters.
265      * @return object
266      */
267     public function getSentToMembers($campaign_id, array $query = [])
268     {
269         return self::execute("GET", "reports/{$campaign_id}/sent-to", $query);
270     }
271 
272     /**
273      * Get information about a specific campaign recipient.
274      *
275      * Available query fields:
276      * array["fields"]              array       list of strings of response fields to return
277      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
278      *
279      * @param string $campaign_id
280      * @param string $subscriber_hash
281      * @param array $query (See Above) OPTIONAL associative array of query parameters.
282      * @return object
283      */
284     public function getSentToMember($campaign_id, $subscriber_hash, array $query = [])
285     {
286         return self::execute("GET", "reports/{$campaign_id}/sent-to/{$subscriber_hash}", $query);
287     }
288 
289     /**
290      * Get a list of reports with child campaigns for a specific parent campaign.
291      *
292      * Available query fields:
293      * array["fields"]              array       list of strings of response fields to return
294      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
295      *
296      * @param string $campaign_id
297      * @param array $query (See Above) OPTIONAL associative array of query parameters.
298      * @return object
299      */
300     public function getSubReports($campaign_id, array $query = [])
301     {
302         return self::execute("GET", "reports/{$campaign_id}/sub-reports", $query);
303     }
304 
305     /**
306      * Get information about members who have unsubscribed from a specific campaign.
307      *
308      * Available query fields:
309      * array["fields"]              array       list of strings of response fields to return
310      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
311      * array["count"]               int         number of records to return
312      * array["offset"]              int         number of records from a collection to skip.
313      *
314      * @param string $campaign_id
315      * @param array $query (See Above) OPTIONAL associative array of query parameters.
316      * @return object
317      */
318     public function getUnsubscribedMembers($campaign_id, array $query = [])
319     {
320         return self::execute("GET", "reports/{$campaign_id}/unsubscribed", $query);
321     }
322 
323     /**
324      * Get information about a specific list member who unsubscribed from a campaign.
325      *
326      * Available query fields:
327      * array["fields"]              array       list of strings of response fields to return
328      * array["exclude_fields"]      array       list of strings of response fields to exclude (not to be used with "fields")
329      *
330      * @param string $campaign_id
331      * @param string $subscriber_hash
332      * @param array $query (See Above) OPTIONAL associative array of query parameters.
333      * @return object
334      */
335     public function getUnsubscribedMember($campaign_id, $subscriber_hash, array $query = [])
336     {
337         return self::execute("GET", "reports/{$campaign_id}/unsubscribed/{$subscriber_hash}", $query);
338     }
339 
340 }
341 
API documentation generated by ApiGen