Skip to content
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

feat: Plus CTA copy experiment #4173

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Conversation

ilasw
Copy link
Contributor

@ilasw ilasw commented Feb 11, 2025

Changes

  • Updated CTA copy and make it editable from GB

Experiment

Did you introduce any new experiments?

Name: plus_cta_copy
Value: JSON object with full/short properties { full: 'Upgrade to Plus', short: 'Upgrade' }
Enrollment conditions:

  • Non plus users that land on onboarding plus step
  • Non plus users that interact with Plus CTAs
  • Plus users that open settings dropdown (component is the same)

Manual Testing

Caution

Please make sure existing components are not breaking/affected by this PR

Preview domain

https://mi-786-plus-copy-experiment.preview.app.daily.dev

Copy link

vercel bot commented Feb 11, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
daily-webapp ✅ Ready (Inspect) Visit Preview Feb 14, 2025 9:53am
1 Skipped Deployment
Name Status Preview Updated (UTC)
storybook ⬜️ Ignored (Inspect) Feb 14, 2025 9:53am

@@ -113,7 +116,7 @@ export const BlockedWords = (): ReactElement => {
});
}}
>
upgrade to Plus
{plusCta}
Copy link
Member

Choose a reason for hiding this comment

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

I think we should lowercase the first letter from this variable since the replaced value did have a lowercased first letter which might mean this is a part of a whole sentence.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, thanks for noticing! Updated ✔️

Copy link
Member

@sshanzel sshanzel left a comment

Choose a reason for hiding this comment

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

Looks amazing! Just two minor comments and we should be good.

Co-authored-by: Lee Hansel Solevilla <13744167+sshanzel@users.noreply.github.com>
Copy link
Member

@sshanzel sshanzel left a comment

Choose a reason for hiding this comment

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

You didn't use the conditional hook, kindly make sure that none of the components are rendered until we actually know the user is not plus.

@ilasw
Copy link
Contributor Author

ilasw commented Feb 13, 2025

@sshanzel moved to conditional hook for better experiment tracking ✔️

Comment on lines +28 to +33
const {
value: { full: plusCta },
} = useConditionalFeature({
feature: featurePlusCtaCopy,
shouldEvaluate: !isPlus,
});
Copy link
Member

@sshanzel sshanzel Feb 13, 2025

Choose a reason for hiding this comment

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

I think it might be a good idea to introduce a hook that manages this (all usages). So that we can also check if isAuthReady is true as this can evaluate while the boot is being loaded.

Sorry for the last mile changes 🙏

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can add a hook dedicated to this label but originally didn't want to over engineering this feature.

About the evaluation: I've checked the logic in hook and once shouldEvaluate value change it should rerun the query and check again (everything seems managed with useQuery and shouldEvaluate is both in queryKey and enabled).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

@sshanzel sshanzel Feb 13, 2025

Choose a reason for hiding this comment

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

Yeah, what I mean is at on load, the value of isPlus is false then it would make the shouldEvaluate to true while the boot is still being fetched. And once it has turned true, the user is already enrolled even if we return it back to false with shouldEvaluate.

Copy link
Member

@sshanzel sshanzel Feb 13, 2025

Choose a reason for hiding this comment

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

I don't think having the hook would over-engineer the feature, especially since experiments are quite a mess to manage, and having a hook would make it easier to make changes across implementations. Also, I can help you refactor this if you are a bit occupied with high-priority tasks if you want 🙏

Copy link
Member

@sshanzel sshanzel Feb 13, 2025

Choose a reason for hiding this comment

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

If you are confident that the edge case won't unnecessarily enroll users (since experiments are expensive to run, hence a bit strict with enrollment), I'll trust your judgement so we can move on to merge the PR.

Copy link
Contributor

@rebelchris rebelchris left a comment

Choose a reason for hiding this comment

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

Looks good to me.

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.

4 participants