-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Reader] Improve analytics tracking for subscribed sites and followed tags #20388
[Reader] Improve analytics tracking for subscribed sites and followed tags #20388
Conversation
…r due sites list changed or time elapsed since last bump
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
…t and ensure the view model is testable.
Thanks for the PR, @daniloercoli ! It's working as expected except for a scenario where the event is tracked every time a pull-to-refresh is performed. 1 - I was already subscribed to blog A and opened the Reader in the app;
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #20388 +/- ##
==========================================
- Coverage 40.15% 40.15% -0.01%
==========================================
Files 1476 1476
Lines 68275 68301 +26
Branches 11329 11336 +7
==========================================
+ Hits 27417 27423 +6
- Misses 38349 38366 +17
- Partials 2509 2512 +3 ☔ View full report in Codecov by Sentry. |
Hey @RenanLukas - I've tried with the steps listed above but i'm not able to reproduce the problem. On my test account I see the correct total number of subscribed sites bumped to analytics, and PTR doesn't trigger additional analytics call.
|
@daniloercoli thanks for having a look. I've tried reproducing it again, but this time I couldn't. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, @daniloercoli ! It's working as expected and code LGTM.
I've left a couple of nitpick comments, but feel free to merge it without addressing them since they're not really important.
|
||
if (shouldBumpAnalytics) { | ||
readerTracker.trackFollowedTagsCount(event.totalTags) | ||
appPrefsWrapper.readerAnalyticsCountTagsTimestamp = DateProvider().getCurrentDate().time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Nitpick/optional: maybe we can use now
defined in line 226
instead of getting current date again?
|
||
if (shouldBumpAnalytics) { | ||
readerTracker.trackSubscribedSitesCount(event.totalSubscriptions) | ||
AppPrefs.setReaderAnalyticsCountSitesTimestamp(DateProvider().getCurrentDate().time) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Same nitpick/optional about using now
defined in line 240
instead of getting current date again.
…te again with DateProvider.
Quality Gate passedIssues Measures |
Improves the fix for #19836
To Test:
To check analytics you can use the Track Live view tool, use logcat and filter by Reader events, or set few breakpoints in the Reader Tracker.
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist: