From 6655e673da4cf13552d14b30b1ec792646a1a483 Mon Sep 17 00:00:00 2001 From: kauffj Date: Sun, 29 Nov 2015 17:51:06 -0500 Subject: [PATCH] track email subscribe in analytics --- controller/action/MailActions.class.php | 6 ++- view/Response.class.php | 13 ++++- view/View.class.php | 10 ++++ view/layout/basic.php | 3 ++ view/mail/joinList.php | 5 ++ view/page/get-allowed.php | 65 ------------------------- 6 files changed, 34 insertions(+), 68 deletions(-) delete mode 100644 view/page/get-allowed.php diff --git a/controller/action/MailActions.class.php b/controller/action/MailActions.class.php index 5c686657..e5d094b3 100644 --- a/controller/action/MailActions.class.php +++ b/controller/action/MailActions.class.php @@ -28,14 +28,16 @@ class MailActions extends Actions $mcApi = new Mailchimp(); $mcListId = $_POST['listId']; $mergeFields = isset($_POST['mergeFields']) ? unserialize($_POST['mergeFields']) : []; - if ($mcApi->listSubscribe($mcListId, $email, $mergeFields, 'html', false)) + $success = $mcApi->listSubscribe($mcListId, $email, $mergeFields, 'html', false); + if ($success) { Session::set(Session::KEY_MAILCHIMP_LIST_IDS, array_merge(Session::get(Session::KEY_MAILCHIMP_LIST_IDS, []), [$mcListId])); Session::set('list_success', __('Great success! Welcome to LBRY.')); } else { - Session::set('list_error', __('Something went wrong adding you to the list.')); + $error = $mcApi->errorMessage ?: __('Something went wrong adding you to the list.'); + Session::set('list_error', $error); } } diff --git a/view/Response.class.php b/view/Response.class.php index 74aab04a..7a3d0286 100644 --- a/view/Response.class.php +++ b/view/Response.class.php @@ -1,5 +1,4 @@ + diff --git a/view/mail/joinList.php b/view/mail/joinList.php index 53cf48de..395c78ac 100644 --- a/view/mail/joinList.php +++ b/view/mail/joinList.php @@ -1,3 +1,8 @@ + + + ga('send', 'event', 'Sign Up', 'Join List', ''); + +
diff --git a/view/page/get-allowed.php b/view/page/get-allowed.php deleted file mode 100644 index f96bbe4c..00000000 --- a/view/page/get-allowed.php +++ /dev/null @@ -1,65 +0,0 @@ - - false]) ?> - -
-

Get LBRY

-
- This is a pre-release, alpha version of LBRY. It is only designed to show what LBRY makes possible. - Expect future releases to involve a full network reboot of both credits and metadata. -
-
-
-

Install

-
-
-

Windows

-

- If you have a standard Windows install, it will insinuate several times that you are an idiot for following the steps below. - And perhaps you are, but not because this code is dangerous or will harm your computer in any way. Future releases will involve more reputable install steps. -

-
    -
  1. Download this ZIP file.
  2. -
  3. There is no installer. Extract the ZIP to wherever you want the program to reside, such as Program Files.
  4. -
  5. Run lbry.exe.
  6. -
-
-
-

Linux

-
-

The Brave and Lazy

-
    -
  1. Make a folder called lbry where you want everything to reside.
  2. -
  3. Download and run this shell script from that folder.
  4. -
-

The Shrewd and Frivolous

-
    -
  1. Clone and follow the build steps for lbrycrd, a miner for LBRY credits.
  2. -
  3. Clone and follow the build steps for lbry, a console based application for using the LBRY protocol.
  4. -
-
-
-
-

OS X

-
-

OS X Programmers

-

You can attempt to follow the Linux build instructions.

-

Everyone Else

-

Sorry, we do not have an OS X version of LBRY other than source. We promise one will exist sooner rather than later.

-
-
-
-

Test

-

To ensure LBRY is installed correctly, try accessing a piece of content:

-
- lbry://wonderfullife -
-

In the graphical version, this can accessed by typing "wonderfullife" into the address bar and pressing "Go". In the console version, select "[7] Add a stream from a short name".

-
-

Feedback

-

We've prepared a short form for feedback regarding your LBRY experience, available below.

-

We're providing 10,000 LBC (~$100) to the first 500 people who download LBRY and submit their feedback.

-

Provide Your Feedback

-
-
- -