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

User Profile: track events #16327

Merged
merged 6 commits into from
Apr 19, 2021
Merged

Conversation

ScoutHarris
Copy link
Contributor

@ScoutHarris ScoutHarris commented Apr 16, 2021

Ref: #15662

New Events

Two new events are added to track:

  • When the User Profile is shown.
  • When a site is viewed from the User Profile.

User profile shown:

  • Tracked: user_profile_sheet_shown <source: like_notification_list>.
  • The source property is there so that in the future if the User Profile is shown from somewhere else it can be specified.

Site viewed:

  • Tracked: user_profile_sheet_site_shown <>
  • I didn't think any properties where necessary here, but I can add something if we like.

Changed Event

I added a source property to the reader_blog_previewed event so that we know it was shown from the User Profile. Examples:

  • From user profile: Tracked: reader_blog_previewed <site: Site Name, source: user_profile, subscription_count: 99>
  • From a reader card: Tracked: reader_blog_previewed <site: Site Name, source: reader, subscription_count: 99>

cc @develric


To test:

  • Enable the newLikeNotifications feature.
  • Go to Notifications > Likes and tap a notification.
  • Tap a user.
    • Verify Tracked: user_profile_sheet_shown <source: like_notification_list> is logged.
  • Tap the site.
    • Verify Tracked: user_profile_sheet_site_shown <> is logged.
    • Verify Tracked: reader_blog_previewed <site: Site Name, source: user_profile, subscription_count: 99> is logged if the site is internal. (You'll have to change the siteID here.)

Regression Notes

  1. Potential unintended areas of impact
    N/A. Just adding some tracks.

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

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

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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 Apr 16, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@ScoutHarris ScoutHarris requested a review from aerych April 16, 2021 19:40
@ScoutHarris ScoutHarris marked this pull request as ready for review April 16, 2021 19:40
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Apr 16, 2021

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

Copy link
Member

@aerych aerych left a comment

Choose a reason for hiding this comment

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

Hola @ScoutHarris 👋
Changes look good. Tested and confirmed the events were dispatched.
I had one question about the name. (cc @develric)
Other than that :shipit:

case .userProfileShown:
return "user_profile_shown"
case .userProfileSiteShown:
return "user_profile_site_shown"
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to call these liker_profile_* rather than user_profile_*? I'm thinking that someone looking at tracks might at a glance assume that user_profile referred to the logged in user's own profile.

Copy link
Contributor Author

@ScoutHarris ScoutHarris Apr 19, 2021

Choose a reason for hiding this comment

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

Well, per the User Profile designs (pbArwn-K3-p2), this sheet could be displayed from somewhere other than the liker. So I made it specific to the sheet, not the presenter. That's why I added a source to user_profile_shown. I could add a source to user_profile_site_shown if we like.

Or, I could change them to user_profile_sheet_* if that's better. Which it may be...

Copy link
Member

Choose a reason for hiding this comment

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

So I made it specific to the sheet, not the presenter

Oh I see. Makes sense.

I could change them to user_profile_sheet_*

I think I'm a fan :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can do. Thanks!

@ScoutHarris
Copy link
Contributor Author

ScoutHarris commented Apr 19, 2021

Hey @aerych @develric . I updated the event names and the PR description. Thanks!

@ScoutHarris ScoutHarris enabled auto-merge April 19, 2021 22:09
@ScoutHarris ScoutHarris merged commit a0236c5 into develop Apr 19, 2021
@ScoutHarris ScoutHarris deleted the feature/15662-like_notif_tracks branch April 19, 2021 22:35
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