-
Notifications
You must be signed in to change notification settings - Fork 262
Conversation
// TODO: Telemetry | ||
|
||
let numberOfTrackersBlocked = getNumberOfLifetimeTrackersBlocked() | ||
let appStoreUrl = String(format: "https://itunes.apple.com/app/id%@", AppInfo.isKlar ? "1073435754" : "1055677337") |
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.
There has got to be a better way to do this.
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.
We will get you adjust links to track this install channel. Stay tuned.
@@ -244,6 +246,13 @@ class BrowserViewController: UIViewController { | |||
homeView.removeFromSuperview() | |||
} | |||
self.homeView = homeView | |||
|
|||
if shouldShowTrackerStatsShareButton() { |
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.
This is run after a user taps "Erase" so there is a chance they would not see it on launch but then see it after they erased a browsing session. Is that ok?
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.
A chance they wouldn't see it on launch? And then they would see it every time they 'Erase'?
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.
Ahh i miss understood! I thought the 10% rule was just to not show it all the time and annoy users. I will change it to bucket users into groups.
@@ -244,6 +246,13 @@ class BrowserViewController: UIViewController { | |||
homeView.removeFromSuperview() | |||
} | |||
self.homeView = homeView | |||
|
|||
if shouldShowTrackerStatsShareButton() { |
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.
A chance they wouldn't see it on launch? And then they would see it every time they 'Erase'?
|
||
// 10% chance we show the button | ||
// arc4random_uniform(10 returns an integer 0 through 9 (inclusive) | ||
return arc4random_uniform(10) == 0 |
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.
So the way I understand this, you are a flipping a 10% coin every time a user presses Erase, so that means that all users would eventually see the message? We need to only show it to maximum of 10% of users - so we have to put users in buckets and save that bucket across the install. This is something we do for onboarding too.
// TODO: Telemetry | ||
|
||
let numberOfTrackersBlocked = getNumberOfLifetimeTrackersBlocked() | ||
let appStoreUrl = String(format: "https://itunes.apple.com/app/id%@", AppInfo.isKlar ? "1073435754" : "1055677337") |
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.
We will get you adjust links to track this install channel. Stay tuned.
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.
The one last missing thing would be adding some telemetry around how many users are in the bucket and the share button. Other than that the code looks good :) Will defer UX to @lime124
@@ -747,6 +785,15 @@ extension BrowserViewController: WebControllerDelegate { | |||
func webController(_ controller: WebController, stateDidChange state: BrowserState) {} | |||
|
|||
func webController(_ controller: WebController, didUpdateTrackingProtectionStatus trackingStatus: TrackingProtectionStatus) { | |||
// Calculate the number of trackers blocked and add that to lifetime total | |||
if case .on(let info) = trackingStatus { | |||
if case .on(let oldInfo) = trackingProtectionStatus { |
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.
small nit: We could do this in one if statement
// Calculate the number of trackers blocked and add that to lifetime total | ||
if case .on(let info) = trackingStatus { | ||
if case .on(let oldInfo) = trackingProtectionStatus { | ||
let numberOfAdditionalTrackersBlocked = max(0, info.total - oldInfo.total) |
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.
This took me a minute to understand what/why we're doing it this way. I wonder if we named it something like differenceSinceLastUpdate
it would be more clear?
@joeyg thanks for the video! Can you move the message closer to the keyboard, make the text smaller, and add ‘Click here’ to the tell your friends message? I’ll look at the code soon. |
Hey guys! As always you are super fast @joeyg! I think there are a few usability concerns here that should be addressed. I made a quick mockup to illustrate what I'm thinking.
We definitely need to run the suggested text (what was on the notepad) by Brian and Cherry as well. Thanks as always! |
Thanks @lime124 ! I’ll make those changes and upload a new screenshot. |
For #4, we can get down to a single line with:
120 trackers blocked so far
(I don't think it's critical to mention Focus in the string.)
…On Fri, Feb 2, 2018 at 5:22 PM, Tiffanie Shakespeare < ***@***.***> wrote:
Hey guys! As always you are super fast @joeyg <https://github.com/joeyg>!
I think there are a few usability concerns here that should be addressed. I
made a quick mockup to illustrate what I'm thinking.
- 1. We should avoid having something tappable too close to the
keyboard, we don't want accidental hits when people are trying to tap. That
spacing is 24px in my mock
- 2. Having two blocks of same sized text makes it difficult to wade
through. We should remove the tagline to clean things up. This means SE's
will probably work now
- 3. Even though it says "click here" there isn't an obvious call to
action/place to tap. I separated out the action into a button so it's very
clear where people tap. The button is 36px high x 80px. But we want our tap
area to extend a bit beyond that so it meets min touch target guidelines.
- 4. I added in the word "total" because it isn't super clear what
this number represents. We could probably ditch the word "by" but I'll ping
@BrianNJones <https://github.com/briannjones> about that one.
- 5. I added in the TP shield so that it a) brings balance to the
screen with the share button but also does a bit of reinforcing of what a
tracker is. It connects that bit of UI people see in the URL bar with this
concept.
We definitely need to run the suggested text (what was on the notepad) by
Brian and Cherry as well. Thanks as always!
[image: screen shot 2018-02-02 at 2 50 19 pm]
<https://user-images.githubusercontent.com/287322/35758980-b664c55c-082b-11e8-8f65-94f317139417.png>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#859 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/Ad38lxxS6F6BVLf8CpC2CVoOPZwlxdF5ks5tQ5iqgaJpZM4R0188>
.
|
@lime124 here are some updated screenshots. |
looking awesome @joeyg ! |
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.
code looking ok so far, @boek is the approver. still needs integration with the share sheet, right?
Updated screencast http://recordit.co/xlmzogfW3Y |
@lime124, I recommend this for the suggested text: (236 characters, spaces inclusive) |
@joeyg please use this as the app store link: https://app.adjust.com/b8s7qo?campaign=shareblocked&creative=022018 also one more requirement - not only is this EN only, but it should be Focus only. So please don't show for Klar. |
@Sdaswani I'll make that change. Thanks. @BrianNJones, @lime124 Would you like this shared as just text? The app can share the URL separately instead of inline. Generally this results in a preview of the URL being rendered instead of just the URL. |
@joeyg the important thing is to fill out as much as you can, like the NYTimes does. |
@Sdaswani Share via twitter and iMessage |
Ugh @lime124 good point, I'm not sure what we can do as since we are using a Adjust link (which is a redirect) the content pre-fetch isn't nice. @joeyg can you use this link and see if it renders better: https://itunes.apple.com/app/apple-store/id1055677337?pt=373246&ct=ShareTracker&mt=8 |
@Sdaswani this is what it looks like with the itunes URL that you provided: |
@Sdaswani I think that issue you ran into is the last thing that needs to be looked at. I can try and fix that this evening. |
As usual, thanks @joeyg - we can't wait to ship this! |
@Sdaswani I think the update to the PR I pushed this evening should fix the overlay issue you were seeing. |
Thanks @joeyg I'll push a build to iTunes tonight! |
@joeyg we need one last change - otherwise @bbinto says let's ship this! In shouldShowTrackerStatsShareButton, if shouldShowTrackerStatsToUser, can you append a key value to the dictionary, like is done here: https://github.com/mozilla-mobile/firefox-ios/blob/master/Client/Telemetry/UnifiedTelemetry.swift#L35-L44 Perhaps: You can also then remove the recordEvent after you determine the true/false value of shouldShowTrackerStatsToUser Don't worry about this firing too much - we will pare those down when we run the search query. It's fine to have it for users who are true or false - that will allow us to put those folks into different buckets. |
@Sdaswani just to clarify. Instead of sending a shareStatsCoinFlip event we should include the value of the coin flip with every CorePing? |
@Sdaswani I made those changes. Not sure the best way to test core ping telemetry so let me know if there is a good way to test this. |
@@ -30,6 +30,7 @@ class TelemetryEventMethod { | |||
public static let share = "share" | |||
public static let customDomainRemoved = "removed" | |||
public static let customDomainReordered = "reordered" | |||
public static let shareStatsCoinFlip = "share_stats_coin_flip" |
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.
this can be removed now, right?
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.
good catch. will fix these
@@ -48,4 +49,6 @@ class TelemetryEventObject { | |||
public static let trackingProtectionToggle = "tracking_protection_toggle" | |||
public static let websiteLink = "website_link" | |||
public static let autofill = "autofill" | |||
public static let showStatsShareButton = "show_share_share_button" |
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.
and this too?
@joeyg we will test the telemetry, thanks! |
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.
We just need to unwrap that optional :)
Blockzilla/AppDelegate.swift
Outdated
var outputDict = inputDict // make a mutable copy | ||
|
||
let shouldShowTrackerStatsToUser = UserDefaults.standard.object(forKey: BrowserViewController.userDefaultsShareTrackerStatsKey) as! Bool? | ||
outputDict["showTrackerStatsShare"] = shouldShowTrackerStatsToUser |
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.
We'll want to make sure shouldShowTrackerStatsToUser
is a Boolean, not an Optional. (I don't think Telemetry unwraps things for us, just uses the description when serializing to JSON.
This could work
let shouldShowTrackerStatsToUser = (UserDefaults.standard.object(forKey: BrowserViewController.userDefaultsShareTrackerStatsKey) as? Bool) ?? false
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.
Would that report back as False even if the value is nil? Should we just not include the param if it is nil(meaning the coin flip hasn’t been done)
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.
You know what? We have a reference to BrowserViewController
. We could just do
outputDict["showTrackerStatsShare"] = browserViewController.shouldShowTrackerStatsShareButton()
I'm kinda okay with making that public for now since it will encourage us to clean it up if we decide to turn this on for all users.
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.
great! made that change.
@Sdaswani I wonder if we limit the experiment to just |
@boek by only doing en_us was hoping to avoid localization - any concerns there? |
* start on sharing of tracker stats * add bold font * adjust logic and add telemetry * adjust share button * update share stats ui * round the corners of the share button * Change share text and how the url is shared * change url * bump version to 4.0.3 * update share url * Fix overlay from showing up when returning from tracker stats share screen * change telemtry for tracker share button * change name to be more clear * remove unused statics * use BrowserViewController instance
@joeyg would you mind letting me know what key and value you've used in the core ping? I've tried looking for key "userDefaultsShareTrackerStatsKey" in the core ping but couldn't find anything? Or is that the value you'd set for the "experiments" key? |
@bbinto it should be
If working properly |
…ile/focus-ios#859) * start on sharing of tracker stats * add bold font * adjust logic and add telemetry * adjust share button * update share stats ui * round the corners of the share button * Change share text and how the url is shared * change url * bump version to 4.0.3 * update share url * Fix overlay from showing up when returning from tracker stats share screen * change telemtry for tracker share button * change name to be more clear * remove unused statics * use BrowserViewController instance
…ozilla-mobile/focus-ios#859) * start on sharing of tracker stats * add bold font * adjust logic and add telemetry * adjust share button * update share stats ui * round the corners of the share button * Change share text and how the url is shared * change url * bump version to 4.0.3 * update share url * Fix overlay from showing up when returning from tracker stats share screen * change telemtry for tracker share button * change name to be more clear * remove unused statics * use BrowserViewController instance
Fixes #858.
To do:
http://recordit.co/xlmzogfW3Y