<?php
-
/*
+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
*
*/
-/**
- * Files required for this package
- */
-
/**
* Handle a create mailing ab testing
*
* @param array $params
- * @param array $ids
*
- * @return array API Success Array
+ * @return array
+ * API Success Array
*/
function civicrm_api3_mailing_a_b_create($params) {
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* Handle a delete event.
*
* @param array $params
- * @param array $ids
*
- * @return array API Success Array
+ * @return array
+ * API Success Array
*/
function civicrm_api3_mailing_a_b_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
),
);
break;
+
case 'total unique clicks':
$result = CRM_Mailing_Event_BAO_TrackableURLOpen::getRows($mailingAB['mailing_id_a'], NULL, TRUE, 0, 1, "civicrm_mailing_event_trackable_url_open.time_stamp ASC");
$startDate = CRM_Utils_Date::processDate($result[0]['date']);
),
);
break;
+
case 'total clicks on a particular link':
if (empty($params['target_url'])) {
throw new API_Exception("Provide url to get stats result for total clicks on a particular link");