[MBL-1147] Track push notifications #1943
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📲 What
Track push notifications by telling braze/appboy when they're opened.
Note: In order to do this smoothly,
Appboy.sharedInstance()
is moved out of the helper function we had it in. I've verified that the shared instance that exists in that helper is different from the one that exists in AppDelegate (but within each file, they're consistent). I'm not sure why that's the case, but I'd theorize it has something to do with different targets or the helper function being static or that it lives within a SEG class and is itself a SEG class. In any case, moving these lines of code out means thatAppboy.sharedInstance()
is consistent from when we add it to the configuration to when we need it for reporting push notifications.(In the original commit, I stored appboyHelper instead to make it consistent between the config and the push notification report, since I hadn't tried to investigate why they were different yet. This solution is much cleaner.)
🤔 Why
Direct opens for push notifications weren't being tracked; now they will be!
👀 See
Jira
✅ Acceptance criteria