One of the identified metric tiles for the ACR epic is Top cities driving purchases. Details of this metric tile are as follows:
Description: Cities from which users are making the most purchases.
Events: purchase
Metrics: ecommercePurchases
Dimension: city
Order: Descending
Purpose: Inform users of the most active countries making the purchases on the website so they can make informed decisions on increasing the effort (translating/keywords/marketing campaigns, etc) to serve their content/products to these countries.
Widget displays the list of top cities for ecommercePurchases metric based on city dimension (returning top 3 results)
Cities driving the most purchases should be used for description and the tooltip
Widget will not be displayed, or shown in the selection panel list if purchase event is not present, or conversionReporting feature flag is not enabled
Feature Description
One of the identified metric tiles for the ACR epic is
Top cities driving purchases
. Details of this metric tile are as follows:purchase
ecommercePurchases
city
Figma design: TBA
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Top cities driving purchases
ACR widget is introduced to the existing list of widgets available within KMWecommercePurchases
metric based oncity
dimension (returning top 3 results)Cities driving the most purchases
should be used for description and the tooltippurchase
event is not present, orconversionReporting
feature flag is not enabledImplementation Brief
assets/js/googlesitekit/datastore/user/constants.js
KM_ANALYTICS_TOP_CITIES_DRIVING_PURCHASES
, holding a stringkmAnalyticsTopCitiesDrivingPurchases
assets/js/components/KeyMetrics/key-metrics-widgets.js
KM_ANALYTICS_TOP_CITIES_DRIVING_PURCHASES
title
description
andtooltip
requiredConversionEventName
, and assign it an array value containingpurchase
event namedisplayInList
pass the helper functionshouldDisplayWidgetWithConversionEvent
assets/js/modules/analytics-4/components/widgets/TopCitiesDrivingPurchasesWidget.js
assets/js/modules/analytics-4/components/widgets/TopCitiesWidget.js
for example, as a starting pointreportOptions
:city
for dimensionsecommercePurchases
metricnot set
dimension value for the city. You can see an example inTopCitiesDrivingLeadsWidget
assets/js/modules/analytics-4/index.js
to include new widget registrationTest Coverage
QA Brief
Changelog entry