Skip to content

Commit 66fa906

Browse files
committed
Adds new analytics events for notifications.
1 parent c169601 commit 66fa906

File tree

3 files changed

+63
-0
lines changed

3 files changed

+63
-0
lines changed

WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ public enum Stat {
103103
PUSH_AUTHENTICATION_FAILED,
104104
PUSH_AUTHENTICATION_IGNORED,
105105
SETTINGS_LANGUAGE_SELECTION_FORCED,
106+
NOTIFICATION_SETTINGS_LIST_OPENED,
107+
NOTIFICATION_SETTINGS_STREAMS_OPENED,
108+
NOTIFICATION_SETTINGS_DETAILS_OPENED,
109+
NOTIFICATION_SETTINGS_UPDATED,
106110
}
107111

108112
public interface Tracker {

WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,42 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat(
650650
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
651651
mixpanelInstructionsForEventName("Login - Failed To Guess XMLRPC");
652652
break;
653+
case PUSH_AUTHENTICATION_APPROVED:
654+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
655+
mixpanelInstructionsForEventName("Push Authentication - Approved");
656+
break;
657+
case PUSH_AUTHENTICATION_EXPIRED:
658+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
659+
mixpanelInstructionsForEventName("Push Authentication - Expired");
660+
break;
661+
case PUSH_AUTHENTICATION_FAILED:
662+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
663+
mixpanelInstructionsForEventName("Push Authentication - Failed");
664+
break;
665+
case PUSH_AUTHENTICATION_IGNORED:
666+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
667+
mixpanelInstructionsForEventName("Push Authentication - Ignored");
668+
break;
653669
case SETTINGS_LANGUAGE_SELECTION_FORCED:
654670
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
655671
mixpanelInstructionsForEventName("Settings - Forced Language Selection");
656672
break;
673+
case NOTIFICATION_SETTINGS_LIST_OPENED:
674+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
675+
mixpanelInstructionsForEventName("Notification Settings - Accessed List");
676+
break;
677+
case NOTIFICATION_SETTINGS_STREAMS_OPENED:
678+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
679+
mixpanelInstructionsForEventName("Notification Settings - Accessed Stream");
680+
break;
681+
case NOTIFICATION_SETTINGS_DETAILS_OPENED:
682+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
683+
mixpanelInstructionsForEventName("Notification Settings - Accessed Details");
684+
break;
685+
case NOTIFICATION_SETTINGS_UPDATED:
686+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
687+
mixpanelInstructionsForEventName("Notification Settings - Updated");
688+
break;
657689
default:
658690
instructions = null;
659691
break;

WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,33 @@ public void track(AnalyticsTracker.Stat stat, Map<String, ?> properties) {
320320
case LOGIN_FAILED_TO_GUESS_XMLRPC:
321321
eventName = "login_failed_to_guess_xmlrpc";
322322
break;
323+
case PUSH_AUTHENTICATION_APPROVED:
324+
eventName = "push_authentication_approved";
325+
break;
326+
case PUSH_AUTHENTICATION_EXPIRED:
327+
eventName = "push_authentication_expired";
328+
break;
329+
case PUSH_AUTHENTICATION_FAILED:
330+
eventName = "push_authentication_failed";
331+
break;
332+
case PUSH_AUTHENTICATION_IGNORED:
333+
eventName = "push_authentication_ignored";
334+
break;
335+
case SETTINGS_LANGUAGE_SELECTION_FORCED:
336+
eventName = "settings_language_selection_forced";
337+
break;
338+
case NOTIFICATION_SETTINGS_LIST_OPENED:
339+
eventName = "notification_settings_list_opened";
340+
break;
341+
case NOTIFICATION_SETTINGS_STREAMS_OPENED:
342+
eventName = "notification_settings_streams_opened";
343+
break;
344+
case NOTIFICATION_SETTINGS_DETAILS_OPENED:
345+
eventName = "notification_settings_details_opened";
346+
break;
347+
case NOTIFICATION_SETTINGS_UPDATED:
348+
eventName = "notification_settings_updated";
349+
break;
323350
default:
324351
eventName = null;
325352
break;

0 commit comments

Comments
 (0)