Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

stronger enforcement of dev opt-out setup #1516

Closed

Description

@incanus

We should take a stronger stance on making sure devs:

  • Provide users with a way to opt-out, and know that they should.
  • Collect metrics by default.
  • Know about the Settings.bundle option.

In working on metrics testing for #1491, I couldn't figure out why my metrics weren't behaving properly. It turns out my test app (test/ios/ios-tests.xcodeproj) didn't implement a Settings.bundle and was not collecting any metrics.

We should probably take a stronger approach, such as:

  • Asserting that a Settings.bundle exists at first run instead of just logging about it.
  • Allowing for a class method (e.g. [MGLMapboxEvents setShowsOptOutInApp:YES]) which a dev has to implement in their code to work around the above.

@mapbox/mobiledata @1ec5 @gundersen

Activity

  1. added
    iOS
    telemetry
    on May 12, 2015
  2. added this to the iOS Beta 1 milestone on May 12, 2015
  3. friedbunny commented on May 12, 2015

    @friedbunny
    Contributor

    The ℹ️ button will be a good place to always offer the opt-out, once that becomes more a custom view.

  4. incanus commented on May 12, 2015

    @incanus
    ContributorAuthor

    That only gets ahead of metrics collection once a map view has been shown, though.

  5. added a commit that references this issue on May 12, 2015
  6. gundersen commented on May 12, 2015

    @gundersen

    stronger stance on making sure devs:
    provide users with a way to opt-out

    Great point @incanus. We should make an awesome page on this, maybe even put a section on the new /mobile. Other mapping apps, especially Apple, have it so buried on how to opt out. We really should push opting out as a feature; something that is great for anyone that wants super low battery usage or just folks that don't like the idea of anyone collecting their data.

  7. 1ec5 commented on May 12, 2015

    @1ec5
    Contributor

    It turns out my test app (test/ios/ios-tests.xcodeproj) didn't implement a Settings.bundle and was not collecting any metrics.

    I fixed this in e839c2a for #1491. In that PR, the default works even if you don’t provide an opt-out. The issue was that -[NSUserDefaults registerDefaults:] was being called in -init instead of +initialize.

  8. added a commit that references this issue on May 12, 2015
  9. bleege commented on May 12, 2015

    @bleege
    Contributor

    Added explicit checks for End User Opt Out ability to be implemented by the developer in 48e21ae. This can done via 2 ways:

    1. Set [MGLAccountManager setShowsOptOutInApp:YES] in AppDelegate
    2. Check for existence of Settings.bundle file via NSAssert that fails program if not satisfied

    This code is based off the latest ios-b1 branch and is available in the 1516-opt-out-checking branch.

  10. bleege commented on May 12, 2015

    @bleege
    Contributor

    PR #1520 was erroneously setup vs the master branch instead of today's new ios-beta1 branch. The correct PR is now #1521. Thanks @jfirebaugh for catching this!

  11. incanus commented on May 12, 2015

    @incanus
    ContributorAuthor

    If we dev off of ios-b1, things should merge cleanly later, but if we commit b1-critical stuff to master, then cherry pick them over to ios-b1, they definitely will.

  12. friedbunny commented on May 12, 2015

    @friedbunny
    Contributor

    That only gets ahead of metrics collection once a map view has been shown, though.

    Hrm, I hadn't considered never-sending-metrics as a problem Mapbox was addressing. Theoretically, a user could download a MBGL-using app, open up Settings.app, turn off metrics, and then launch the app, never sending metrics data in.

    But it seems like, practically speaking, unless there's an opt-in alert prompt (which isn't on the table and would be a terrible UX/business decision), virtually every user will have some metrics collected before they're able to opt out. It also seems to me that most users likely won't ever be aware there is something to opt out of, if a Settings.app switch is enough.

  13. 1ec5 commented on May 12, 2015

    @1ec5
    Contributor

    The ℹ️ button will be a good place to always offer the opt-out, once that becomes more a custom view.

    Filed as #1519.

  14. bleege commented on May 12, 2015

    @bleege
    Contributor

    Re-switched PRs so that #1520 is now the primary as it has the correct flow of dev_branch --> master --> ios-b1.

  15. added a commit that references this issue on May 12, 2015
  16. bleege commented on May 12, 2015

    @bleege
    Contributor

    Just implemented the fixes that @1ec5 suggested in his code review from last night. The technical core of this issue has now been implemented and tested. The ℹ️ issue is tracked elsewhere, so once Travis approves we should be good to merge this into master and then cherrypick back to ios-b1 if we're feeling good about things.

  17. bleege commented on May 12, 2015

    @bleege
    Contributor

    Travis just approved and I merged #1520 into master. It's ready to be merged into ios-b1 should we choose. I'll leave this issue open to remind us to think about this later today.

  18. added a commit that references this issue on May 12, 2015
  19. 1ec5 commented on May 12, 2015

    @1ec5
    Contributor

    If we take these changes for beta 1, we should update the wiki and mapbox/mapbox-gl-ios to point out the extra step when implementing the opt-out in-app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    iOStelemetry

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions