diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-24 11:41:06 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-24 11:41:06 -0700 |
commit | 41acac169cf71b9912a20ffe336dc685b221d74c (patch) | |
tree | 74e8679ca3588630963c3141a855198fe696cc39 | |
parent | 04a2320f85a024d0b795956c95c41c7320aff9c5 (diff) | |
download | pathery-41acac169cf71b9912a20ffe336dc685b221d74c.tar.xz |
Prep work for server-end mixpanel tracking for unsubscribe to prevent a desynch status of 'unsubscribed'
-rw-r--r-- | pages/cp.php | 21 | ||||
-rw-r--r-- | pages/process.php | 2 |
2 files changed, 22 insertions, 1 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;
diff --git a/pages/process.php b/pages/process.php index 21604de..5591954 100644 --- a/pages/process.php +++ b/pages/process.php @@ -114,7 +114,7 @@ function getTaskUpdate(command) { <div class='wrapper'> <form> <fieldset> - <legend>Load Map:</legend> + <legend>Tasks:</legend> <div class='plusMinus'> Recalculate all statistics: <input type="button" value="Recalculate!" class="forminput" onclick='recalculate()'/> </div> |