New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Privacy: teacher sign-up has email preference #22283
Conversation
Teacher sign-up now has an option to choose email preference. A choice is not required to submit the form at this time, but not choosing "yes" will default to an email preference opt-in choice of "no". The option is shown as a drop-down, though a hidden alternative uses radio buttons. An A/B test is able to show this alternate using something like this: $("#optin-container").remove(); $("#optin2-container").show();
email: params[:user][:email], | ||
opt_in: optin_value, | ||
ip_address: request.env['REMOTE_ADDR'], | ||
source: "Teacher account sign up", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After I merge #22277, this would change to EmailPreference::REGISTRATION
@breville Just confirming that for the radio button the default is neither selected? @poorvasingal is it desired behavior that selecting neither Yes/No submits them as No? Can't we continue to keep it as NULL like past signups? That way we can also track what percentage of people are completing this question as well as the percentage of people who say Yes/No? |
@tanyaparker Correct, neither radio button is selected by default, and the form can be submitted with neither selected. |
Oh I thought in your description |
Not answering does mean recording their opt-in choice as "no" in the database, though subject to the full business logic in #22277. I was just answering the first question about radio button behaviour. :) |
Oh ok, thanks for clarifying. Will wait to hear Poorva's preference for what we save in the DB when they don't answer. |
@sureshc mentioned that we * have * to submit a "Yes" or a "No." That's a bummer, because I agree with you Tanya that I'd want to know how many people are leaving this blank. My guess is that we're going to get a lot of "Nos" just because people aren't filling out this question. How widely are we releasing this? To everyone in the US? We should make sure we don't test this in the EU yet since we can't yet track what text they saw when opting in. |
@breville You could skip invoking |
Gotcha, Poorva. Since it's a technical limitation, no worries. |
Sounds like we will still have a way to see how many people aren't answering? yay, thanks for checking Suresh! |
|
|
Update: we will rely on Optimizely to show variants for US users, and will use it to determine success rate of the variants. Non-US users will see the strings as shown in the screenshots in this PR, with no variants. We will record "yes" if they choose "yes", "no" if they choose "no", and will not write anything to EmailPreference if they ignore the option. We will record the "form_kind as "0" so that we know which options they were presented with. |
email: params[:user][:email], | ||
opt_in: optin_value, | ||
ip_address: request.env['REMOTE_ADDR'], | ||
source: "Teacher account sign up", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I merged #22277. If you pull the latest staging
and merge into this branch you can change this to:
source: EmailPreference::ACCOUNT_SIGN_UP
,
Here's the full list of source types based on @poorvasingal 's comment last night:
code-dot-org/dashboard/app/models/email_preference.rb
Lines 25 to 32 in 624df5d
SOURCE_TYPES = [ | |
ACCOUNT_SIGN_UP = 'Teacher account sign up', | |
ACCOUNT_TYPE_CHANGE = 'Student account change to teacher', | |
ACCOUNT_EMAIL_ADD = 'Add email to teacher account', | |
ACCOUNT_EMAIL_CHANGE = 'Update teacher account email', | |
FORM_HOUR_OF_CODE = 'Host Hour of Code form', | |
FORM_VOLUNTEER = 'Volunteer form' | |
].freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I want to get this change in today so we can start a/b testing immediately but will make this fix in a follow-up.
Where are we storing the strings that the user sees? Not sure if I understood your comment correctly. If non-US answers and we save them as form_kind = 0, that means they had the 0th version of the string? How will we know what the actual string was? |
Non-US users will see the string that's in our source code. I'm just using 0 as the reference for the default string as we are first shipping this UI to them. |
Teacher sign-up now has an option to choose email preference. A choice is not required to submit the form at this time. Choosing "yes" or "no" writes the choice as an
EmailPreference
, while choosing neither does not write anEmailPreference
.The option is shown as a drop-down, though a hidden alternative uses radio buttons. An A/B test is able to show this alternative using something like this:
This change also loads Optimizely on the sign-up page.
dropdown
radio button alternative