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

Onboarding: Release privacy pro onboarding dialog to all users #5222

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

nalcalag
Copy link
Contributor

@nalcalag nalcalag commented Oct 31, 2024

Task/Issue URL: https://app.asana.com/0/0/1208628082622869/f

Description

  • Copy test in Privacy Pro onboarding dialog.
  • Different cohorts set in testPrivacyProOnboardingCopyNov24 sub-feature in remote config
    • control
    • protection
    • pir
    • vpn

Steps to test this PR

Pre steps

control Cohort

  • Set control cohort weight to 1 and the rest to 0 in remote config
  • Remove 'DuckDuckGo' folder from Downloads directory
  • Fresh install
  • Tap on a site suggestion
  • Dismiss SERP onboarding dialog
  • Tap on a site suggestion
  • Dismiss Trackers dialog
  • Tap fire button and Clear Data
  • End dialog appears -> Tap on 'High Five!' button
  • Check privacy onboarding has control copy (Asana task with copy)

protection Cohort

  • Set protection cohort weight to 1 and the rest to 0 in remote config
  • Remove 'DuckDuckGo' folder from Downloads directory
  • Fresh install
  • Tap on a site suggestion
  • Dismiss SERP onboarding dialog
  • Tap on a site suggestion
  • Dismiss Trackers dialog
  • Tap fire button and Clear Data
  • End dialog appears -> Tap on 'High Five!' button
  • Check privacy onboarding has protection copy (Asana task with copy)

pir Cohort

  • Set pir cohort weight to 1 and the rest to 0 in remote config
  • Remove 'DuckDuckGo' folder from Downloads directory
  • Fresh install
  • Tap on a site suggestion
  • Dismiss SERP onboarding dialog
  • Tap on a site suggestion
  • Dismiss Trackers dialog
  • Tap fire button and Clear Data
  • End dialog appears -> Tap on 'High Five!' button
  • Check privacy onboarding has pir copy (Asana task with copy)

vpn Cohort

  • Set vpn cohort weight to 1 and the rest to 0 in remote config
  • Remove 'DuckDuckGo' folder from Downloads directory
  • Fresh install
  • Tap on a site suggestion
  • Dismiss SERP onboarding dialog
  • Tap on a site suggestion
  • Dismiss Trackers dialog
  • Tap fire button and Clear Data
  • End dialog appears -> Tap on 'High Five!' button
  • Check privacy onboarding has vpn copy (Asana task with copy)

Returning users

  • Set all cohort weight to 1 in remote config
  • Fresh install
  • Tap on a site suggestion
  • Dismiss SERP onboarding dialog
  • Tap on a site suggestion
  • Dismiss Trackers dialog
  • Tap fire button and Clear Data
  • End dialog appears -> Tap on 'High Five!' button
  • Check privacy onboarding has control copy (Asana task with copy)

Experiment pixels

  • Set vpn cohort weight to 1 and the rest to 0 in remote config
  • Remove 'DuckDuckGo' folder from Downloads directory
  • Fresh install
  • Proceed through onboarding until you reach the Privacy Pro dialog
  • dialogShown
  • Check Privacy Pro dialog is shown
  • Check experiment_metrics_testPrivacyProOnboardingCopyNov24_vpn with params: {metric=dialogShown...} pixel is fired
  • secondaryButtonSelected
  • Tap on Skip button
  • Check experiment_metrics_testPrivacyProOnboardingCopyNov24_vpn with params: {metric=secondaryButtonSelected...} pixel is fired
  • primaryButtonSelected
  • Clear storage
  • Remove 'DuckDuckGo' folder from Downloads directory
  • Open app
  • Proceed through onboarding until you reach the Privacy Pro dialog
  • Tap on Learn More button
  • Check experiment_metrics_testPrivacyProOnboardingCopyNov24_vpn with params: {metric=primaryButtonSelected...} pixel is fired

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@nalcalag
Copy link
Contributor Author

nalcalag commented Oct 31, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@nalcalag nalcalag force-pushed the feature/noelia/release_privacy_pro_onbaording_dialog branch 2 times, most recently from 607fbe0 to fcca964 Compare November 9, 2024 00:41
return this.getMetrics().firstOrNull { it.metric == "secondaryButtonSelected" }
}

suspend fun FeatureTogglesInventory.onboardingExperiments(): Toggle? {
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need this, can delete.

}

@ContributesMultibinding(AppScope::class)
class ExtendedOnboardingPixelsPlugin @Inject constructor(private val inventory: FeatureTogglesInventory) : MetricsPixelPlugin {
Copy link
Contributor

Choose a reason for hiding this comment

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

Rather than injecting the inventory you can just inject ExtendedOnboardingFeatureToggles and then use the toggle for the experiment.

VPN("vpn"),
}

companion object {
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't need this

metric = "dialogShown",
value = "1",
toggle = activeToggle,
conversionWindow = listOf(ConversionWindow(lowerWindow = 0, upperWindow = Int.MAX_VALUE)),
Copy link
Contributor

Choose a reason for hiding this comment

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

You probably don't want the upper window to be the max integer. I'd talk to DS but you probably want to define something closer in time like day 7.

@@ -470,6 +502,16 @@ class CtaViewModel @Inject constructor(

fun isSuggestedSiteOption(query: String): Boolean = onboardingStore.getSitesOptions().map { it.link }.contains(query)

fun getCohortOrigin(): String {
return when {
extendedOnboardingFeatureToggles.testPrivacyProOnboardingCopyNov24().isEnabled(Cohorts.PROTECTION) -> "_${Cohorts.PROTECTION.cohortName}"
Copy link
Contributor

Choose a reason for hiding this comment

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

You can do extendedOnboardingFeatureToggles.testPrivacyProOnboardingCopyNov24().getCohort() directly.

@@ -128,6 +135,13 @@ class CtaViewModel @Inject constructor(
if (cta is OnboardingDaxDialogCta && cta.markAsReadOnShow) {
dismissedCtaDao.insert(DismissedCta(cta.ctaId))
}
withContext(dispatchers.io()) {
if (cta is DaxBubbleCta.DaxPrivacyProCta || cta is DaxBubbleCta.DaxExperimentPrivacyProCta) {
extendedOnboardingPixelsPlugin.testPrivacyProOnboardingShownMetricPixel()?.getPixelDefinitions()?.forEach {
Copy link
Contributor

Choose a reason for hiding this comment

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

You should only send the pixels if the user is in the experiment


suspend fun FeatureTogglesInventory.onboardingExperiments(): Toggle? {
return this.getAllTogglesForParent("extendedOnboarding").firstOrNull {
it.featureName().name.startsWith(EXPERIMENT_PREFIX) && it.isEnabled()
Copy link
Contributor

Choose a reason for hiding this comment

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

By deleting this it means you are not checking isEnabled() anymore so you either have to do it before trying to send the pixels or you in getMetrics you can check it there and it's false, return empty list.

@nalcalag nalcalag force-pushed the feature/noelia/release_privacy_pro_onbaording_dialog branch from fcca964 to 39c1a5e Compare November 15, 2024 16:54
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