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

MSD - Today's Stats Card - Metrics #15965

Merged
merged 11 commits into from
Feb 18, 2022
Merged

Conversation

ashiagr
Copy link
Contributor

@ashiagr ashiagr commented Feb 16, 2022

Fixes #15751

References: p1643829887600439-slack-C0290FLA0RM

This PR ensures that metrics are properly added for Today's Stats Dashboard Card.

To Test:

Setup

  • Launch the app
  • Navigate to Me -> App Settings -> Debug Settings
  • Ensure that the MySiteDashboardTodaysStatsCardFeatureConfig is to set to on
  • Restart the app if needed
  • Navigate to Me -> App Settings -> Privacy Settings
  • Toggle the "collect information" switch to on
  • Navigate to the My Site tab

Then follow instructions on how to enable

Notice the following trackings in logs:

Event Tracking
MY_SITE_DASHBOARD_CARD_SHOWN (without error) 🔵 Tracked: my_site_dashboard_card_shown, Properties: {"type”:”stats”,”subtype":"todays_stats"}
MY_SITE_DASHBOARD_CARD_FOOTER_ACTION_TAPPED 🔵 Tracked: my_site_dashboard_card_footer_action_tapped, Properties: {"type":"stats","subtype":"todays_stats"}
MY_SITE_DASHBOARD_CARD_ITEM_TAPPED 🔵 Tracked: my_site_dashboard_card_item_tapped, Properties: {"type":"stats","subtype":"todays_stats"}
MY_SITE_DASHBOARD_CARD_SHOWN (with error) 🔵 Tracked: my_site_dashboard_card_shown, Properties: {"type":"error","subtype":"todays_stats"}
MY_SITE_MENU_ITEM_TAPPED 🔵 Tracked: my_site_menu_item_tapped, Properties: {"type":"stats"}

Additionally, for AB Testing (see p1645013610195379-slack-C0290FLA0RM), notice that today's stats enabled state is tracked as part of the following events:

  1. Stats screen accessed

    🔵 Tracked: stats_accessed, Properties: {"org.wordpress.android.util.config.MySiteDashboardTodaysStatsCardFeatureConfig":true,"blog_id":<>,"is_jetpack":<>,"site_type":"blog"}

  2. My site tab accessed

    🔵 Tracked: my_site_tab_accessed, Properties: {"org.wordpress.android.util.config.MySiteDashboardTodaysStatsCardFeatureConfig":true,"blog_id":<>,"is_jetpack":<>,"site_type":"blog"}

Note: Today's stats feature config name is based on this logic. Since remoteConfig is not yet enabled, you'll notice full java class name for the config flag.

Review Instructions:

Review by only one reviewer is sufficient.

Regression Notes

  1. Potential unintended areas of impact
    N/A

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    N/A

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@ashiagr ashiagr self-assigned this Feb 16, 2022
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 16, 2022

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 16, 2022

You can test the changes on this Pull Request by downloading the APKs:

… tab accessed.

This will be useful to compare how often  my site tab is accessed based on  today's cards enabled state.
@ashiagr ashiagr added Tooling and removed Tooling labels Feb 16, 2022
@ashiagr ashiagr requested review from AjeshRPai and zwarm February 16, 2022 13:05
Copy link
Contributor

@zwarm zwarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ashiagr - All LGTM . Thanks for making the stats + today_stats type/subtype changes. ❤️

@ashiagr ashiagr removed the request for review from AjeshRPai February 17, 2022 05:20
Base automatically changed from issue/15201-stats-card-accessibility-improvements to trunk February 18, 2022 10:03
@ashiagr ashiagr marked this pull request as ready for review February 18, 2022 10:03
# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/mysite/cards/dashboard/CardsSource.kt
#	WordPress/src/test/java/org/wordpress/android/ui/mysite/cards/dashboard/CardsSourceTest.kt
@ashiagr ashiagr added this to the 19.3 milestone Feb 18, 2022
@ashiagr ashiagr merged commit 3fee60e into trunk Feb 18, 2022
@ashiagr ashiagr deleted the issue/15751-stats-card-metrics branch February 18, 2022 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

My Site Dashboard - Stats Card - Metrics
2 participants