question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update P3A rewards enabled question to measure ads

See original GitHub issue

Description

Recently we added Brave.Rewards.EnabledDuration but there isn’t really a good definition of “Rewards Enabled”. We used to have a settings toggle for rewards overall, but it’s been removed and currently we look at a combination of ads and autocontribute opt-in settings.

@miyayes asked me to alter the measurement to just report how long ads were enabled. This is the more relevant question.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
Miyayescommented, Feb 22, 2022

Thanks @rillian, I think we should rename the question just to avoid confusion (unless it introduces a lot of wrinkles).

0reactions
kjozwiakcommented, Apr 26, 2022

Verification PASSED on Samsung S10+ running Android 12 using the following build(s):

Brave | 1.38.106 Chromium: 101.0.4951.41 (Official Build) (32-bit)
--- | ---
Revision | 93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904}
OS | Android 12; Build/SP1A.210812.016

Went through the STR/Cases outlined via https://github.com/brave/brave-core/pull/12371 & https://github.com/brave/brave-browser/issues/21030#issuecomment-1092057586.

Clean profile

Case 1: Ads was never ON_Brave.Rewards.AdsEnabledDuration=0_PASSED
  • Verified that when rewards is NOT enabled, the metrics Brave.Rewards.AdsEnabledDuration response value is 0

Screenshot_20220426-021353_Brave

Case 2: Ads is still ON_Brave.Rewards.AdsEnabledDuration=1_PASSED
  • Verified that when rewards is enabled, the metrics Brave.Rewards.AdsEnabledDuration response value is 1

Screenshot_20220426-021443_Brave

Case 3: Ads was enabled less than three hours in past_Brave.Rewards.AdsEnabledDuration=2_PASSED

Case 1_enable and disable Ads in a minute

  • Clean profile 1.38x
  • Enable rewards and disable Ads switch
  • Open brave://local-state file
  • Ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 2 as Ads is disabled within three hours

Screenshot_20220426-021657_Brave

Case 2_disable Ads in < 3 hours

  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system time ahead by 2 hours
  • Relaunch the browser
  • Disable the Ads switch
  • Open brave://local-state file
  • Ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 2 as Ads is disabled within three hours

Screenshot_20220426-042118_Brave

Case 3_disable Ads exactly at 3 hours:

  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system time ahead by exact 3 hours
  • Relaunch the browser
  • Disable the Ads switch
  • Open brave://local-state file
  • Ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 3 as Ads is disabled exact at 3 hours

Screenshot_20220426-052142_Brave

Case 4_disable Ads after 3 hours:

  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system time ahead by 3 hours 2 mins 0 secs
  • Relaunch the browser
  • Disable the Ads switch
  • Open brave://local-state file
  • Ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 3 as Ads is disabled after 3 hours

Screenshot_20220426-052538_Brave

Case 4: Ads was enabled less than three days in past_Brave.Rewards.AdsEnabledDuration=3_PASSED

Case 1: disable ads in < 3days

  1. Clean profile 1.38.x
  2. Enable rewards and close the browser
  3. Set the system date ahead by 1 or 2 days (<3days)
  4. Relaunch the browser
  5. Disable ads switch
  6. Open brave://local-state
  7. Brave.Rewards.AdsEnabledDuration response value is 3 as Ads is disabled within 3days

Screenshot_20220428-023002_Brave

Case 2: disable ads exactly on the 3rd day

  1. Clean profile 1.38.x
  2. Enable rewards and close the browser
  3. Set the system date ahead by 3days
  4. Relaunch the browser
  5. Disable Ads switch
  6. Open brave://local-state
  7. Ensured that the Brave.Rewards.AdsEnabledDuration response value is 4 as Ads is disabled on the 3rd day

Screenshot_20220429-023239_Brave

Case 3: disable ads after 3days

  1. Clean profile 1.38.x
  2. Enable rewards and close the browser
  3. Set the system date ahead by 3 days 2 mins 00 seconds
  4. Relaunch the browser
  5. Disable Ads switch
  6. Open brave://local-state
  7. Ensured that the Brave.Rewards.AdsEnabledDuration response value is 4 as Ads is disabled after 3days

Screenshot_20220429-023649_Brave

Case 5: Ads was enabled less than three weeks in past_Brave.Rewards.AdsEnabledDuration=4_PASSED

Case 1: disable ads in < three weeks

  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system time ahead by 3=>days & <=20days
  • Relaunch browser
  • Disable Ads switch
  • Open brave://local-state file
  • Ensured that the Brave.Rewards.AdsEnabledDuration response value is 4 as Ads is disabled within 3 weeks

Screenshot_20220506-024021_Brave

Case 2: disable ads exactly on the 3rd week (21st day)

  • Clean profile 1.38.x (Apr 11th)
  • Enable rewards and close the browser
  • Set the system time ahead by 21days (May 2nd)
  • Relaunch browser
  • Disable Ads switch
  • Open brave://local-state file
  • Ensured that the Brave.Rewards.AdsEnabledDuration response value is 5 as Ads is disabled on the 3rd week

Screenshot_20220517-024232_Brave

Case 6: Ads was enabled less than three months in past_Brave.Rewards.AdsEnabledDuration=5_PASSED

Case 1: Passed

  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system date 21=>days <=89
  • Relaunch the browser
  • Disable Ads switch
  • Open brave://local-state file
  • Ensured that the Brave.Rewards.AdsEnabledDuration response value is 5 as Ads is disabled within 3 months

Screenshot_20220709-024603_Brave

Case 2: - Passed

  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system date ahead by 90 days
  • Relaunch the browser
  • Disable Ads switch
  • Open brave://local-state file
  • Ensured that the Brave.Rewards.AdsEnabledDuration response value is 5 as expected (Discussed with @DJAndries: 30.44 days as a “month” (that’s the average length of a month) multiply that by three and we get 91.32, so 90 days would not trigger a value of 6)

Screenshot_20220726-024853_Brave

Case 7: Ads was enabled more than three months in past_Brave.Rewards.AdsEnabledDuration=6_PASSED
  • Clean profile 1.38.x
  • Enable rewards and close the browser
  • Set the system date ahead by 91 days (greater than 3 months)
  • Relaunch the browser
  • Disable Ads switch
  • Open brave://local-state file
  • Ensured that the Brave.Rewards.AdsEnabledDuration response value is 6

Screenshot_20220727-025832_Brave

Case 8: Reset rewards_Brave.Rewards.AdsEnabledDuration=0_PASSED
  • Clean profile 1.38.x
  • Enable rewards
  • Open brave://local-state file
  • Ensured Brave.Rewards.AdsEnabledDuration response value is 1 as expected
  • Reset the rewards via Manage Brave Rewards
  • Reload the brave://local-state file and brave://rewards page
  • Restart the browser
  • Ensured that the Brave.Rewards.AdsEnabledDuration response value is 0 as expected

Upgrade profile

Case 1: Enable Rewards and upgrade the profile_PASSED
  • Install 1.37.x beta build and enabled rewards and upgraded the profile to 1.38.x and ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 1 as expected
  • Disable Ads switch in 1.38.x upgraded profile and ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 2 as expected

Screenshot_20220426-030742_Brave

Case 2: Enable Rewards and disable Ad switch and then upgrade the profile_PASSED
  • Install 1.37.x beta build and enabled rewards and disable Ads switch and upgraded the profile to 1.38.x and ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 0 as expected

Screenshot_20220426-031114_Brave

Case 3: Enable Rewards and disable AC switch and then upgrade the profile_PASSED
  • Install 1.37.x beta build and enabled rewards and disable rewards AC switch and upgraded the profile to 1.38.x and ensured that the metrics Brave.Rewards.AdsEnabledDuration response value is 1 as expected

Screenshot_20220426-031418_Brave

Case 4: Enable Rewards and disable Ads and AC switches manually and then upgrade the profile_PASSED - Install `1.37.x beta` build and enable rewards disable Ads and AC switches and upgraded the profile to `1.38.x` and ensured that the metrics `Brave.Rewards.AdsEnabledDuration` response value is `0` as expected

Screenshot_20220426-031814_Brave

Case 5: Enable Rewards and reset rewards and then upgrade the profile_PASSED - Install `1.37.x beta` build and enable rewards and reset rewards and upgraded the profile to `1.38.x` and ensured that the metrics `Brave.Rewards.AdsEnabledDuration` response value is `0` as expected
Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix handling of Rewards disabled state for various P3A ...
Due to recent changes to Rewards, the "Rewards disabled" bucket for several of our P3A questions is never triggered correctly.
Read more >
What is P3A in Brave? - Brave Help Center
Are people using Brave Rewards? Are people using sync and if so, on how many devices? How many people still need to download...
Read more >
Set up and traffic rewarded ads for apps - Google Ad Manager ...
Rewarded ad formats allow app users to receive rewards for viewing adsYou can traffic non-intrusive, ... Select the check box next to Rewarded...
Read more >
Introducing Ad Verification to the Amazon Shopper Panel
Starting today, panelists have a third option for participation: Ad Verification. By choosing to enable Ad Verification, panelists allow us to confirm which...
Read more >
Brave, the false sensation of privacy - Hacker News
Ads are bad, but the attention economy is the underlying problem. ... Brave Rewards enables users to self-fund, and contribute automatically ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found