summaryrefslogtreecommitdiffstats
path: root/pages/cp.php
diff options
context:
space:
mode:
authorPatrick Davison <snapwilliam@gmail.com>2013-03-12 17:32:11 -0700
committerPatrick Davison <snapwilliam@gmail.com>2013-03-12 17:32:11 -0700
commitc78e44eeab13be5a23fe9836303a4d6da2df4e2a (patch)
tree4aa0ff4280ba2d872db0d01b4ec25d8fe2affad5 /pages/cp.php
parent659de2e8017ab15c18254084608d984afd8d87a2 (diff)
downloadpathery-c78e44eeab13be5a23fe9836303a4d6da2df4e2a.tar.xz
Track unsubscribed status with mixpanel for future use.
Diffstat (limited to 'pages/cp.php')
-rw-r--r--pages/cp.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/pages/cp.php b/pages/cp.php
index 97b715d..4f7b112 100644
--- a/pages/cp.php
+++ b/pages/cp.php
@@ -80,9 +80,11 @@ if (isset($_POST['updateSettings']) AND $_POST['updateSettings'] == 'true') {
if ($_POST['emailOptOut'] == 'true') {
setOptedOutOfEmails($userID, true);
$r .= "<br />You are opted out of emails";
+ $r .= '<script>mixpanel.people.set("$unsubscribed", true);</script>';
} else {
setOptedOutOfEmails($userID, false);
$r .= "<br />You are accepting emails";
+ $r .= '<script>mixpanel.people.set("$unsubscribed", false);</script>';
}
DoRedirect($r);
exit;
@@ -107,9 +109,9 @@ $displayName = $_SESSION['displayName'];
<legend>Settings:</legend>
Display Name: <input type="text" size="20" maxlength="14" value="<?php echo $displayName ?>" name="displayName" class="forminput" />
- <br /><br />
- <input type="checkbox" name="emailOptOut" value="true" <?php echo $checked ?>>
- Opt out of emails? We'll only send you important feature updates! I Promise!
+ <br /><br />We'll only send you important feature updates!
+ <br /><input type="checkbox" name="emailOptOut" value="true" <?php echo $checked ?>>
+ Opt out of emails?
<br /><br />
<input type="submit" value="Update settings" class="forminput" />
</fieldset>