Commit cf77323f authored by Martin Šrámek's avatar Martin Šrámek Committed by Commit Bot

Add an action for the Safety Check promo click event

Although there already is a histogram tracking NTP promo clicks in
general, we need to also add an action, so that we can measure the
funnel from this promotion to the actions the user takes in settings
on the action sequencing dashboard.

Bug: 1015841
Change-Id: Ic68918b48339402af7d700d7d134eb242ee8537f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2429048Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
Reviewed-by: default avatarSteven Holte <holte@chromium.org>
Commit-Queue: Martin Šrámek <msramek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811694}
parent 1947a0fa
......@@ -6,6 +6,7 @@
#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "base/metrics/user_metrics.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/command_updater_impl.h"
#include "chrome/browser/profiles/profile.h"
......@@ -64,6 +65,8 @@ void PromoBrowserCommandHandler::ExecuteCommandWithDisposition(
case Command::kOpenSafetyCheck:
NavigateToURL(GURL(chrome::GetSettingsUrl(chrome::kSafetyCheckSubPage)),
disposition);
base::RecordAction(
base::UserMetricsAction("NewTabPage_Promos_SafetyCheck"));
break;
default:
NOTREACHED() << "Unspecified behavior for command " << id;
......
......@@ -16089,6 +16089,13 @@ should be able to be added at any place in this file.
</description>
</action>
<action name="NewTabPage_Promos_SafetyCheck">
<owner>msramek@chromium.org</owner>
<description>
Recorded when the user clicks a Safety Check promotion on the New Tab Page.
</description>
</action>
<action name="NewTabPage_ReopenTab">
<owner>Please list the metric's owners. Add more owner tags as needed.</owner>
<description>Please enter the description of this user action.</description>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment