function MCAPI::campaignAnalytics in Mailchimp 7
Same name and namespace in other branches
- 6.2 MCAPI.class.php \MCAPI::campaignAnalytics()
Retrieve the Google Analytics data we've collected for this campaign. Note, requires Google Analytics Add-on to be installed and configured.
Stats
@example mcapi_campaignAnalytics.php
@returnf integer visits number of visits @returnf integer pages number of page views @returnf integer new_visits new visits recorded @returnf integer bounces vistors who "bounced" from your site @returnf double time_on_site @returnf integer goal_conversions number of goals converted @returnf double goal_value value of conversion in dollars @returnf double revenue revenue generated by campaign @returnf integer transactions number of transactions tracked @returnf integer ecomm_conversions number Ecommerce transactions tracked @returnf array goals an array containing goal names and number of conversions
Parameters
string $cid the campaign id to pull bounces for (can be gathered using campaigns()):
Return value
array analytics we've collected for the passed campaign.
File
- ./
MCAPI.class.php, line 655
Class
Code
function campaignAnalytics($cid) {
$params = array();
$params["cid"] = $cid;
return $this
->callServer("campaignAnalytics", $params);
}