Back to Documentation Overview
campaignAdvice
public static campaignAdvice(string apikey, string cid)
Retrieve the text presented in our app for how a campaign performed and any advice we may have for you - best suited for display in customized reports pages. Note: some messages will contain HTML - clean tags as necessary
- Section:
- Campaign Stats
- Parameters:
apikey a valid API Key for your user account. Get by calling login() cid the campaign id to pull advice text for (can be gathered using campaigns()) - Returns:
- array - advice on the campaign's performance
- Returned Fields:
msg the advice message type the "type" of the message. one of: negative, positive, or neutral - <?php
- /**
- This Example shows how to retrieve campaign Advice messages from the API with
- 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
- // Connect to the MailChimp server with the user's credentials.
- $advice = $api->campaignAdvice($campaignId);
- if ($api->errorCode){
- } else {
- foreach($advice as $adv){
- }
- } else {
- }
- }
- ?>
Examples (1)
download example code[1] mcapi_campaignAdvice.php
|
Add New Note
User Contributed Notes for
campaignAdvice |
|---|
| No notes, yet... Will you be the first?? |