|
|
Chromium Code Reviews|
Created:
4 years, 3 months ago by Avi (use Gerrit) Modified:
4 years, 3 months ago CC:
chromium-reviews, asvitkine+watch_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionCollect data on site engagement vs dialogs.
BUG=644268
TEST=none
Committed: https://crrev.com/9cd275c8e1068f6dc5453f871fa945a9aa2f97b8
Cr-Commit-Position: refs/heads/master@{#418257}
Patch Set 1 #Patch Set 2 : more uma #
Total comments: 4
Patch Set 3 : update #
Total comments: 2
Patch Set 4 : more xml #
Total comments: 4
Patch Set 5 : histograms #Patch Set 6 : histogram cleanup #
Total comments: 8
Patch Set 7 : xml tweaks #
Messages
Total messages: 49 (29 generated)
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
avi@chromium.org changed reviewers: + dominickn@chromium.org, rbyers@chromium.org
Rick, Dominick, WDYT?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
One thing we'll have to be careful of with these metrics is that they'll give us an overall count, but only limited insight into the legitimacy of each dialog. I guess there may be a rough correlation between length of message text and illegitimacy of the dialog though. Another idea I had - perhaps a set of HTTP vs HTTPS and Karma metrics (i.e. if HTTPS and wants a dialog, record Karma level, and same for HTTP)? I suspect that "important" sites we want to avoid breaking might be more likely to be served over HTTPS (and hopefully we see a curve more skewed to higher Karma for those sites). https://codereview.chromium.org/2313973004/diff/20001/chrome/browser/ui/javas... File chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc (right): https://codereview.chromium.org/2313973004/diff/20001/chrome/browser/ui/javas... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:49: Profile* profile = Minor nit - you could inline the Profile::FromBrowserContext() call into the SiteEngagementService::Get call in both locations. https://codereview.chromium.org/2313973004/diff/20001/chrome/browser/ui/javas... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:57: case SiteEngagementService::ENGAGEMENT_LEVEL_NONE: { I think it might be better to base these histograms on explicit constants rather than levels - it's possible we tweak the levels in the future, and that would make the data inconsistent. Also, "LOW" Karma is currently regarded as <5 - and I think that's possibly too high a boundary for gating dialogs. I would suggest an additional histogram for <1 Karma: CountOfCharactersKarmaNone -> 0 Karma CountOfCharactersKarmaLessThanOne -> <1 Karma CountOfCharactersKarmaOneToFive -> 1 <= Karma < 5 CountOfCharactersKarmaHigher -> >=5 Karma
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Re length: that's the only metric I can think of for measuring legitimacy. If you have any thoughts... Re HTTPS: this already adds five metrics. I suppose driving scam sites to HTTPS to avoid our gating is good for the HTTPS-everywhere crowd, but I don't know if that helps in the dialog realm. https://codereview.chromium.org/2313973004/diff/20001/chrome/browser/ui/javas... File chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc (right): https://codereview.chromium.org/2313973004/diff/20001/chrome/browser/ui/javas... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:49: Profile* profile = On 2016/09/06 23:50:29, dominickn wrote: > Minor nit - you could inline the Profile::FromBrowserContext() call into the > SiteEngagementService::Get call in both locations. Done. https://codereview.chromium.org/2313973004/diff/20001/chrome/browser/ui/javas... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:57: case SiteEngagementService::ENGAGEMENT_LEVEL_NONE: { On 2016/09/06 23:50:29, dominickn wrote: > I think it might be better to base these histograms on explicit constants rather > than levels - it's possible we tweak the levels in the future, and that would > make the data inconsistent. > > Also, "LOW" Karma is currently regarded as <5 - and I think that's possibly too > high a boundary for gating dialogs. I would suggest an additional histogram for > <1 Karma: > > CountOfCharactersKarmaNone -> 0 Karma > CountOfCharactersKarmaLessThanOne -> <1 Karma > CountOfCharactersKarmaOneToFive -> 1 <= Karma < 5 > CountOfCharactersKarmaHigher -> >=5 Karma Done. Also, is it OK to use "karma" as a term in UMA?
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Seems like a reasonable place to start with measuring to me. LGTM with one issue. https://codereview.chromium.org/2313973004/diff/40001/chrome/browser/ui/javas... File chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc (right): https://codereview.chromium.org/2313973004/diff/40001/chrome/browser/ui/javas... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:91: "JSDialogs.SiteKarmaOfBeforeUnload", You need to add this one to histograms.xml still, right?
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
avi@chromium.org changed reviewers: + asvitkine@chromium.org
https://codereview.chromium.org/2313973004/diff/40001/chrome/browser/ui/javas... File chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc (right): https://codereview.chromium.org/2313973004/diff/40001/chrome/browser/ui/javas... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:91: "JSDialogs.SiteKarmaOfBeforeUnload", On 2016/09/07 18:40:15, Rick Byers wrote: > You need to add this one to histograms.xml still, right? Yep!
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2313973004/diff/60001/tools/metrics/histogram... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2313973004/diff/60001/tools/metrics/histogram... tools/metrics/histograms/histograms.xml:20641: +<histogram name="JSDialogs.CountOfCharactersKarmaHigher"> Nit: For all of these add a units= attr https://codereview.chromium.org/2313973004/diff/60001/tools/metrics/histogram... tools/metrics/histograms/histograms.xml:20649: +<histogram name="JSDialogs.CountOfCharactersKarmaLessThanOne"> Nit: Just a naming suggestion. I find the current naming scheme a bit hard to read. Couple of suggestions: - Maybe CharacterCount instead of CountOfCharacters? - Maybe add an intermediate . for grouping? So it could be JSDialogs.CharacterCount.KarmaLessThanOne. You can use the histogram_suffixes construct in histograms.xml to define all the suffixes so you don't need to duplicate the histogram definitions. See the example in the comment at the top of histograms.xml on how to do this.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Like this? I got a warning about not matching the histogram names to the xml file, but I suppose that tool doesn't support suffixes yet. https://codereview.chromium.org/2313973004/diff/60001/tools/metrics/histogram... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2313973004/diff/60001/tools/metrics/histogram... tools/metrics/histograms/histograms.xml:20641: +<histogram name="JSDialogs.CountOfCharactersKarmaHigher"> On 2016/09/07 22:13:12, Alexei Svitkine (slow) wrote: > Nit: For all of these add a units= attr Done. https://codereview.chromium.org/2313973004/diff/60001/tools/metrics/histogram... tools/metrics/histograms/histograms.xml:20649: +<histogram name="JSDialogs.CountOfCharactersKarmaLessThanOne"> On 2016/09/07 22:13:12, Alexei Svitkine (slow) wrote: > Nit: Just a naming suggestion. I find the current naming scheme a bit hard to > read. > > Couple of suggestions: > - Maybe CharacterCount instead of CountOfCharacters? > - Maybe add an intermediate . for grouping? > > So it could be JSDialogs.CharacterCount.KarmaLessThanOne. > > You can use the histogram_suffixes construct in histograms.xml to define all the > suffixes so you don't need to duplicate the histogram definitions. See the > example in the comment at the top of histograms.xml on how to do this. Done.
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm. Regarding "karma", we typically use "engagement" in names, but Karma should be fine here too since you've used "site engagement" in histograms.xml
On 2016/09/08 01:51:58, dominickn wrote: > lgtm. > > Regarding "karma", we typically use "engagement" in names, but Karma should be > fine here too since you've used "site engagement" in histograms.xml One more thought on legitimacy - is it possible to plumb a user gesture bit through? I could imagine using a higher engagement cutoff for non-gestured dialogs.
On 2016/09/08 01:53:50, dominickn wrote: > On 2016/09/08 01:51:58, dominickn wrote: > > lgtm. > > > > Regarding "karma", we typically use "engagement" in names, but Karma should be > > fine here too since you've used "site engagement" in histograms.xml > > One more thought on legitimacy - is it possible to plumb a user gesture bit > through? I could imagine using a higher engagement cutoff for non-gestured > dialogs. As long as we only use it as a signal and don't eat it. Eating the gesture would break things.
On 2016/09/08 01:57:41, Avi wrote: > On 2016/09/08 01:53:50, dominickn wrote: > > On 2016/09/08 01:51:58, dominickn wrote: > > > lgtm. > > > > > > Regarding "karma", we typically use "engagement" in names, but Karma should > be > > > fine here too since you've used "site engagement" in histograms.xml > > > > One more thought on legitimacy - is it possible to plumb a user gesture bit > > through? I could imagine using a higher engagement cutoff for non-gestured > > dialogs. > > As long as we only use it as a signal and don't eat it. Eating the gesture would > break things. But wouldn't the user gesture itself bump up the engagement score?
On 2016/09/08 01:57:41, Avi wrote: > On 2016/09/08 01:53:50, dominickn wrote: > > On 2016/09/08 01:51:58, dominickn wrote: > > > lgtm. > > > > > > Regarding "karma", we typically use "engagement" in names, but Karma should > be > > > fine here too since you've used "site engagement" in histograms.xml > > > > One more thought on legitimacy - is it possible to plumb a user gesture bit > > through? I could imagine using a higher engagement cutoff for non-gestured > > dialogs. > > As long as we only use it as a signal and don't eat it. Eating the gesture would > break things. Yep, definitely just as a signal, I don't think we should eat a gesture for dialogs. I was thinking along the lines of: if (gesture) // use lower cutoff else // use higher cutoff
On 2016/09/08 01:59:11, dominickn wrote: > On 2016/09/08 01:57:41, Avi wrote: > > On 2016/09/08 01:53:50, dominickn wrote: > > > On 2016/09/08 01:51:58, dominickn wrote: > > > > lgtm. > > > > > > > > Regarding "karma", we typically use "engagement" in names, but Karma > should > > be > > > > fine here too since you've used "site engagement" in histograms.xml > > > > > > One more thought on legitimacy - is it possible to plumb a user gesture bit > > > through? I could imagine using a higher engagement cutoff for non-gestured > > > dialogs. > > > > As long as we only use it as a signal and don't eat it. Eating the gesture > would > > break things. > > Yep, definitely just as a signal, I don't think we should eat a gesture for > dialogs. I was thinking along the lines of: > > if (gesture) > // use lower cutoff > else > // use higher cutoff Another thought is that getting the user to click the page is easy for a scam site to do, while getting engagement up is not easy. If we adjust engagement on a gesture, all the sites have to do to adjust is bait the user into clicking.
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Alexei, ptal.
https://codereview.chromium.org/2313973004/diff/100001/chrome/browser/ui/java... File chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc (right): https://codereview.chromium.org/2313973004/diff/100001/chrome/browser/ui/java... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:93: site_engagement_service->GetScore(web_contents->GetLastCommittedURL())); Is GetScore() really a percentage? It seems to be a double on line 51 and you're comparing to values like 1 and 5... https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:20649: +<histogram name="JSDialogs.CharacterCountUserSuppressed" units="characters"> Nit: How about CharacterCount.UserSuppressed? https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:20654: + JSDialogs.CountOfJSDialogMessageCharacters. JSDialogs.CharacterCount https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:20742: + <summary>The site engagement values of sites showing dialogs.</summary> Nit: Mention when this is logged. Once per JS dialog? Once per site?
The CQ bit was checked by avi@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2313973004/diff/100001/chrome/browser/ui/java... File chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc (right): https://codereview.chromium.org/2313973004/diff/100001/chrome/browser/ui/java... chrome/browser/ui/javascript_dialogs/javascript_dialog_tab_helper.cc:93: site_engagement_service->GetScore(web_contents->GetLastCommittedURL())); On 2016/09/08 15:01:42, Alexei Svitkine (very slow) wrote: > Is GetScore() really a percentage? It seems to be a double on line 51 and you're > comparing to values like 1 and 5... It's a double ranging from 0 to 100. (See chrome://site-engagement/ .) Yes, I think that's kinda weird, too. https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:20649: +<histogram name="JSDialogs.CharacterCountUserSuppressed" units="characters"> On 2016/09/08 15:01:42, Alexei Svitkine (very slow) wrote: > Nit: How about CharacterCount.UserSuppressed? But UserSuppressed isn't a flavor of user engagement. Do we usually group that kind of a count together with the others? https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:20654: + JSDialogs.CountOfJSDialogMessageCharacters. On 2016/09/08 15:01:42, Alexei Svitkine (very slow) wrote: > JSDialogs.CharacterCount No, JSDialogs.CountOfJSDialogMessageCharacters is an existing UMA stat that has been around for months with that name. https://codereview.chromium.org/2313973004/diff/100001/tools/metrics/histogra... tools/metrics/histograms/histograms.xml:20742: + <summary>The site engagement values of sites showing dialogs.</summary> On 2016/09/08 15:01:42, Alexei Svitkine (very slow) wrote: > Nit: Mention when this is logged. Once per JS dialog? Once per site? Done.
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by avi@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from rbyers@chromium.org, dominickn@chromium.org Link to the patchset: https://codereview.chromium.org/2313973004/#ps120001 (title: "xml tweaks")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #7 (id:120001)
Message was sent while issue was closed.
Description was changed from ========== Collect data on site engagement vs dialogs. BUG=644268 TEST=none ========== to ========== Collect data on site engagement vs dialogs. BUG=644268 TEST=none Committed: https://crrev.com/9cd275c8e1068f6dc5453f871fa945a9aa2f97b8 Cr-Commit-Position: refs/heads/master@{#418257} ==========
Message was sent while issue was closed.
Patchset 7 (id:??) landed as https://crrev.com/9cd275c8e1068f6dc5453f871fa945a9aa2f97b8 Cr-Commit-Position: refs/heads/master@{#418257} |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
