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

[P3A] Implement search volume question #8854

Closed
iefremov opened this issue Mar 25, 2020 · 6 comments · Fixed by brave/brave-core#5302
Closed

[P3A] Implement search volume question #8854

iefremov opened this issue Mar 25, 2020 · 6 comments · Fixed by brave/brave-core#5302
Assignees
Labels
feature/new-metric Proposing a new metric for Privacy Preserving Product Analytics (P3A) features/P3A priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include

Comments

@iefremov
Copy link
Contributor

Question 1:
How many times did you search last week?
(The omnibox input doesn't resolve and triggers a search)

Answers:

0) Never
1) 1 to 5 times
2) 6 to 10 times
3) 11 to 20 times
4) 21 to 50 times
5) 51 to 100 times
6) 101 to 500 times
7) More than 500 times 

Justification:
The volume of search activity generated via Brave will help us identify the optimal search strategy for both product development and partnerships

@iefremov iefremov self-assigned this Mar 25, 2020
@rebron rebron added the priority/P2 A bad problem. We might uplift this to the next planned release. label Mar 27, 2020
iefremov added a commit to brave/brave-core that referenced this issue Apr 21, 2020
Fix brave/brave-browser#8854

To start measuring search volumes we start with omnibox - we would
count all search-related events coming from here. This PR also
refactors the utility class for recording "weekly" metrics.
iefremov added a commit to brave/brave-core that referenced this issue May 4, 2020
Fix brave/brave-browser#8854

To start measuring search volumes we start with omnibox - we would
count all search-related events coming from here. This PR also
refactors the utility class for recording "weekly" metrics.
@bsclifton bsclifton added this to the 1.10.x - Nightly milestone May 6, 2020
@bsclifton
Copy link
Member

@iefremov can you provide a simple test plan for QA to try? Thanks 😄

@iefremov
Copy link
Contributor Author

@LaurenWags For QA:
Do several navigations from omnibox - navigations resolved as web searches should be counted on brave://local-stateas Brave.Omnibox.SearchCount in p3a section.

Directly typing search queris on e.g. https://google.com should not be counted.

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented May 18, 2020

@iefremov If I perform search in different tabs like NT/PT/Guest window tab/Tor tab - Brave.Omnibox.SearchCount should consider the search performed in all the type of tabs? or Brave.Omnibox.SearchCount response value should show only the search count specific to one type of tabs?

Example:

  1. Clean profile 1.9.70
  2. Perform a search in URL bar 5 times (In normal window tabs)
  3. Brave.Omnibox.SearchCount response value is displayed as 1 (expected)
  4. Open a Private window tab and perform search 1 time
  5. Refresh local-state and verify Brave.Omnibox.SearchCount response value changed from 1 to 2
  6. Open a Guest window and perform search 5 times (till step 6 we have performed a search for 11 times in Normal, PT and Guest window tabs)
  7. Refresh local-state file and verify Brave.Omnibox.SearchCount response value changed from 2 to 1

Actual: Step 5 response value is expected? Search performed in PT is also considered for total search count?
Step 7 search performed in Guest window is NOT considered for Total search count?(search performed in Normal+PT+Guest)

@iefremov
Copy link
Contributor Author

@GeetaSarvadnya good catch - in general, this is expected (by design, we don't care about multiple profiles) But I think in any case we shouln't persist incognito stats. Could you please file a follow-up?

@rebron
Copy link
Collaborator

rebron commented May 19, 2020

@iefremov Adding to the search count for Normal+Private window is ok. Not adding to the search count from Guest window is also ok. I'm going to close out the follow-up issue.

Thanks @GeetaSarvadnya for clarifying the different window types.

@btlechowski
Copy link

btlechowski commented May 19, 2020

Verification passed on

Brave 1.9.70 Chromium: 81.0.4044.138 (Official Build) (64-bit)
Revision 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS Ubuntu 18.04 LTS

Verified test plan from the description.
The actual search count is stored in Preferences file under brave->weekly_storage->search_count
Tested in normal window.

Verified 0 on clean install
"Brave.Omnibox.SearchCount":{"sent":false,"value":"0"}
Verified 1 for 1 search
"Brave.Omnibox.SearchCount":{"sent":false,"value":"1"}
Verified 1 for 5 searches
"Brave.Omnibox.SearchCount":{"sent":false,"value":"1"}
Verified 2 for 6 searches
"Brave.Omnibox.SearchCount":{"sent":false,"value":"2"}
Verified 2 for 10 searches
"Brave.Omnibox.SearchCount":{"sent":false,"value":"2"}
Verified 3 for 11 searches
"Brave.Omnibox.SearchCount":{"sent":false,"value":"3"}
Verified 3 for 20 searches
"Brave.Omnibox.SearchCount":{"sent":false,"value":"3"}
Verified 4 for 21 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"4"}
Verified 4 for 50 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"4"}
Verified 5 for 51 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"5"}
Verified 5 for 100 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"5"}
Verified 6 for 101 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"6"}
Verified 6 for 500 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"6"}
Verified 7 for 501 searches
"Brave.Omnibox.SearchCount":{"sent":true,"timestamp":1589868296.894225,"value":"7"}


Verification passed on

Brave | 1.9.70 Chromium: 81.0.4044.138 (Official Build) (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | Windows 10 OS Version 1803 (Build 17134.1006)

 "Brave.Omnibox.SearchCount": {
            "sent": false,
            "value": "0"
         },
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as 1 when search performed is in the range 1 to 5 times
 "Brave.Omnibox.SearchCount": {
            "sent": false,
            "value": "1"
         },
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as 2 when search performed is in the range 6 to 10 times
 "Brave.Omnibox.SearchCount": {
            "sent": false,
            "value": "2"
         },
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as 3 when search performed is in the range 11 to 20 times
 "Brave.Omnibox.SearchCount": {
            "sent": false,
            "value": "3"
         },
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as 4 when search performed is in the range 21 to 50 times
 "Brave.Omnibox.SearchCount": {
            "sent": true,
            "timestamp": 1589874771.177304,
            "value": "4"
         },
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as 5 when search performed is in the range 51 to 100 times
 "Brave.Omnibox.SearchCount": {
            "sent": true,
            "timestamp": 1589877558.55337,
            "value": "5"
         },
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as expected when we perform a search in the same tab for n number of times
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as expected when we perform a search in different tabs for n number of times
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as expected when we perform search using keyword search

Verification passed on

Brave 1.9.70 Chromium: 81.0.4044.138 (Official Build) (64-bit)
Revision 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS macOS Version 10.15.4 (Build 19E287)
  • Verified when there is no search Brave.Omnibox.SearchCount is set to 0

Screenshot 2020-05-19 at 7 19 38 p m

  • Verified when there is 1 to 5 searches, Brave.Omnibox.SearchCount is set to 1

Screenshot 2020-05-19 at 7 20 45 p m

  • Verified when there is 6 to 10 searches, Brave.Omnibox.SearchCount is set to 2

Screenshot 2020-05-19 at 7 21 57 p m

  • Verified when there is 11 to 20 searches, Brave.Omnibox.SearchCount is set to 3

Screenshot 2020-05-19 at 7 23 12 p m

  • Verified when there is 21 to 50 searches, Brave.Omnibox.SearchCount is set to 4

Screenshot 2020-05-19 at 7 24 30 p m

  • Verified when there is 51 to 100 searches, Brave.Omnibox.SearchCount is set to 5

Screenshot 2020-05-19 at 7 26 08 p m

  • Verified when there is 101 to 500 searches, Brave.Omnibox.SearchCount is set to 6

Screenshot 2020-05-19 at 7 26 21 p m

  • Verified when there are more than 500 searches, Brave.Omnibox.SearchCount is set to 7

Screenshot 2020-05-19 at 7 26 57 p m

  • Verified Brave.Omnibox.SearchCount response value is displayed as expected when the same tab is used to perform x number of searches
  • Verified Brave.Omnibox.SearchCount response value is displayed as expected when when different tabs are used to perform x number of searches
  • Verified that the Brave.Omnibox.SearchCount response value is displayed as expected when search is done based on keyword or search accelerator like :d

@rebron rebron changed the title Implement search volume P3A metric [P3A] Implement search volume P3A metric May 20, 2020
@rebron rebron changed the title [P3A] Implement search volume P3A metric [P3A] Implement search volume question May 20, 2020
@bsclifton bsclifton added the feature/new-metric Proposing a new metric for Privacy Preserving Product Analytics (P3A) label Jan 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/new-metric Proposing a new metric for Privacy Preserving Product Analytics (P3A) features/P3A priority/P2 A bad problem. We might uplift this to the next planned release. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants