Skip to content

Scan tracking#13954

Merged
malinajirka merged 25 commits intodevelopfrom
issue/13326-tracking
Feb 4, 2021
Merged

Scan tracking#13954
malinajirka merged 25 commits intodevelopfrom
issue/13326-tracking

Conversation

@malinajirka
Copy link
Copy Markdown
Contributor

@malinajirka malinajirka commented Feb 3, 2021

Parent issue #13326

Adds tracking to Jetpack Scan.

jetpack_scan_accessed - fired when the user clicks on "Scan" on MySite screen
jetpack_scan_history_accessed - fired when the user clicks on "History" toolbar action on Scan screen
jetpack_scan_history_filter - fired when the user changes tab on Scan History screen
jetpack_scan_threat_list_item_tapped - fired when the user clicks on a threat on Scan/Scan History screens
jetpack_scan_threat_codeable_estimate_tapped - fired when the user clicks on "GetFreeEstimate" button on threat detail screen
jetpack_scan_run_tapped - fired when the user clicks on "Scan" button on Scan screen
jetpack_scan_ignorethreat_dialogopen - fired when the user clicks on "ignore threat" on Threat detail screen
jetpack_scan_threat_ignore_tapped - fired when the user confirms dialog for "ignore threat" action on Threat detail screen
jetpack_scan_fixthreat_dialogopen - fired when the user clicks on "fix threat" on Threat detail screen
jetpack_scan_threat_fix_tapped - fired when the user confirms dialog for "fix threat" action on Threat detail screen
jetpack_scan_allthreats_open - fired when the user clicks on "fix N" button on Scan screen
jetpack_scan_allthreats_fix_tapped - fired when the user confirms dialog for "fix N" action on Scan screen
jetpack_scan_error_contact_tapped - fired when the user clicks on "contact support" on error screen
jetpack_scan_error - fired when an error screen or snackbar message is shown to the user

To test:
Test that all the above events are being fired. Also make sure that the properties for the events match the properties from the "Jetpack Section Tracking Events" doc.

Note: I'm not sure how to reproduce the error screen with "contact support" button, so I haven't tested that flow.

PR submission checklist:

  • I have considered adding unit tests where possible.
  • 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.

@malinajirka malinajirka added this to the 16.7 milestone Feb 3, 2021
@malinajirka malinajirka requested a review from a team February 3, 2021 15:00
@malinajirka malinajirka self-assigned this Feb 3, 2021
@malinajirka malinajirka requested review from ashiagr and zwarm and removed request for a team and zwarm February 3, 2021 15:00
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Feb 3, 2021

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

@malinajirka malinajirka mentioned this pull request Feb 3, 2021
67 tasks
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Feb 3, 2021

You can test the changes on this Pull Request by downloading the APK here.

@ashiagr ashiagr self-assigned this Feb 4, 2021
Copy link
Copy Markdown
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

All events are tracked properly, thank you 🙇‍♀️. Just have two question:

Note: I'm not sure how to reproduce the error screen with "contact support" button, so I haven't tested that flow.

I tested this flow and noticed two tracking event being logged:
I: 🔵 Tracked: jetpack_scan_error_contact_tapped
I: 🔵 Tracked: support_opened, Properties: {"origin":"SCAN_SCREEN_HELP"}

Is this ok?

make sure that the properties for the events match the properties from the "Jetpack Section Tracking Events" doc.

Tracked properties match properties from the "Jetpack Section Tracking Events" doc. I see a comment in the doc

We might want to consider tracking {action:"fix/ignore", cause: "threatsNotFixed/..."} state, as the server returns NOT_FIXED for all threats when the server credentials are missing.

I think it's a good suggestion. Do you plan to track it?

@malinajirka
Copy link
Copy Markdown
Contributor Author

Thanks @ashiagr!

I tested this flow and noticed two tracking event being logged:

Ahh, good point. I'll remove jetpack_scan_error_contact_tapped as it's not needed.

I think it's a good suggestion. Do you plan to track it?

I'll add it right away :). Since no-one commented on the gdoc I wasn't sure if I should proceed with it.

@malinajirka malinajirka requested a review from ashiagr February 4, 2021 10:08
# Conflicts:
#	libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java
#	libs/analytics/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java
Copy link
Copy Markdown
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

LGTM, 👍.

Feel free to merge it after resolving merge conflict.

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/jetpack/scan/ScanViewModel.kt
@malinajirka malinajirka merged commit 6e7b179 into develop Feb 4, 2021
@malinajirka malinajirka deleted the issue/13326-tracking branch February 4, 2021 14:45
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.

2 participants