-
-
Notifications
You must be signed in to change notification settings - Fork 45
Notification Analytics #3393
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
Notification Analytics #3393
Changes from all commits
8cee8ca
ee559c8
04997e8
3b44c72
83e086f
fb335b4
d16cee5
635c140
02e129d
b355600
2c60d02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,5 +57,6 @@ public class CCAnalyticsEvent { | |
| static final String PERSONAL_ID_CONTINUE_CLICKED = "personal_id_continue_clicked"; | ||
| static final String PERSONAL_ID_MESSAGE_SENT = "personal_id_message_sent"; | ||
| static final String PERSONAL_ID_LINKING = "personal_id_linking"; | ||
|
|
||
| static final String PERSONAL_ID_NOTIFICATION_RECEIVED = "personal_id_notification_received"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We'd discussed limiting the number of unique events that we send to analytics since there's a lifetime limit. Given that, I wonder if we want a single personalid_notification event with parameters to specify additional info? Retrieving the additional info from BigQuery doesn't add much difficulty, and then we can continue to reuse this event for any additional notification-related events that we want to log in the future.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice, although these values could be cleaned up now. |
||
| static final String PERSONAL_ID_NOTIFICATION_CLICKED = "personal_id_notification_clicked"; | ||
| } | ||
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.
Guard against null when menu item is not in the mapping.
If a menu item not present in
menuIdToAnalyticsParamis clicked (e.g.,android.R.id.homefrom the action bar),get()will returnnull, which is passed toreportOptionsMenuItemClick. This could cause issues since theitemLabelparameter is not marked@Nullable.Consider adding a null check:
@Override public boolean onOptionsItemSelected(MenuItem item) { - FirebaseAnalyticsUtil.reportOptionsMenuItemClick(this.getClass(), - menuIdToAnalyticsParam.get(item.getItemId())); + String analyticsParam = menuIdToAnalyticsParam.get(item.getItemId()); + if (analyticsParam != null) { + FirebaseAnalyticsUtil.reportOptionsMenuItemClick(this.getClass(), analyticsParam); + } if (item.getItemId() == R.id.action_bell) {📝 Committable suggestion
🤖 Prompt for AI Agents