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

IA Reader add dedicated tracking for time spend in sub-filtered streams. #11325

Merged
merged 15 commits into from
Feb 20, 2020

Conversation

develric
Copy link
Contributor

Fixes #11324

This is an addition to the already merged PR #10956 and adds the time_in_subfiltered_list property to the already available application_closed event.

This is a specific event of the IA revised reader (zalpha flavor) and reports the seconds spent in the main reader FOLLOWING tab when a SITE or TAG is selected in the sub-filter.

To test

  • Unit tests must pass
  • Be sure you have tracking turned on (Me > App Settings > Privacy Settings > Collect information must be active)
  • you can observe logcat while making following steps, filtering with this (TRACK READER|Tracked: application_closed) and Regex active
  • Open the zalpha flavor of the app
  • Go to Following and select a subfilter Site/Tag (stay there for something like 5 seconds);
  • Move to a different tab (like Discover) and stay there for other 5 seconds
  • Open a post from Discover list and stay there for other 5 seconds
  • Come back to Following and wait 5 seconds
  • Clear the filter and wait 5 seconds
  • Put the app in background
  • Check that you get some message like
    Tracked: application_closed, Properties: {"time_in_main_reader":20,"last_visible_screen":"Reader","time_in_reader_paged_post":5,"time_in_app":34,"time_in_subfiltered_list":10,"time_in_reader_filtered_list":0}
    and the reported timings are somewhat similar to the expected
  • Smoke test the app selecting other features different from reader and check the reader timing does not accumulate

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.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Feb 15, 2020

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

@renanferrari renanferrari self-assigned this Feb 18, 2020
Copy link
Member

@renanferrari renanferrari left a comment

Choose a reason for hiding this comment

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

Thank you @develric! I've tested the app and everything worked as expected.

On the code side, I really liked that you were able to move the tracking logic to the ViewModel and even have some tests for it. Great job there! 👍

I just left some comments on minor improvements you may want to consider.

# Conflicts:
#	WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderPostListFragment.java
#	WordPress/src/main/java/org/wordpress/android/ui/reader/viewmodels/ReaderPostListViewModel.kt
#	WordPress/src/test/java/org/wordpress/android/viewmodel/reader/ReaderPostListViewModelTest.kt
@develric
Copy link
Contributor Author

Hi @renanferrari, thanks for the review and suggestions 😊. I should have addressed your comments. I also merged back develop and resolve some conflicts so I would appreciate if you could make a quick re-test run on this also from your side. Thanks in advance 🙇‍♂️!

Copy link
Member

@renanferrari renanferrari left a comment

Choose a reason for hiding this comment

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

Hi @develric! I have tested the app again and everything seems to be working as expected. I have also reviewed the changes you made to the code and they look good 👍

However, it looks like the connected tests started failing after you merged the develop branch. I rerun the workflow a couple of times, but no deal. I'm still looking into it to see if I can figure out what's happening.

Edit: The failing tests don't seem to be related to this PR. LGTM :shipit:

@develric develric merged commit dce8e7d into develop Feb 20, 2020
@develric develric deleted the issue/ia-reader-add-dedicated-tracking branch February 20, 2020 09:18
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.

Adding IA specific time spent in reader track.
3 participants