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

Update macOS config for Privacy Pro survey changes #101

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

samsymons
Copy link
Contributor

@samsymons samsymons commented Sep 11, 2024

Task: https://app.asana.com/0/1199333091098016/1208279675094863/f

This PR updates the macOS Privacy Pro surveys to add a hardcoded build type parameter to the survey URLs. This is a temporary measure until the survey builder supports the build type parameter.

See the linked Asana task for an easier-to-read mapping of rules to messages.

How to test:

  1. Update the debug URL in RemoteMessagingClient.swift to use the staging URL
  2. Open RemoteMessagingConfigMatcherProvider and override privacyProPurchasePlatform to say stripe, as internal user accounts use a custom purchase platform that the survey isn't checking for
  3. Run the Sparkle build of the browser
  4. Sign into a Privacy Pro account, and, if necessary, hardcode the privacyProDaysSinceSubscribed initializer value in RemoteMessagingConfigMatcherProvider to be 14 or above - if your account is already older than that then you won't need to do anything
  5. Update the shouldProcessConfig func in BSK to always return true, or use the Debug menu to reset and refresh the RMF cache if necessary
  6. Check that the subscriber survey appears
  7. Open the survey link, and check that a build parameter is present and it references the correct build type
  8. Now repeat the same for the App Store build

How to test the exit survey:

  1. Now we need to test an expiring account; update RemoteMessagingConfigMatcherProvider to set isPrivacyProSubscriptionExpiring to true and all other booleans to false
  2. Relaunch the app and verify that the exit survey shows up
  3. Open the survey URL and check that a build parameter is present and it references the correct build type

⚠️ If the surveys aren't appearing for some reason, it may be that you have previously dismissed the old New Tab Page surveys. To hardcode around this, search for the dismissedMessageIDs() function and return an empty array. The console logs will be able to tell you which attributes are failing as well.

Copy link

@samsymons samsymons marked this pull request as ready for review September 11, 2024 03:24
@samsymons samsymons requested a review from ayoy September 11, 2024 14:05
Copy link
Contributor

@ayoy ayoy left a comment

Choose a reason for hiding this comment

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

LGTM! Testing went well on the first try and the config changes look sane to me. 🚢 🇮🇹

@samsymons samsymons merged commit 9e830ff into main Sep 13, 2024
1 check passed
samsymons added a commit that referenced this pull request Sep 13, 2024
# Via GitHub
* main:
  Update macOS config for Privacy Pro survey changes (#101)

# Conflicts:
#	live/macos-config/macos-config.json
@samsymons samsymons deleted the sam/add-macos-privacy-pro-survey-build-type branch September 13, 2024 21:40
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