Skip to content

Free scan CTA experiment (MNTOR-3341) #4787

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

Merged
merged 20 commits into from
Jul 15, 2024
Merged

Free scan CTA experiment (MNTOR-3341) #4787

merged 20 commits into from
Jul 15, 2024

Conversation

flozia
Copy link
Collaborator

@flozia flozia commented Jul 10, 2024

References:

Jira: MNTOR-3341
Figma: https://www.figma.com/design/YqpVpUbSTzZMj9Jbp2po8Q/Mozilla-Monitor-Premium-LP?node-id=3386-51938&t=R5Itups9WHRrAU3O-4

Description

Adds the “Free scan CTA” experiment. There are three variants of the landing page that we can run:

  • ctaWithEmail: Email input with CTA
  • ctaOnly: Only the CTA without the email input
  • ctaOnlyAlternativeLabel: Only the CTA without the email input and a longer alternative button label

Screenshot

ctaWithEmail ctaOnly ctaOnlyAlternativeLabel
image image image

How to test

  1. Visit the landing page under /
  2. Locally, the experiment landing-page-free-scan-cta in nimbus.yaml is enabled by default.
  3. Change the value for variant to ctaWithEmail | ctaOnly | ctaOnlyAlternativeLabel and rebuild the experiments.

Checklist (Definition of Done)

  • Localization strings (if needed) have been added.
  • Commits in this PR are minimal and have descriptive commit messages.
  • I've added or updated the relevant sections in readme and/or code comments
  • I've added a unit test to test for potential regressions of this bug.
  • If this PR implements a feature flag or experimentation, the Ship Behind Feature Flag status in Jira has been set
  • Product Owner accepted the User Story (demo of functionality completed) or waived the privilege.
  • All acceptance criteria are met.
  • Jira ticket has been updated (if needed) with suggestions for QA when this PR is deployed to stage.

Copy link

@flozia flozia self-assigned this Jul 10, 2024
@flozia flozia changed the title Free scan CTA experiment (MNTOR-3358) Free scan CTA experiment (MNTOR-3341) Jul 10, 2024
@flozia flozia marked this pull request as ready for review July 12, 2024 10:04
@flozia flozia requested a review from flodolo as a code owner July 12, 2024 10:04
@flozia flozia requested review from Vinnl and rhelmer and removed request for flodolo and Vinnl July 12, 2024 10:04
flozia

This comment was marked as duplicate.

Comment on lines +85 to +87
const variableValue =
nimbusConfig.features[featureId].variables[variableName].default;
return ` "${variableName}": ${typeof variableValue === "string" ? `"${variableValue}"` : variableValue},\n`;
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change was needed, because the objects of defaultExperimentData in the generated experiments.ts file had an invalid syntax for string values.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice catch!

Copy link
Collaborator

@Vinnl Vinnl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's quite a few potential variants - thanks for the tests, they give me more confidence :)

Comment on lines +53 to +56
enabled:
description: If the feature is enabled
type: Boolean
default: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhelmer Is this still necessary? I think the ctaWithEmail variant is what we have today anyway, so the enabled flag might be redundant?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was helpful to be able to check if the experiment is enabled. Like for example only conditionally appending UTM parameters if the experiment is running.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah, also just realised that Rob's work on QA enabling experiments depends on this. Which also makes me wonder - how would that deal with this situation? How would QA be able to test specific variants? I'll wake up the relevant Slack thread I suppose.

Comment on lines 82 to 83
ctaOnly: Only show a CTA button with the default label
ctaOnlyAlternativeLabel: Only show a CTA button with an alternative label
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's no need to be indirect in the Nimbus UI, so this might make experiment evaluation easier?

Suggested change
ctaOnly: Only show a CTA button with the default label
ctaOnlyAlternativeLabel: Only show a CTA button with an alternative label
ctaOnly: Only show a CTA button with the label "Get free scan"
ctaOnlyAlternativeLabel: Only show a CTA button with the label "Sign in to get free scan"

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree — updated in 6a9d2dd.

Comment on lines +85 to +87
const variableValue =
nimbusConfig.features[featureId].variables[variableName].default;
return ` "${variableName}": ${typeof variableValue === "string" ? `"${variableValue}"` : variableValue},\n`;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice catch!

Comment on lines 852 to 855
const inputField = screen.getAllByTestId("signup-form-input");
expect(inputField[0]).toBeInTheDocument();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since test ID is a last resort, wouldn't we be able to select this through the label text? (Thereby ensuring that screen reader users still get that announced to them?)

Suggested change
const inputField = screen.getAllByTestId("signup-form-input");
expect(inputField[0]).toBeInTheDocument();
const inputField = screen.getAllByLabelText("Enter your email address to check for data breach exposures and sites selling your info.");
expect(inputField[0]).toBeInTheDocument();

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in deddd51.

@flozia flozia merged commit 9a793b9 into main Jul 15, 2024
15 checks passed
@flozia flozia deleted the MNTOR-3358 branch July 15, 2024 14:57
Copy link

Cleanup completed - database 'blurts-server-pr-4787' destroyed, cloud run service 'blurts-server-pr-4787' destroyed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants