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

Adds tracking for all of the site settings areas #17545

Merged
merged 32 commits into from
Nov 24, 2021

Conversation

emilylaguna
Copy link
Contributor

@emilylaguna emilylaguna commented Nov 23, 2021

Project: #17503

⚠️ Depends on: #17539
View only this PRs changes here

Description

Adds tracking for every option in Site Settings and its encompassing settings

To test:

This affects every item on Site Settings that did not already have tracks

  1. Launch the app
  2. Tap on the My Site tab
  3. Tap on Site Settings
  4. Go through each setting on the main view, and the sub views and verify you see for each of the settings changed:
    • 🔵 Tracked: settings_did_change <field_name: FIELD_NAME, page: PAGE_NAME>

Note: Areas with existing tracks were not changed, and tracking was not added to those areas

Regression Notes

  1. Potential unintended areas of impact
    None, adding tracking.

  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)
    None.

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.

emilylaguna added 29 commits November 23, 2021 11:41
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Nov 23, 2021

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

@emilylaguna emilylaguna added this to the 18.8 milestone Nov 23, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Nov 23, 2021

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

Copy link
Contributor

@momo-ozawa momo-ozawa left a comment

Choose a reason for hiding this comment

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

@emilylaguna I didn't see any tracking for the Privacy and Language settings under Site Settings
Screen Shot 2021-11-24 at 11 00 27

Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

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

Hello! As Momo mentioned, I also don't see tracking for Privacy or Language.

Under Discussion, the events for Sending and Receiving pingbacks seem to be reversed (toggling sending pingbacks fires the 'receive' event and vice versa).

I also added a code level comment as I feel most of these tracking calls should use constant values for the events.

@@ -268,6 +277,7 @@ open class DiscussionSettingsViewController: UITableViewController {
}

self?.settings.commentsThreading = newThreadingDepth
WPAnalytics.trackSettingsChange("site_settings_discussion", fieldName: "comments_threading", value: selected as Any)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think most of these settings keys should be stored as constants somewhere (and likely field names), as the same literals are reproduced in many places and a typo could mean we end up tracking the wrong thing. This comment applies to basically every trackSettingsChange call 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can see this point, but all of them are stored as private constants in BlogServiceRemoteREST and it feels like overkill to expose these constants, or duplicate them in a public fashion.

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, I guess I mean if nothing else we could have a constant in DiscussionSettingsViewController for let tracksDiscussionSettingsKey = "site_settings_discussion" and so forth?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I refactored the tracking a bit more on that view, added a constant, and moved all of the tracking to a helper func.

@emilylaguna
Copy link
Contributor Author

@emilylaguna I didn't see any tracking for the Privacy and Language settings under Site Settings Screen Shot 2021-11-24 at 11 00 27

Oops, my sites didn't have this appear. Fixed now, and added tracking for some other options as well.

Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

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

:shipit:

@emilylaguna emilylaguna merged commit 5d2a227 into develop Nov 24, 2021
@emilylaguna emilylaguna deleted the issue/17503-add-site-settings-tracking branch November 24, 2021 20:57
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.

3 participants