Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creation of Top device driving purchases ACR KMW #9162

Open
3 tasks done
10upsimon opened this issue Aug 7, 2024 · 2 comments
Open
3 tasks done

Creation of Top device driving purchases ACR KMW #9162

10upsimon opened this issue Aug 7, 2024 · 2 comments
Labels
javascript Pull requests that update Javascript code Module: Analytics Google Analytics module related issues P0 High priority Team S Issues for Squad 1 Type: Feature New feature

Comments

@10upsimon
Copy link
Collaborator

10upsimon commented Aug 7, 2024

Feature Description

One of the identified metric tiles for the ACR epic is Top device driving purchases. Details of this metric tile are as follows:

  • Description: Total number of purchases for the top device. We will extract only the top performing one and show it in existing numeric tile template (similar to the existing “Top traffic source” KM tile)
  • Events: purchase
  • Metrics: ecommercePurchases
  • Order: Descending
  • Purpose: Inform users of the best performing device so they can take action in that direction if needed. If their top platform driving purchases is mobile, maybe they need to put additional effort to ensure a smoother add to cart experience for visitors in order to keep growing this metric, etc.
  • Type: Numerical

Figma design: TBA


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • A new Top device driving purchase ACR widget is introduced to the existing list of widgets available within KMW
    • Said widget presents visually as per the Figma design: Top traffic source driving leads within ACR metrics section of design
    • Widget displays the percentage of ecommercePurchases metric for the deviceCategory dimension (using the 1st/top device category from the results)
    • Top device 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

Implementation Brief

  • Update assets/js/googlesitekit/datastore/user/constants.js
    • Include new constant, say KM_ANALYTICS_TOP_DEVICE_DRIVING_PURCHASES, holding a string kmAnalyticsTopDeviceDrivingPurchases
  • Update assets/js/components/KeyMetrics/key-metrics-widgets.js
    • Register new widget for KM_ANALYTICS_TOP_DEVICE_DRIVING_PURCHASES
    • Use "Top device driving purchases" for title
    • Use "Top device driving the most purchases" for description and tooltip
    • Include new property requiredConversionEventName, and assign it an array value containing purchase event name
    • In displayInList pass the helper function shouldDisplayWidgetWithConversionEvent
  • Add assets/js/modules/analytics-4/components/widgets/TopDeviceDrivingPurchases.js
    • You can use assets/js/modules/analytics-4/components/widgets/TopTrafficSourceWidget.js as a starting point due to the similarity, with difference in report options
    • In totalPurchasesReportOptions:
      • Use ecommercePurchases metric
    • In deviceReportOptions:
      • Use deviceCategory for dimensions
      • Use ecommercePurchases metric
  • Update assets/js/modules/analytics-4/index.js to include new widget registration

Test Coverage

  • Add stories for the new widget

QA Brief

  • Setup Site Kit with the Analytics module enabled
  • Contact @zutigrm for access to the test website containing ACR data
  • Verify that in key metrics selection panel the Top device driving purchases widget is not available
  • Enable the conversionReporting feature flag
  • Navigate to the key metrics selection panel and select the Top device driving purchases tile
  • Verify that the widget is showing data, and matching the Figma design in the AC.
  • Go to Analytics settings - switch to a different account/property, and verify that the Top device driving purchases widget is showing zero data (since the widget will only be having data on properties that have required ACR events and data associated with them)

Changelog entry

@10upsimon 10upsimon added javascript Pull requests that update Javascript code Module: Analytics Google Analytics module related issues Team S Issues for Squad 1 Type: Feature New feature labels Aug 7, 2024
@jamesozzie jamesozzie added the Needs Documentation Issues which require new or updated public-facing documentation. label Aug 7, 2024
@binnieshah binnieshah added the P0 High priority label Aug 19, 2024
@zutigrm zutigrm assigned zutigrm and unassigned zutigrm Aug 23, 2024
@eugene-manuilov eugene-manuilov self-assigned this Aug 23, 2024
@eugene-manuilov
Copy link
Collaborator

AC ✔️

@eugene-manuilov eugene-manuilov removed their assignment Aug 23, 2024
@zutigrm zutigrm assigned zutigrm and unassigned zutigrm Aug 28, 2024
@eugene-manuilov eugene-manuilov self-assigned this Sep 3, 2024
@eugene-manuilov
Copy link
Collaborator

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Sep 3, 2024
@binnieshah binnieshah removed the Needs Documentation Issues which require new or updated public-facing documentation. label Sep 11, 2024
@jimmymadon jimmymadon self-assigned this Sep 23, 2024
@jimmymadon jimmymadon removed their assignment Oct 2, 2024
@zutigrm zutigrm assigned zutigrm and jimmymadon and unassigned zutigrm Oct 2, 2024
@jimmymadon jimmymadon assigned zutigrm and unassigned jimmymadon Oct 2, 2024
@zutigrm zutigrm removed their assignment Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
javascript Pull requests that update Javascript code Module: Analytics Google Analytics module related issues P0 High priority Team S Issues for Squad 1 Type: Feature New feature
Projects
None yet
Development

No branches or pull requests

6 participants