Last Comment Bug 874932 - Add a newsletter signup form (Firefox Marketplace - Firefox OS)
: Add a newsletter signup form (Firefox Marketplace - Firefox OS)
Status: RESOLVED FIXED
[qa+]
:
Product: Marketplace
Classification: Server Software
Component: Consumer Pages (show other bugs)
: 1.0
: All All
: P1 normal (vote)
: 2013-07-11
Assigned To: Davor Spasovski [:spasovski]
:
Mentors:
Depends on: 874958 884598 888516 889111 889458 889468
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-22 09:25 PDT by Wil Clouser [:clouserw]
Modified: 2014-08-07 10:38 PDT (History)
12 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
mockup (334.54 KB, image/png)
2013-05-22 09:25 PDT, Wil Clouser [:clouserw]
no flags Details
.png - newsletter prompt (122.72 KB, image/png)
2013-06-26 07:26 PDT, Maria Sandberg [:mushi]
no flags Details
es-ES/es newletter subscription success email! (2.17 MB, image/png)
2013-07-01 19:10 PDT, Stephen Donner [:stephend] - PTO; back on 5/28
no flags Details
pt-BR-newsletter (88.59 KB, image/png)
2013-07-09 15:15 PDT, raymond [:retornam] (needinfo? me)
no flags Details

Description Wil Clouser [:clouserw] 2013-05-22 09:25:21 PDT
Created attachment 752798 [details]
mockup

We'd like to encourage people to sign up for the Marketplace newsletter when we launch the Marketplace.  See the attached mockup for a visual design.  If you're not comfortable doing front and back development find someone to take the other side, or split this bug into two, or tell me.

Some notes for the frontend:

- This should only appear for logged in users
- This should only appear after a person has accessed the marketplace 3 times over 72 hours (so we're not asking them to join before they've had a chance to use it)
- If the person signs up, the spinner is for the POST to the server, and then the message at the end should appear for 2 seconds and then disappear
- If a person signs up or clicks the close button we don't show the message again (store in a cookie or localstorage)
- If you forget to add "Signing up..." to the middle pane I won't say anything
- you can track the 3x visits and show/hide stuff in localstorage.  if it gets reset it's not the end of the world

Some notes for the backend:
- I think we just need an API endpoint to talk to which passes through the email to exact target
- https://github.com/mozilla/basket-client/ is how we can talk to exact target.  pmac can help with questions about that

Let me know on IRC if you've got questions.
Comment 1 Jessilyn Davis 2013-05-22 16:00:33 PDT
Winston, Sakina and I met today to talk integration.

Key specs for this:

1) We'll have welcome emails set up for ES, PT-BR and PL by July 1

2) If the marketplace is live in other locales outside of the languages available for marketplace (ie the 3 above and others as we add them), the email opt-in should not show.

3) Signup form may (or may not) need HTML vs. Text fields as well as a privacy policy check box – Has this been discussed with privacy?

4) Email signup form will need to pass through the following fields:

EMAIL_ADDRESS_
EMAIL_FORMAT_
SOURCE_URL
COUNTRY_
LANGUAGE_ISO2
MARKETPLACE_FLG
MARKETPLACE_DATE
Comment 2 Wil Clouser [:clouserw] 2013-05-27 21:32:18 PDT
> EMAIL_ADDRESS_
> EMAIL_FORMAT_
> SOURCE_URL
> COUNTRY_
> LANGUAGE_ISO2
> MARKETPLACE_FLG
> MARKETPLACE_DATE

Please link to the documentation for these. Thanks
Comment 3 Jessilyn Davis 2013-05-28 07:35:48 PDT
https://wiki.mozilla.org/Mozilla.com/Newsletters
Comment 4 Allen Short [:ashort] 2013-05-28 17:27:50 PDT
https://github.com/mozilla/zamboni/commit/3090dcf
Comment 5 Allen Short [:ashort] 2013-05-28 17:29:03 PDT
Whoops, meant to only close the backend bug.
Comment 6 Jessilyn Davis 2013-05-31 15:05:22 PDT
Jess needs to see this before it goes live and help make sure everything is working correctly (right fields in right database, correct welcome email is fired from basket admin setup, etc.).

Please keep me posted when it's in a place where I can see it.
Comment 7 Davor Spasovski [:spasovski] 2013-05-31 15:31:45 PDT
done: https://github.com/mozilla/fireplace/commit/a7b1862

You will need a FFOS device and you will need to launch it 3 times within 72 hours. The rest should match the mocks.
Comment 8 Jessilyn Davis 2013-05-31 15:43:14 PDT
Does it meet this spec?

If the marketplace is live in other locales outside of the languages available for marketplace (PT, ES, PL, EN), the email opt-in should not show.
Comment 9 Matt Basta [:basta] 2013-05-31 16:37:32 PDT
(In reply to Jessilyn Davis from comment #8)
> Does it meet this spec?
> 
> If the marketplace is live in other locales outside of the languages
> available for marketplace (PT, ES, PL, EN), the email opt-in should not show.

There's always a locale. There's always text on every page (i.e.: if we don't support your language, we don't leave things blank).

Do you mean region? Locale is language and region is country. I'm assuming you only want this available in the launch countries (independent of language).
Comment 10 Wil Clouser [:clouserw] 2013-05-31 16:50:24 PDT
This only shows up in the launch countries when the language is Spanish, Portuguese, Polish, or English.
Comment 11 Davor Spasovski [:spasovski] 2013-06-03 13:57:00 PDT
The languages concern should be addressed with: https://github.com/mozilla/fireplace/commit/52517e4
Comment 12 Wil Clouser [:clouserw] 2013-06-05 13:21:33 PDT
Thanks Davor.  This is disabled until we have a meeting w/ privacy
Comment 13 Davor Spasovski [:spasovski] 2013-06-06 13:57:18 PDT
Reopening as a reminder that this is still outstanding until UX decides how to handle the privacy link.
Comment 14 David Bialer [:dbialer] 2013-06-17 09:10:05 PDT
Privacy link has been decided.  We can use the same privacy policy as marketplace.
https://marketplace.firefox.com/privacy-policy  (this needs to be updated).

Need to design the link into the UI
Comment 15 Jessilyn Davis 2013-06-18 16:20:28 PDT
Just filed Bug 994598 to get the welcome email functionality in place.

I'm cc'ing Rebecca from QA so that she can run through testing when the form is in place and ready to go.


Please let us know when the form will be in a place for testing. 

Also please let me know when a mockup has been created for the new signup form flow given the conversation with Privacy.
Comment 16 Jessilyn Davis 2013-06-18 16:21:27 PDT
(In reply to Jessilyn Davis from comment #15)
> Just filed *Bug 884598* to get the welcome email functionality in place.
Comment 17 Jessilyn Davis 2013-06-19 11:51:21 PDT
Will - can you confirm with me how the "LANGUAGE_ISO2" field is set in the Marketplace signup form?

This will be crucial info to pass through - not only for triggering the right welcome email message in the right language - but also to make sure they get the right language for their Marketplace emails.
Comment 18 Jessilyn Davis 2013-06-20 13:55:02 PDT
Sdonner - does your team have a Firefox OS phone that can test this functionality early next week?
Comment 19 Wil Clouser [:clouserw] 2013-06-20 13:59:15 PDT
(In reply to Jessilyn Davis from comment #17)
> Will - can you confirm with me how the "LANGUAGE_ISO2" field is set in the
> Marketplace signup form?

A question for Allen.
Comment 20 Stephen Donner [:stephend] - PTO; back on 5/28 2013-06-20 15:01:23 PDT
(In reply to Jessilyn Davis from comment #18)
> Sdonner - does your team have a Firefox OS phone that can test this
> functionality early next week?

Yes, that won't be a problem at all.
Comment 21 Jessilyn Davis 2013-06-21 11:12:53 PDT
Excellent - Thanks Stephen!

Allen - can you let me know how the form is configured to pass through the right "LANGUAGE_ISO2" field?
Comment 22 Allen Short [:ashort] 2013-06-21 18:13:20 PDT
I'm not sure what that refers to, since there's nothing in the basket API with that name. We pass basket the language used for the marketplace UI, which can either be specified by the user in the URL or is detected from the browser directly.
Comment 23 Jessilyn Davis 2013-06-24 12:30:58 PDT
Thanks, Allen. We'll test it and see what happens.

Stephen, I think we're ready for QA!  Can you let me know who's available with an OS phone? I'll need to walk them through how to check in Exact Target for things as well and I'd love to see the sign up flow in person if possible (I'm in Mountain View). 
(FWIW, Rebecca is the resident QA expert on all things Exact Target and our email integration.)

I think the only other outstanding item at this point is the UX design needed in Comment 14.
Comment 24 Stephen Donner [:stephend] - PTO; back on 5/28 2013-06-25 12:10:19 PDT
(In reply to Jessilyn Davis from comment #23)
> Thanks, Allen. We'll test it and see what happens.
> 
> Stephen, I think we're ready for QA!  Can you let me know who's available
> with an OS phone? I'll need to walk them through how to check in Exact
> Target for things as well and I'd love to see the sign up flow in person if
> possible (I'm in Mountain View). 
> (FWIW, Rebecca is the resident QA expert on all things Exact Target and our
> email integration.)
> 
> I think the only other outstanding item at this point is the UX design
> needed in Comment 14.

Raymond should be able to help out with this -- if he's too busy, he/you can let me know, and we can find someone else -- ping us in #mozwebqa, too!  Cheers.
Comment 25 Jessilyn Davis 2013-06-25 12:14:13 PDT
Raymond, can you start testing today/early tomorrow on this and let us know what you find?

Rebecca or I can help you find the people in the right places in Exact Target.

Thanks!
Comment 26 raymond [:retornam] (needinfo? me) 2013-06-25 12:21:42 PDT
I'm working on snippets and the Firefox OS launch pages today. I wont be able to get to this until later today or early tomorrow.
Comment 27 Jessilyn Davis 2013-06-25 12:22:46 PDT
Sounds perfect. Thanks Raymond!
Comment 28 Maria Sandberg [:mushi] 2013-06-26 07:26:36 PDT
Created attachment 767744 [details]
.png - newsletter prompt

Added privacy policy link and changed styling to the same as our other prompts. This one is 10px taller to make room for the PP link.
Comment 29 Jessilyn Davis 2013-06-27 15:07:30 PDT
raymond - basket changes went live today that will make the marketplace email signup form + welcome emails trigger happily!

To test:
1) Make sure your marketplace settings are for one of these language speaking countries: Spanish, Portuguese, Polish, or English.

2) Visit the marketplace 3 times over 72 hours to trigger the welcome email signup

3) Signup with a unique email address

4) Check to see you received the HMTL Marketplace welcome email in your language (note: I'm updating the language email code, but you'll see "Welcome- ES!" in the headline for the spanish one for now. This is in the process of being updated and will be live before EOD Saturday)

5) Rinse and repeat with the other languages.

6) Set your country/langauge to a non es, pt, pl, or en speaking country (ie France).
Visit the marketplace 3 times over 72 hours to try to trigger the welcome email signup.
Make sure the signup form is not triggered.
Comment 30 Wil Clouser [:clouserw] 2013-06-27 15:29:41 PDT
Jess - that is an awesome summary of how to verify, however, the form is not live yet, we just got the UI yesterday and the bug is assigned to davor.  Once he closes the bug we'll be able to verify.
Comment 31 Jessilyn Davis 2013-06-27 15:32:05 PDT
Ah - awesome - thanks for the update!
Comment 32 Davor Spasovski [:spasovski] 2013-06-28 15:10:53 PDT
Final touches added:

https://github.com/mozilla/fireplace/commit/ecb9b9d
Comment 33 Jessilyn Davis 2013-06-28 15:42:16 PDT
Sweet! This should work on dev-marketplace.mozilla.org - right?

Raymond - you're up!

I've got an OS device for backup testing if needed - and I'm happy to check email addresses in Exact Target to make sure the right flags show up in Master_Subscribers.  Raymond, just let me know which email addresses you sign up with and I can check 'em.
Comment 34 Stephen Donner [:stephend] - PTO; back on 5/28 2013-06-28 15:45:51 PDT
Not that we need to mention all the bugs here, but I just filed bug 888516, FYI.
Comment 35 Christopher Van Wiemeersch [:cvan] 2013-06-28 15:49:13 PDT
(In reply to Jessilyn Davis from comment #33)
> Sweet! This should work on dev-marketplace.mozilla.org - right?

https://marketplace-dev.allizom.org

In your console enter the following:

    localStorage.removeItem('newscounter');
Comment 36 Christopher Van Wiemeersch [:cvan] 2013-06-28 15:49:30 PDT
Also make sure you're in responsive mode or have minimized your screen to a narrow resolution.
Comment 37 Davor Spasovski [:spasovski] 2013-06-28 16:08:21 PDT
Thanks cvan I meant to write the full conditions to test this repeatedly. So to summarize to see the newsletter be in responsive mode (cmd+option+m or ctrl+alt+m) with a narrow width and refresh the homepage 3 times in 72 hours.

Once you see the signup form http://cl.ly/image/350s0y1P333n a local storage entry is created so you never see it again (on the same device). 

cmd+option+k (or ctrl+alt+k) will open the FF console for you and type: 

localStorage.removeItem('newscounter');

then hit enter. This should remove the flag that you've seen the newsletter and it will show up again after 3 refreshes in 72 hours.
Comment 38 Wil Clouser [:clouserw] 2013-07-01 10:46:44 PDT
This is ready for QA.  The UX appears, which I've seen, but I don't know if all the exact target stuff works.
Comment 39 Jessilyn Davis 2013-07-01 10:50:25 PDT
Raymond - how's QA looking? I took a look in Exact Target this am and it looks like only a few test emails triggered the EN version. It'd be awesome to see if it works for the other locales too.
Comment 40 Jessilyn Davis 2013-07-01 14:01:01 PDT
Before this goes live I definitely want to make sure that the non-EN language signup form is sending through the right language information and triggering the right welcome email...especially b/c there's not the explicit way for them to tell us language + country info.


This needs to be confirmed before it can go live. Otherwise we run the risk of spamming our subscribers = super bad for the user, and deliverability status of our email program.
Comment 41 Wil Clouser [:clouserw] 2013-07-01 14:02:26 PDT
It's scheduled to go live tomorrow at 2pm.  Please verify before then. Thanks.
Comment 42 Stephen Donner [:stephend] - PTO; back on 5/28 2013-07-01 14:04:11 PDT
:retornam, please see comment 39; thanks!
Comment 43 raymond [:retornam] (needinfo? me) 2013-07-01 15:18:12 PDT
I got several 400 errors using my mozbugs.retornam+newslettereng@gmail.com and filed https://bugzilla.mozilla.org/show_bug.cgi?id=889111 because marketplace strips out the + sign from your email. I was able to sign up for the newsletter using my bugmail address which has no plus sign

NetworkError: 400 BAD REQUEST - https://marketplace-dev.allizom.org/api/v1/account/newsletter/?_user=mozbugs.retornam%2Bnewslettereng%40gmail.com%2C560c1871bc8f795badb5c3234fda49fc9ace717ae8e0874f973c384d62d0d44b1911c503f4ee53a9cb173ad06471dbdef1fd0c6ea206df13d61264c73e2707cd%2Cec2e083afc4e4452ac7c62ec70101f58&lang=en-US&pro=8a7dd46e.32.1&region=us
Comment 44 Matt Basta [:basta] 2013-07-01 15:22:50 PDT
That issue only happens if you've saved your settings before submitting the newsletter and your email contains a plus. Try signing out and signing back in, then submitting the newsletter.
Comment 45 Jessilyn Davis 2013-07-01 16:56:02 PDT
This signup form should NOT be pushed live if it's not working correctly.

To test - please see comment 29.

After you signup, you should get a marketplace welcome email in the correct corresponding language. Please be sure to test: EN, ES, PT and PL specifically.

When you get the welcome email, you should be able to click on the "Modify preferences" link in the header or footer to go to that subscribers email preference center. Make sure you change the locale of the email preference center to en-US so that the correct language and country info show up from Exact Target. (There's a bug with not showing the right country + language fields in the old l10n php email preference center links)

Confirm that the subscriber has the right country + language info, and subscription flags (Marketplace only), as expected from the language and country info you were on to subscribe to the newsletter.

Rbillings knows how to look up subscribers in Exact Target (as do I) - so we can double check email addresses and/or show you how to query for them - so that we can make sure that the subscription, country and language flags are correct in the email database.

Let me know if you have any questions and if I can be of help. I tried to trigger the marketplace signup to help test, but was unable to get it to work :/

Thanks for your help.
Comment 46 Stephen Donner [:stephend] - PTO; back on 5/28 2013-07-01 19:10:16 PDT
Created attachment 769984 [details]
es-ES/es newletter subscription success email!
Comment 47 Jessilyn Davis 2013-07-02 08:31:17 PDT
Sweet! I just double checked this subscriber/token info and it looks like the right flags were set and the right welcome email was sent. However, this was an existing subscriber which is a good test - but I can't see which fields changed when so I'm unsure if the language + country flags changed correctly or not (I *think* they were, but we need more testing to be sure).

Test cases left to test with unique (first time subscribers):
1) Sign up for Marketplace in ES
2) Sign up for Marketplace in PL
3) Sign up for Marketplace in PT
4) Sign up for Marketplace in EN
5) Try to trigger the Marketplace signup in JA (or another non: en, pl, pt or en locale) - and make sure it doesn't show the signup form.

These need to be tested and verified before the code can go live (planned for 2pm today).

Let me know if you have any questions and thanks again for your help.
Comment 48 Wil Clouser [:clouserw] 2013-07-02 09:25:49 PDT
(In reply to Jessilyn Davis from comment #47)
> These need to be tested and verified before the code can go live (planned
> for 2pm today).

Code is actually tagged before noon to give us time to test the final version.  Please aim for asap. :)
Comment 49 Jessilyn Davis 2013-07-02 10:13:05 PDT
QA is stretched with moz.org testing. Retornam found a bug (to be filed) with the country (and possibly the language) not passing through correctly.

This feature needs to be punted to a future marketplace push. It's not ready for a noon push.
Comment 50 Jessilyn Davis 2013-07-02 10:24:48 PDT
Just chatted with clouserw - please disable the signup form for this push. 

We'll run through more QA testing this week and file the bugs to be fixed next week when our basket devs are back online.
Comment 51 Davor Spasovski [:spasovski] 2013-07-02 10:26:07 PDT
disabled: https://github.com/mozilla/fireplace/commit/a65412a
Comment 52 Jessilyn Davis 2013-07-02 10:59:12 PDT
Thanks Davor!

Next steps:
QA to finish testing and filing bugs as blockers to this bug - this week
Pmac/basket devs to be around to help troubleshoot the form - early next week


We can check in Monday/Tuesday to see how testing and fixing bugs is going and figure out a timeline for it to go live.

Thanks all!
Comment 53 Rebecca Billings [:rbillings] 2013-07-03 12:35:27 PDT
Verified fix on dev: able to sign up on marketplace with email including "+" and user appears in exact target
Comment 54 Davor Spasovski [:spasovski] 2013-07-08 16:53:04 PDT
Sorry to flood this bug with more comments but here are updated instructions on how to test the form:

Requirements: User is signed in. UA is in responsive mode (width less than 710px).

1. Install `firebug` and also `firestorage plus` and delete the `newscounter` key. This will be versioned so you won't be able to do `localStorage.removeItem('newscounter')` since depending on the version it could look like `0::newscounter`. It's far easier to use Chrome's dev tools unfortunately.

2. Visit https://marketplace-dev.allizom.org/ and refresh 3 times. Eventually you should see this: http://cl.ly/image/3q1n1Q1c1p3W

If you're visiting from a new device/browser the 'newscounter' key won't exist so you should ignore step 1. Hopefully this clears things up a bit.
Comment 55 Jessilyn Davis 2013-07-09 09:26:25 PDT
Thanks Davor! Quick question: How can QA test the language?

(Rbillings was able to verify "country" is passing through correctly.)
Comment 56 Wil Clouser [:clouserw] 2013-07-09 09:28:47 PDT
(In reply to Davor Spasovski [:spasovski] from comment #54)
> 1. Install `firebug` and also `firestorage plus` and delete the
> `newscounter` key. This will be versioned so you won't be able to do
> `localStorage.removeItem('newscounter')` since depending on the version it
> could look like `0::newscounter`. It's far easier to use Chrome's dev tools
> unfortunately.

Using a new profile is a much more standard way of testing.  We shouldn't need to install any add-ons.
Comment 57 Matt Basta [:basta] 2013-07-09 09:33:09 PDT
Even easier:

1. Search for ":debug" in the marketplace 
2. Press the Clear localStorage button 
3. There is no step 3
Comment 58 Jessilyn Davis 2013-07-09 13:38:47 PDT
Another testing scenario:

Sign up for the newsletter when your country in the marketplace settings hasn't been explicitly set.

(Question: How often will this scenario happen?)
Comment 59 Matt Basta [:basta] 2013-07-09 13:39:40 PDT
(In reply to Jessilyn Davis from comment #58)
> (Question: How often will this scenario happen?)

Every user that doesn't have a SIM card will experience this.
Comment 60 Davor Spasovski [:spasovski] 2013-07-09 15:13:00 PDT
Everything is ready from an engineering perspective. This is scheduled to go out this week barring any issues from QA.
Comment 61 raymond [:retornam] (needinfo? me) 2013-07-09 15:15:28 PDT
Created attachment 772927 [details]
pt-BR-newsletter

I was able to signup and receive the PT-BR newsletter
Comment 62 Jessilyn Davis 2013-07-09 15:21:36 PDT
Sweet! Last two QA checks for verification:

1) Sign up with PL as the language
2) Try to trigger the marketplace for a non marketplace newsletter locale (ie ja) - and make sure it doesn't show
Comment 63 Jessilyn Davis 2013-07-10 15:08:06 PDT
Will - when does QA need to be finished verification on here?
Comment 64 Wil Clouser [:clouserw] 2013-07-10 15:25:20 PDT
(In reply to Jessilyn Davis from comment #63)
> Will - when does QA need to be finished verification on here?

This is already on the train to go out tomorrow.  If you need it to not go tell me now.
Comment 65 Jessilyn Davis 2013-07-10 15:30:26 PDT
Raymond - can you test these last two scenarios today?  If not, Stephen D, can you find someone to tackle?  This needs to be verified before it goes live.

1) Sign up with PL as the language
2) Try to trigger the marketplace for a non marketplace newsletter locale (ie ja) - and make sure it doesn't show
Comment 66 Matt Basta [:basta] 2013-07-10 15:41:09 PDT
(In reply to Jessilyn Davis from comment #65)
> 1) Sign up with PL as the language

What does this mean?
Comment 67 Jessilyn Davis 2013-07-10 15:54:51 PDT
(In reply to Matt Basta [:basta] from comment #66)
> (In reply to Jessilyn Davis from comment #65)
> > 1) Sign up with PL as the language
> 
> What does this mean?

Set your language in the marketplace to Polish, trigger the signup form and then sign up.
Comment 68 raymond [:retornam] (needinfo? me) 2013-07-10 15:56:24 PDT
http://cl.ly/image/0u0S3m1X2x10 Polish newsletter works
Comment 69 raymond [:retornam] (needinfo? me) 2013-07-10 16:05:45 PDT
The newsletter sign-up form was not shown when I used the Japanese local and set my country to worldwide.
Comment 70 Stephen Donner [:stephend] - PTO; back on 5/28 2013-07-10 16:08:57 PDT
I can confirm, using my Unagi w/today's B2G18 (i.e. v1-train) build that the Polish case works, and that the Japanese locale doesn't offer me the newsletter.

(re: comment 62).
Comment 71 Jessilyn Davis 2013-07-10 16:10:52 PDT
Sweeeeet!  Thank you both for quickly testing!

We're good for this to go live tomorrow with the code push. \o/

When it goes live, please let us know in this bug so QA can test on prod.
Comment 72 Christopher Van Wiemeersch [:cvan] 2013-07-11 14:50:55 PDT
And we're live!

https://marketplace.firefox.com/

Thanks everyone for your hard work on this! =)
Comment 73 Jessilyn Davis 2013-07-12 12:21:28 PDT
Sweet! QA - can you verify that all looks good on prod if you haven't checked yet?

Note You need to log in before you can comment on or make changes to this bug.