From 5309a0dd854462d76b1f319322c618a2e2291cb8 Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Tue, 23 Jun 2015 12:46:58 +0200 Subject: [PATCH 1/3] Update Tracks to 1.0.4 --- WordPressAnalytics/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPressAnalytics/build.gradle b/WordPressAnalytics/build.gradle index b54d516872a5..5efad7160bab 100644 --- a/WordPressAnalytics/build.gradle +++ b/WordPressAnalytics/build.gradle @@ -16,7 +16,7 @@ repositories { } dependencies { - compile 'com.automattic:tracks:1.0.3' + compile 'com.automattic:tracks:1.0.4' compile 'com.mixpanel.android:mixpanel-android:4.3.0@aar' compile 'org.wordpress:utils:1.3.0' } From 4bca430108788d4880640efbed185ceb1ca5bb5d Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Tue, 28 Jul 2015 13:32:49 +0200 Subject: [PATCH 2/3] Bump analytics on the main ViewPager. Also fix other minor issues with analytics. --- .../wordpress/android/analytics/AnalyticsTracker.java | 2 ++ .../android/analytics/AnalyticsTrackerMixpanel.java | 10 ++++++++++ .../android/analytics/AnalyticsTrackerNosara.java | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java index 0762d51f4b66..6fdf39563194 100644 --- a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java +++ b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java @@ -67,6 +67,8 @@ public enum Stat { EDITOR_TAPPED_MORE, EDITOR_TAPPED_STRIKETHROUGH, EDITOR_TAPPED_UNDERLINE, + ME_ACCESSED, + MY_SITE_ACCESSED, NOTIFICATIONS_ACCESSED, NOTIFICATIONS_OPENED_NOTIFICATION_DETAILS, NOTIFICATION_REPLIED_TO, diff --git a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java index 5c29ad3857f1..627f14b7fbfe 100644 --- a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java +++ b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java @@ -654,6 +654,16 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat( instructions = AnalyticsTrackerMixpanelInstructionsForStat. mixpanelInstructionsForEventName("Settings - Forced Language Selection"); break; + case ME_ACCESSED: + instructions = AnalyticsTrackerMixpanelInstructionsForStat. + mixpanelInstructionsForEventName("Me Tab - Accessed"); + instructions.setSuperPropertyAndPeoplePropertyToIncrement("number_of_times_accessed_me_tab"); + break; + case MY_SITE_ACCESSED: + instructions = AnalyticsTrackerMixpanelInstructionsForStat. + mixpanelInstructionsForEventName("My Site - Accessed"); + instructions.setSuperPropertyAndPeoplePropertyToIncrement("number_of_times_accessed_my_site"); + break; default: instructions = null; break; diff --git a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java index 696ad55073e8..1a5fc4f4426c 100644 --- a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java +++ b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java @@ -314,6 +314,12 @@ public void track(AnalyticsTracker.Stat stat, Map properties) { case LOGIN_FAILED_TO_GUESS_XMLRPC: eventName = "login_failed_to_guess_xmlrpc"; break; + case ME_ACCESSED: + eventName = "me_tab_accessed"; + break; + case MY_SITE_ACCESSED: + eventName = "my_site_tab_accessed"; + break; default: eventName = null; break; From 88020dc08e491b6fbec05cef85e2a7ea2a8c7577 Mon Sep 17 00:00:00 2001 From: Danilo Ercoli Date: Tue, 28 Jul 2015 16:13:36 +0200 Subject: [PATCH 3/3] Rename OPENED_SETTINGS to OPENED_BLOG_SETTINGS --- .../java/org/wordpress/android/analytics/AnalyticsTracker.java | 2 +- .../wordpress/android/analytics/AnalyticsTrackerMixpanel.java | 3 +-- .../wordpress/android/analytics/AnalyticsTrackerNosara.java | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java index 6fdf39563194..ff4918b55bcd 100644 --- a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java +++ b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTracker.java @@ -84,7 +84,7 @@ public enum Stat { OPENED_VIEW_SITE, OPENED_VIEW_ADMIN, OPENED_MEDIA_LIBRARY, - OPENED_SETTINGS, + OPENED_BLOG_SETTINGS, CREATED_ACCOUNT, SHARED_ITEM, ADDED_SELF_HOSTED_SITE, diff --git a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java index 627f14b7fbfe..733624b41bb8 100644 --- a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java +++ b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerMixpanel.java @@ -17,7 +17,6 @@ import java.util.EnumMap; import java.util.Iterator; -import java.util.Locale; import java.util.Map; public class AnalyticsTrackerMixpanel implements AnalyticsTracker.Tracker { @@ -525,7 +524,7 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat( instructions = AnalyticsTrackerMixpanelInstructionsForStat. mixpanelInstructionsForEventName("Site Menu - Opened Media Library"); break; - case OPENED_SETTINGS: + case OPENED_BLOG_SETTINGS: instructions = AnalyticsTrackerMixpanelInstructionsForStat. mixpanelInstructionsForEventName("Site Menu - Opened Settings"); break; diff --git a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java index 1a5fc4f4426c..8e6b7f8d7abc 100644 --- a/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java +++ b/WordPressAnalytics/src/main/java/org/wordpress/android/analytics/AnalyticsTrackerNosara.java @@ -237,7 +237,7 @@ public void track(AnalyticsTracker.Stat stat, Map properties) { eventName = "site_menu_opened"; predefinedEventProperties.put("menu_item", "media_library"); break; - case OPENED_SETTINGS: + case OPENED_BLOG_SETTINGS: eventName = "site_menu_opened"; predefinedEventProperties.put("menu_item", "settings"); break;