Skip to content

Commit

Permalink
Extend some shopping-related metrics
Browse files Browse the repository at this point in the history
This CL extends some metrics on PriceTracking and MerchantTrust. Also it
moves all MerchantTrust metrics to commerce/histograms.

(cherry picked from commit 1c1750b)

Bug: 1319481
Change-Id: If42604cc4a2ae28d180ba93fc6bed9e75a9ea3fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3606848
Reviewed-by: Wei-Yin Chen <wychen@chromium.org>
Commit-Queue: Zhiyuan Cai <zhiyuancai@chromium.org>
Owners-Override: Zhiyuan Cai <zhiyuancai@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#995860}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3608755
Auto-Submit: Zhiyuan Cai <zhiyuancai@chromium.org>
Reviewed-by: Krishna Govind <govind@chromium.org>
Commit-Queue: Krishna Govind <govind@chromium.org>
Owners-Override: Krishna Govind <govind@chromium.org>
Cr-Commit-Position: refs/branch-heads/5005@{#185}
Cr-Branched-From: 5b4d945-refs/heads/main@{#992738}
  • Loading branch information
Zhiyuan Cai authored and Chromium LUCI CQ committed Apr 27, 2022
1 parent 12047d2 commit 4961333
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 192 deletions.
194 changes: 189 additions & 5 deletions tools/metrics/histograms/metadata/commerce/histograms.xml
Expand Up @@ -26,6 +26,14 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
<variant name="UserManaged" summary="user-managed price tracking."/>
</variants>

<variants name="MerchantTrustMessageStarRating">
<variant name="AboveFour" summary="rating value within [4 - 4.5)"/>
<variant name="AboveFourPointFive" summary="rating value within [4.5 - 5]"/>
<variant name="AboveThree" summary="rating value within [3 - 4)"/>
<variant name="AboveTwo" summary="rating value within [2 - 3)"/>
<variant name="BelowTwo" summary="rating value within [0 - 2)"/>
</variants>

<variants name="TabUsageStatuses">
<variant name="ActiveTab"
summary="Tabs between 0 and 1 day since last usage."/>
Expand Down Expand Up @@ -177,7 +185,7 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
</histogram>

<histogram name="Commerce.PriceDrop.AnnotationsEnabled" enum="Boolean"
expires_after="2022-06-01">
expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>zhiyuancai@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
Expand Down Expand Up @@ -226,7 +234,7 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
</histogram>

<histogram name="Commerce.PriceDrops.{ManagementType}.NotificationCount"
units="notifications" expires_after="2022-06-01">
units="notifications" expires_after="2022-10-01">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
Expand All @@ -240,7 +248,7 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
</histogram>

<histogram name="Commerce.PriceDrops.{ManagementType}.NotificationReachedCap"
enum="Boolean" expires_after="2022-06-01">
enum="Boolean" expires_after="2022-10-01">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
Expand Down Expand Up @@ -303,7 +311,7 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
</histogram>

<histogram name="Commerce.Subscriptions.TabEligible" enum="Boolean"
expires_after="2022-06-01">
expires_after="2022-10-01">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
Expand All @@ -317,7 +325,7 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
</histogram>

<histogram name="Commerce.Subscriptions.{ManagementType}.Count"
units="subscriptions" expires_after="2022-06-01">
units="subscriptions" expires_after="2022-10-01">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
Expand All @@ -330,6 +338,182 @@ https://chromium.googlesource.com/chromium/src.git/+/HEAD/tools/metrics/histogra
<token key="ManagementType" variants="ManagementTypes"/>
</histogram>

<histogram name="MerchantTrust.BottomSheet.CloseReason"
enum="BottomSheet.StateChangeReason" expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the reason that the merchant trust bottom sheet is closed. Recorded
when the bottom sheet is closed. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.BottomSheet.DurationFullyOpened" units="ms"
expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the duration in milliseconds that the merchant trust bottom sheet is
left fully expanded. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.BottomSheet.DurationHalfOpened" units="ms"
expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the duration in milliseconds that the merchant trust bottom sheet is
left half expanded. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.BottomSheet.DurationPeeked" units="ms"
expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the duration in milliseconds that the merchant trust bottom sheet is
peeking. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.BottomSheet.IsFullyViewed" enum="Boolean"
expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records whether the merchant trust bottom sheet is fully expanded. Recorded
when the bottom sheet is closed. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.BottomSheet.IsHalfViewed" enum="Boolean"
expires_after="2022-10-01">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records whether the merchant trust bottom sheet is half expanded. Recorded
when the bottom sheet is closed. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.BottomSheet.OpenSource"
enum="MerchantTrustBottomSheetOpenedSource" expires_after="2022-10-01">
<owner>zhiyuancai@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records which ui the bottom sheet is opened from. Recorded when the bottom
sheet is opened. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.Message.ClearReason"
enum="MerchantTrustMessageClearReason" expires_after="2022-09-18">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records why the prepared merchant trust message is cleared. Recorded when
the prepared message is cleared. Implemented for Android. In M96 and later
this includes MESSAGE_CONTEXT_NO_LONGER_VALID and
SWITCH_TO_DIFFERENT_WEBCONTENTS.
</summary>
</histogram>

<histogram name="MerchantTrust.Message.DismissReason"
enum="MessageDismissReason" expires_after="2022-09-18">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the reason that the merchant trust message is dismissed. Implemented
for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.Message.DurationPrepared" units="ms"
expires_after="2022-09-18">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the duration in milliseconds from the merchant trust message being
prepared to it being shown or cleared. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.Message.DurationShown" units="ms"
expires_after="2022-09-18">
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the duration in milliseconds that the merchant trust message is
shown. Implemented for Android.
</summary>
</histogram>

<histogram name="MerchantTrust.MessageImpact.BrowsingTime" units="ms"
expires_after="M105">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the user browsing time in milliseconds in a tab on the same host
after a message shows. Recorded when user navigates to another host or the
tab gets hid/closed. Recorded for all messages. Implemented for Android.
</summary>
</histogram>

<histogram
name="MerchantTrust.MessageImpact.BrowsingTime.Rating{MessageStarRating}"
units="ms" expires_after="M105">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the user browsing time in milliseconds in a tab on the same host
after a message shows. Recorded when user navigates to another host or the
tab gets hid/closed. Recorded for message with {MessageStarRating}.
Implemented for Android.
</summary>
<token key="MessageStarRating" variants="MerchantTrustMessageStarRating"/>
</histogram>

<histogram name="MerchantTrust.MessageImpact.NavigationCount"
units="navigations" expires_after="M105">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the user navigation count in a tab on the same host after a message
shows. Recorded when user navigates to another host or the tab gets
hid/closed. Recorded for all messages. Implemented for Android.
</summary>
</histogram>

<histogram
name="MerchantTrust.MessageImpact.NavigationCount.Rating{MessageStarRating}"
units="navigations" expires_after="M105">
<owner>zhiyuancai@chromium.org</owner>
<owner>ayman@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records the user navigation count in a tab on the same host after a message
shows. Recorded when user navigates to another host or the tab gets
hid/closed. Recorded for message with {MessageStarRating}. Implemented for
Android.
</summary>
<token key="MessageStarRating" variants="MerchantTrustMessageStarRating"/>
</histogram>

<histogram name="MerchantTrust.PageInfo.IsStoreInfoVisible"
enum="BooleanVisible" expires_after="2022-09-11">
<owner>zhiyuancai@chromium.org</owner>
<owner>chrome-shopping@google.com</owner>
<summary>
Records whether the store info row is visible in page info. Recorded when
the page info is opened. Implemented for Android.
</summary>
</histogram>

</histograms>

</histogram-configuration>

0 comments on commit 4961333

Please sign in to comment.