diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-12 17:32:11 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-12 17:32:11 -0700 |
commit | c78e44eeab13be5a23fe9836303a4d6da2df4e2a (patch) | |
tree | 4aa0ff4280ba2d872db0d01b4ec25d8fe2affad5 /pages/cp.php | |
parent | 659de2e8017ab15c18254084608d984afd8d87a2 (diff) | |
download | pathery-c78e44eeab13be5a23fe9836303a4d6da2df4e2a.tar.xz |
Track unsubscribed status with mixpanel for future use.
Diffstat (limited to 'pages/cp.php')
-rw-r--r-- | pages/cp.php | 8 |
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>
|