Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -422,13 +422,13 @@ public static boolean isAztecEditorAvailable() {
// Visual Editor
public static void setVisualEditorEnabled(boolean visualEditorEnabled) {
setBoolean(DeletablePrefKey.VISUAL_EDITOR_ENABLED, visualEditorEnabled);
AnalyticsTracker.track(visualEditorEnabled ? Stat.EDITOR_TOGGLED_ON : Stat.EDITOR_TOGGLED_OFF);
AnalyticsTracker.track(visualEditorEnabled ? Stat.EDITOR_HYBRID_TOGGLED_ON : Stat.EDITOR_HYBRID_TOGGLED_OFF);
}

public static void setVisualEditorAvailable(boolean visualEditorAvailable) {
setBoolean(UndeletablePrefKey.VISUAL_EDITOR_AVAILABLE, visualEditorAvailable);
if (visualEditorAvailable) {
AnalyticsTracker.track(Stat.EDITOR_ENABLED_NEW_VERSION);
AnalyticsTracker.track(Stat.EDITOR_HYBRID_ENABLED);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ public enum Stat {
EDITOR_SAVED_DRAFT,
EDITOR_DISCARDED_CHANGES,
EDITOR_EDITED_IMAGE, // Visual editor only
EDITOR_ENABLED_NEW_VERSION, // Visual editor only
EDITOR_TOGGLED_OFF, // Visual editor only
EDITOR_TOGGLED_ON, // Visual editor only
EDITOR_HYBRID_ENABLED, // Visual editor only
EDITOR_HYBRID_TOGGLED_OFF, // Visual editor only
EDITOR_HYBRID_TOGGLED_ON, // Visual editor only
EDITOR_UPLOAD_MEDIA_FAILED, // Visual editor only
EDITOR_UPLOAD_MEDIA_RETRIED, // Visual editor only
EDITOR_TAPPED_BLOCKQUOTE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,20 +510,35 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat(Analytic
instructions.setSuperPropertyAndPeoplePropertyToIncrement("number_of_times_editor_edited_image");
instructions.setCurrentDateForPeopleProperty("last_time_edited_image");
break;
case EDITOR_ENABLED_NEW_VERSION:
case EDITOR_HYBRID_ENABLED:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Editor - Enabled New Version");
instructions.addSuperPropertyToFlag("enabled_new_editor");
mixpanelInstructionsForEventName("Editor - Enabled Hybrid Editor");
instructions.addSuperPropertyToFlag("enabled_hybrid_editor");
break;
case EDITOR_TOGGLED_ON:
case EDITOR_HYBRID_TOGGLED_ON:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Editor - Toggled New Editor On");
instructions.setPeoplePropertyToValue("enabled_new_editor", true);
mixpanelInstructionsForEventName("Editor - Toggled Hybrid Editor On");
instructions.setPeoplePropertyToValue("enabled_hybrid_editor", true);
break;
case EDITOR_TOGGLED_OFF:
case EDITOR_HYBRID_TOGGLED_OFF:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Editor - Toggled New Editor Off");
instructions.setPeoplePropertyToValue("enabled_new_editor", false);
mixpanelInstructionsForEventName("Editor - Toggled Hybrid Editor Off");
instructions.setPeoplePropertyToValue("enabled_hybrid_editor", false);
break;
case EDITOR_AZTEC_ENABLED:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Editor - Enabled Aztec Editor");
instructions.addSuperPropertyToFlag("enabled_aztec_editor");
break;
case EDITOR_AZTEC_TOGGLED_ON:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Editor - Toggled Aztec Editor On");
instructions.setPeoplePropertyToValue("enabled_aztec_editor", true);
break;
case EDITOR_AZTEC_TOGGLED_OFF:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Editor - Toggled Aztec Editor Off");
instructions.setPeoplePropertyToValue("enabled_aztec_editor", false);
break;
case EDITOR_UPLOAD_MEDIA_FAILED:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,12 +360,18 @@ public static String getEventNameForStat(AnalyticsTracker.Stat stat) {
return "editor_discarded_changes";
case EDITOR_EDITED_IMAGE:
return "editor_image_edited";
case EDITOR_ENABLED_NEW_VERSION:
return "editor_enabled_new_version";
case EDITOR_TOGGLED_OFF:
return "editor_toggled_off";
case EDITOR_TOGGLED_ON:
return "editor_toggled_on";
case EDITOR_HYBRID_ENABLED:
return "editor_hybrid_enabled";
case EDITOR_HYBRID_TOGGLED_OFF:
return "editor_hybrid_toggled_off";
case EDITOR_HYBRID_TOGGLED_ON:
return "editor_hybrid_toggled_on";
case EDITOR_AZTEC_ENABLED:
return "editor_aztec_enabled";
case EDITOR_AZTEC_TOGGLED_OFF:
return "editor_aztec_toggled_off";
case EDITOR_AZTEC_TOGGLED_ON:
return "editor_aztec_toggled_on";
case EDITOR_UPLOAD_MEDIA_FAILED:
return "editor_upload_media_failed";
case EDITOR_UPLOAD_MEDIA_RETRIED:
Expand Down