diff options
Diffstat (limited to 'pages/cp.php')
-rw-r--r-- | pages/cp.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/pages/cp.php b/pages/cp.php index d8fa2ba..8ce922e 100644 --- a/pages/cp.php +++ b/pages/cp.php @@ -6,6 +6,24 @@ htmlHeader(); <?php
+//TODO: Switch to a http request instead of curl
+// class mixpanelTracker {
+ // public $token = '24743c6567f831ddfcbbbd3f397e11e4';
+ // public $host = 'http://api.mixpanel.com/';
+ // public function __construct() {
+ // }
+ // function set($distinct_id, $properties=array()) {
+ // $params = array(
+ // '$token' => $this->token,
+ // '$distinct_id' => $distinct_id,
+ // '$set' => $properties
+ // );
+ // $url = $this->host . 'engage/?verbose=1&data=' . base64_encode(json_encode($params));
+ // exec("curl '" . $url . "' >/dev/null 2>&1 &");
+ // }
+// }
+
+
topbar($Links);
if (!$accepted) {
@@ -85,6 +103,9 @@ if (isset($_POST['updateSettings']) AND $_POST['updateSettings'] == 'true') { setOptedOutOfEmails($userID, false);
$r .= "<br />You are accepting emails";
$r .= '<script>mixpanel.people.set("$unsubscribed", false);</script>';
+
+ //$metrics = new mixpanelTracker($mpToken);
+ //$metrics->set(10, array('$unsubscribed'=>false));
}
DoRedirect($r);
exit;
|