Closed Bug 1368237 Opened 7 years ago Closed 7 years ago

Disable LeanPlumIntegration while in private browsing

Categories

(Firefox for iOS :: Browser, defect, P1)

Other
iOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
fxios 8.0+ ---

People

(Reporter: jhugman, Assigned: bmunar, Mentored)

References

Details

(Whiteboard: [mma] [MobileCore])

Attachments

(1 file)

55 bytes, text/x-github-pull-request
sleroux
: review+
st3fan
: review+
Details | Review
Bug 1352568 landed the initial phases of LeanPlum integration. This bug is to toggle enabling and disabling of LeanPlum while the user is in private browsing, even if they have opted in for LeanPlum analytics. PrivateBrowsing has a few entry and exit points, including but not exclusively: * private browsing mask in the tab tray controller * new private tab in today widget * spotlight * deeplinking (so other apps can open firefox in pbm). The events for: * savedLoginAndPassword, * saveImage, * openMailToLink, * interactWithURLBar, * savedBookmark, * openedBookmark are all fired while in private browsing.
* contextual menu on link long-press
Severity: normal → blocker
Priority: -- → P1
Assignee: nobody → bmunar
Whiteboard: [mma]
As a simplifying implementation, you can just shut off all Leanplum events when the user is in private mode. Jean has said she is basically in the dark with the events listed so no problem just shutting them all off.
Blocks: 1351446
I think the simplest thing that could possibly work: Add a isPrivate flag to each track call. func track(_ isPrivate: Bool) { guard !isPrivate else { return } … } Alternatively, calling LeanPlumIntegration.sharedInstance.setEnabled(!isPrivate) whenever viewWillAppear on a tab, and LeanPlumIntegration.sharedInstance.setEnabled(true) on viewDidDisappear may also be a relatively straightforward approach.
Yes, I was going to recommend the first implementation.
Attached file PR
Attachment #8874893 - Flags: review?(sleroux)
Bryan, why does this patch need a persistent setting in the Preferences?
Flags: needinfo?(bmunar)
That was an experiment branch to test what was the best possible way to keep track of the private state; we're getting closer to a finished product
Flags: needinfo?(bmunar)
Blocks: 1371031
Attachment #8874893 - Flags: review?(sleroux) → review+
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Whiteboard: [mma] → [mma] [MobileCore][needsuplift]
Attachment #8874893 - Flags: review?(sarentz) → review+
Whiteboard: [mma] [MobileCore][needsuplift] → [mma] [MobileCore]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: