New issue
Advanced search Search tips

Issue 825875 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 823280



Sign in to add a comment

Collect metrics for spammy popups

Project Member Reported by csharrison@chromium.org, Mar 26 2018

Issue description

Spammy popups closed by the user is a heuristic for abuse, we should log UKM/UMA for engagement time on a popup before closing it.

For UKM, we probably want to key this to the opener URL.
 
Blockedon: 823280
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c4e2c9c250de0b6c84aeadaf3db408955770ed5

commit 6c4e2c9c250de0b6c84aeadaf3db408955770ed5
Author: Charlie Harrison <csharrison@chromium.org>
Date: Wed Mar 28 15:53:38 2018

Refactor the PopupTracker's lifetime

Previously, the PopupTracker existed until its second main frame document
committed. This was because the only metric we were interested in was
the engagement time of that first document.

There are more metrics we want to log about the total engagement time
for the popup, so this CL
1. Extends the lifetime to match its owning WebContents
2. Refactors the visibility tracker to track visibility across the
   entire lifetime.
3. Logs metrics at WebContentsDestroyed() rather than the destructor,
   so new metrics can safely access the web_contents()

This change shouldn't affect existing metrics at all, except for the
marginal difference from (3).

Bug:  825875 
Change-Id: I3096d8b7a483786902980976c22d23e50e7cfb99
Reviewed-on: https://chromium-review.googlesource.com/981272
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546502}
[modify] https://crrev.com/6c4e2c9c250de0b6c84aeadaf3db408955770ed5/chrome/browser/ui/blocked_content/popup_tracker.cc
[modify] https://crrev.com/6c4e2c9c250de0b6c84aeadaf3db408955770ed5/chrome/browser/ui/blocked_content/popup_tracker.h

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f242aee79faccf8accd398477d2ae0b847da64d4

commit f242aee79faccf8accd398477d2ae0b847da64d4
Author: Charlie Harrison <csharrison@chromium.org>
Date: Wed Mar 28 20:24:01 2018

Log (user-initiated) engagement time for popup WebContents

Bug:  825875 
Change-Id: I908fa19846156db42044f147979f23e8bfd75657
Reviewed-on: https://chromium-review.googlesource.com/980602
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Reviewed-by: Steven Holte <holte@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546582}
[modify] https://crrev.com/f242aee79faccf8accd398477d2ae0b847da64d4/chrome/browser/ui/blocked_content/popup_tracker.cc
[modify] https://crrev.com/f242aee79faccf8accd398477d2ae0b847da64d4/chrome/browser/ui/blocked_content/popup_tracker_browsertest.cc
[modify] https://crrev.com/f242aee79faccf8accd398477d2ae0b847da64d4/tools/metrics/histograms/histograms.xml

Privacy LGTM on UKM collection.
Cc: csharrison@chromium.org
Owner: jkarlin@chromium.org
Status: Assigned (was: Untriaged)
Thanks! Moving ownership to jkarlin who I believe is doing the actual UKM work here.
Status: Fixed (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Nov 13

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6c8b7a36c15a410644979d1470baea96d5a9c42e

commit 6c8b7a36c15a410644979d1470baea96d5a9c42e
Author: Charlie Harrison <csharrison@chromium.org>
Date: Tue Nov 13 20:40:35 2018

Add some additional metadata to Popup.Closed UKM

This CL extends the amount of useful information a popup tracker
has, and reports it to UKM on close.

This data will additionally be useful if we add spammy popup detection
+ enforcement at run time.

Bug:  825875 
Change-Id: I1366b795c500cbf58730887cf4e71c3f32b945a8
Reviewed-on: https://chromium-review.googlesource.com/c/1313508
Reviewed-by: Steven Holte <holte@chromium.org>
Reviewed-by: Ilya Sherman <isherman@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607725}
[modify] https://crrev.com/6c8b7a36c15a410644979d1470baea96d5a9c42e/chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc
[modify] https://crrev.com/6c8b7a36c15a410644979d1470baea96d5a9c42e/chrome/browser/ui/blocked_content/popup_tracker.cc
[modify] https://crrev.com/6c8b7a36c15a410644979d1470baea96d5a9c42e/chrome/browser/ui/blocked_content/popup_tracker.h
[modify] https://crrev.com/6c8b7a36c15a410644979d1470baea96d5a9c42e/chrome/browser/ui/blocked_content/popup_tracker_browsertest.cc
[modify] https://crrev.com/6c8b7a36c15a410644979d1470baea96d5a9c42e/chrome/browser/ui/browser.cc
[modify] https://crrev.com/6c8b7a36c15a410644979d1470baea96d5a9c42e/tools/metrics/ukm/ukm.xml

Sign in to add a comment