Closed Bug 745011 Opened 12 years ago Closed 12 years ago

Implement API for welcome email on RU newsletter sign up form

Categories

(www.mozilla.org :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Future

People

(Reporter: jdavis, Assigned: pascalc)

References

Details

(Whiteboard: u=dev c=newsletter p=2)

Hey Chris,

We're hoping to launch the RU newsletter sign up form by end of May. James has helped with the API implementation of the past newsletter sign up forms. This sign up form should work like the other localized versions of the sign up form.

Can you help guide this bug in the right direction and let us know a feasible date for implementation?

This is the API bug to go along with the localization of the form and creation of: https://www.mozilla.org/ru/newsletter (Bug 745004)

How form + API should work upon submitting an email address:
LANGUAGE_ISO2 = ru
MOZILLA_AND_YOU_FLG = Y
MOZILLA_AND_YOU_DATE = date submitted
COUNTRY_ = country selected
"Welcome Email - RU" (ID: 5803) is sent to the email subscriber.
Subscriber is added to the "Double_Opt_In" data extension

Upon clicking on the confirmation link in the email (https://www.mozilla.org/ru/newsletter/confirm/%%token%%/):
Subscriber should be added to the "Confirmation" Data Extension Table
Malexis: Can you add this to your backlog as a P2 or P3 and we'll evaluate the development effort for this project after we get through the Fx 12, 3.6, and apps pages launch.

Jessilyn: We'll be in touch in a few weeks after we get through some important releases.

Thanks!
OS: Mac OS X → All
Hardware: x86 → All
Target Milestone: --- → 2.5
Assignee: chrismore.bugzilla → nobody
Hey Chris - I just wanted to check in on this bug to see if it was still on your radar for this quarter. Do you have a better idea of an implementation date? 

Thanks!
Hey Mike,

This is very similar to Bug 745032  and the localization page is on Dev and ready for the API work. Should this go to Rik too?

Jess
External Key for the welcome/confirmation email:

ru_confirmation_email_2
Summary: Implement API for welcome email on RU newsletter sign up from → Implement API for welcome email on RU newsletter sign up form
Target Milestone: 2.5 → 3.6
Target Milestone: 3.6 → Future
Pascal: Since you have the ID newsletter too (bug 745032), can you do this one too while you are at it? We need a timeline for both this bug and the ID newsletter bug.
Assignee: nobody → pascalc
implemented in r108174 for both this bug and bug 745032.

I have factorized the form generation of list of supported locales and localized country names for all entry points where we have a newsletter form, that means that adding a locale which has no special requirements to forms is just adding a line in the $languages array in the EmailPrefs class in includes/email/prefs.php (this way, any developer can easily take care of that if Rik or myself are not available).

This avoids updating arrays with locale codes and native locale names in a dozen different entry points in our codebase every time we add a locale. Since there is a code change, Jesselyn, I would appreciate if you could test the forms (for existing and new locales) on dev-allizom.org for both the newsletter pages and the newsletter subscription blocks in the footer of /localecode/fifox/fx

Your last request in comment 0 ""Welcome Email - RU" (ID: 5803) is sent to the email subscriber." is not managed on mozilla.org codebase AFAIK, this is probably an update needed to a field in a database we use to store newsletter subscriptions.

I believe that the double opt-in flag should be correctly sent as a POST parameter from our form since all locales except English should have it, but this is probably something to test once the database is updated to receive data from new id and ru locales.
r108179 converts an additional form I didn't add to my previous commit
Awesome work Pascal!

I tested: https://www-dev.allizom.org/fr/newsletter/
and it worked perfectly as expected.

When I tested:
https://www-dev.allizom.org/ru/newsletter/ 
https://www-dev.allizom.org/id/newsletter/

The signup forms looked great, but the email addresses were added without the double opt-in process (they were added like the EN form).  These 2 forms should work exactly like the fr form except for:

Instead of sending this email external key: 
fr_confirmation_email

It should send these external keys:
Ru = ru_confirmation_email_2
ID = id_confirmation_email

Once we get the forms on this page working properly, I'll start testing the footer signup forms.

Let me know if you have any questions. Thanks again Pascal!
Hi Jessilyn

Are you sure that this is not a parameter that should be set in the database?

I retested this morning and French and Russian are senting the same POST parameters to the database:

FRENCH:
mozilla-and-you=Y
email=pascal.chevrel%40free.fr
country=fr
lang=fr
format=html
privacy=on

RUSSIAN:
mozilla-and-you=Y
email=pascal.chevrel%40free.fr
country=ru
lang=ru
format=html
privacy=on

I think the 'privacy=on' parameter is what sets the double opt-in process since this is added by this code:
$form->save_new(array('optin' => FALSE));

I did a search on the whole mozilla.org PHP codebase and we don't set anywhere a parameter containing a 'confirmation_email' string, I think this is a parameter set in the emailing application in response to the 'privacy=on' parameter received.
Hey Pascal,

I just triple checked and checked with Winston and this setting is in basket - not in Exact Target.

To our knowledge, there's the signup form that uses the POST parameters you state above. Then when the form POSTS, it goes into basket. Basket then does the right things with the right parameters to trigger the right confirmation message and also to put the subscriber in the right data extension in Exact Target for the double opt-in process.

I think the privacy=on is if the privacy checkbox was checked or not on the form.

If this info doesn't help, try checking in with James Long about basket. He set up this entire system.
I am not sure that basket is a service we can parameter from mozilla.org codebase then, CCIng James to know more about it.
Hey James - can you give Pascal/Engagement Web Dev team a crash course in Basket?
We should assign to someone in web dev who has been working with basket to complete the work.  I think mkelly and anthony both have some experience.
I have pushed my work to stage on r108472, that also covers the Indonesian newsletter pages. I am currently on PTO and will be offline tomorrow until September 3, if the basket work is completed before and pages need to be pushed to production before I am back from holidays, that revision is the one to push to the production tag on svn.
Component: www.mozilla.org → General
Product: Websites → www.mozilla.org
Depends on: 788473
I opened bug 788473 to track this as it's the same root cause for both newsletters.
Whiteboard: u=dev c=newsletter
As soon as Jess gives us the go after testing on www.allizom.org, we can push this.
Whiteboard: u=dev c=newsletter → u=dev c=newsletter p=2
Ran through testing - all looks good!

Please let me know when this is live on production.

Thanks!
I have ran tests on existing locales and this new locale. All is working perfectly!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.