Skip to content

Add analytics event for tracking Jetpack full screen overlay events #17512

Merged
AjeshRPai merged 13 commits intotrunkfrom
issue/17333-add-analytics-events
Nov 24, 2022
Merged

Add analytics event for tracking Jetpack full screen overlay events #17512
AjeshRPai merged 13 commits intotrunkfrom
issue/17333-add-analytics-events

Conversation

@AjeshRPai
Copy link
Copy Markdown
Contributor

@AjeshRPai AjeshRPai commented Nov 22, 2022

Part of #17333

Changes

This PR adds the logic for tracking the events related to the FullScreen overlay shown on Stats/Reader and Notifications.

Review instructions

Approval from one reviewer is sufficient for merging this PR.

To test:

Pre- Requisites

  • Launch WP app -> Go to my site -> App settings -> Debug settings -> Enable jp_removal_one flag
  • Navigate to Me > App Settings > Privacy Setting > and enable Collect Information

Test 1 - Stats - Close overlay with Continue to feature button

  • Launch the app -> Go to my site -> Click on stats
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"stats"}
  • Click at Continue to stats button
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_dismissed, Properties: {"phase":"one","source":"stats","dismissal_type":"continue"}

Test 2 - Stats - Close overlay with X button

  • Launch the app -> Go to my site -> Click on stats
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"stats"}
  • Click at the Close(x) button on the top left corner
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_dismissed, Properties: {"phase":"one","source":"stats","dismissal_type":"close"}

Test 3 - Stats - Try jetpack app flow

  • Launch the app -> Go to my site -> Click on stats
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"stats"}
  • Click at Try the new jetpack app button
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_button_tapped, Properties: {"phase":"one","source":"stats"}

Test 4 - Notifications - Close overlay with Continue to feature button

  • Launch the app -> Go to my site -> Click on Notifications
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"notifications"}
  • Click at Continue to Notifications button
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_dismissed, Properties: {"phase":"one","source":"notifications","dismissal_type":"continue"}

Test 5 - Notifications - Close overlay with X button

  • Launch the app -> Go to my site -> Click on Notifications
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"notifications"}
  • Click at the Close(x) button on the top left corner
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_dismissed, Properties: {"phase":"one","source":"notifications","dismissal_type":"close"}

Test 6 - Notifications - Try jetpack app flow

  • Launch the app -> Go to my site -> Click on Notifications
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"notifications"}
  • Click at Try the new jetpack app button
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_button_tapped, Properties: {"phase":"one","source":"notifications"}

Test 7 - Reader - Close overlay with Continue to feature button

  • Launch the app -> Go to my site -> Click on Reader tab
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"reader"}
  • Click at Continue to Reader button
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_dismissed, Properties: {"phase":"one","source":"reader","dismissal_type":"continue"}

Test 8 - Reader - Close overlay with X button

  • Launch the app -> Go to my site -> Click on Reader tab
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"reader"}
  • Click at the Close(x) button on the top left corner
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_dismissed, Properties: {"phase":"one","source":"reader","dismissal_type":"close"}

Test 9 - Reader - Try jetpack app flow

  • Launch the app -> Go to my site -> Click on Reader tab
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_displayed, Properties: {"phase":"one","source":"reader"}
  • Click at Try the new jetpack app button
  • ✅ Verify that the log contains 🔵 Tracked: remove_feature_overlay_button_tapped, Properties: {"phase":"one","source":"reader"}

⚠️ Merge Instructions

Regression Notes

  1. Potential unintended areas of impact
    Analytics events are not tracked properly

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

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

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.

@AjeshRPai AjeshRPai self-assigned this Nov 22, 2022
@AjeshRPai AjeshRPai added this to the 21.3 milestone Nov 22, 2022
@AjeshRPai AjeshRPai changed the base branch from trunk to issue/17333-jetpack-focus-fullscreen-overlay-landscape-mode November 22, 2022 21:51
@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 22, 2022

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17512-aa5220c.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commitaa5220c
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Copy Markdown
Contributor

wpmobilebot commented Nov 22, 2022

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17512-aa5220c.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commitaa5220c
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

# Conflicts:
#	WordPress/src/main/res/values/dimens.xml
#	libs/analytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java
#	libs/analytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java
@AjeshRPai AjeshRPai changed the base branch from issue/17333-jetpack-focus-fullscreen-overlay-landscape-mode to trunk November 23, 2022 13:06
@AjeshRPai AjeshRPai changed the base branch from trunk to issue/17333-jetpack-focus-fullscreen-overlay-landscape-mode November 23, 2022 13:07
Base automatically changed from issue/17333-jetpack-focus-fullscreen-overlay-landscape-mode to trunk November 23, 2022 13:49
@AjeshRPai AjeshRPai requested a review from enejb November 23, 2022 14:39
@enejb
Copy link
Copy Markdown
Contributor

enejb commented Nov 23, 2022

In my testing things mostly worked as expected.

  1. I am not sure if this is just for this build but I was assuming that we should see the notice only once if you dismissed the notice then we should see the in a couple of days or after a week. (Is that still the case?)
    The current way definitely make testing more easier.
  2. I am not sure that this is a bug but when I click on the continue button on Reader and Notification screens the overlay stays but this is not the case for stats. I would assume that the overlay disappears.
  3. I didn't see any crashes.
  4. I was able to see all the events in tracks as expected 🥳 .

If you think that 1 and 2 worked as expected than I think we can merge this PR :shipit:

Copy link
Copy Markdown
Contributor

@enejb enejb left a comment

Choose a reason for hiding this comment

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

If you think that 1 & 2 in my feedback is working as expected then I think we should ship this PR.

@AjeshRPai
Copy link
Copy Markdown
Contributor Author

Hey @enejb ,

Thanks for the review. For making the testing easier, I disabled overlay frequency logic. Because of this, the overlay is shown every time you try to access the Stats/Reader/Notifications. The overlay is shown when the view loads, the life cycle of the views in Reader/Notifications is different from that in Stats, hence the overlay is shown every time in Reader and Notifications.

I have reverted - Overlay shown without frequency logic with this commit - aa5220c

@AjeshRPai AjeshRPai merged commit 32fb303 into trunk Nov 24, 2022
@AjeshRPai AjeshRPai deleted the issue/17333-add-analytics-events branch November 24, 2022 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants