Skip to content

Commit baa34d5

Browse files
committed
Add EDITOR_ADDED_VIDEO_VIA_LOCAL_LIBRARY and EDITOR_ADDED_VIDEO_VIA_WP_MEDIA_LIBRARY to Mixpanel and Nosara trackers
1 parent 158b3f7 commit baa34d5

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,20 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat(
422422
"number_of_times_added_photo_via_wp_media_library");
423423
instructions.setCurrentDateForPeopleProperty("last_time_added_photo_via_wp_media_library_to_post");
424424
break;
425+
case EDITOR_ADDED_VIDEO_VIA_LOCAL_LIBRARY:
426+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
427+
mixpanelInstructionsForEventName("Editor - Added Video via Local Library");
428+
instructions.
429+
setSuperPropertyAndPeoplePropertyToIncrement("number_of_times_added_video_via_local_library");
430+
instructions.setCurrentDateForPeopleProperty("last_time_added_video_via_local_library_to_post");
431+
break;
432+
case EDITOR_ADDED_VIDEO_VIA_WP_MEDIA_LIBRARY:
433+
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
434+
mixpanelInstructionsForEventName("Editor - Added Video via WP Media Library");
435+
instructions.setSuperPropertyAndPeoplePropertyToIncrement(
436+
"number_of_times_added_video_via_wp_media_library");
437+
instructions.setCurrentDateForPeopleProperty("last_time_added_video_via_wp_media_library_to_post");
438+
break;
425439
case EDITOR_PUBLISHED_POST:
426440
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
427441
mixpanelInstructionsForEventName("Editor - Published Post");

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,14 @@ public void track(AnalyticsTracker.Stat stat, Map<String, ?> properties) {
131131
eventName = "editor_photo_added";
132132
predefinedEventProperties.put("via", "media_library");
133133
break;
134+
case EDITOR_ADDED_VIDEO_VIA_LOCAL_LIBRARY:
135+
eventName = "editor_video_added";
136+
predefinedEventProperties.put("via", "local_library");
137+
break;
138+
case EDITOR_ADDED_VIDEO_VIA_WP_MEDIA_LIBRARY:
139+
eventName = "editor_video_added";
140+
predefinedEventProperties.put("via", "media_library");
141+
break;
134142
case EDITOR_PUBLISHED_POST:
135143
eventName = "editor_post_published";
136144
break;

0 commit comments

Comments
 (0)