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 @@ -120,7 +120,7 @@ public static void viewCurrentBlogThemes(Context context) {
public static void viewCurrentBlogPeople(Context context) {
Intent intent = new Intent(context, PeopleManagementActivity.class);
slideInFromRight(context, intent);
// TODO: add -> AnalyticsTracker.track(AnalyticsTracker.Stat.OPENED_PEOPLE_MANAGEMENT);
AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.OPENED_PEOPLE_MANAGEMENT);
}

public static void viewBlogSettingsForResult(Activity activity, Blog blog) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@

import org.wordpress.android.R;
import org.wordpress.android.WordPress;
import org.wordpress.android.analytics.AnalyticsTracker;
import org.wordpress.android.datasets.PeopleTable;
import org.wordpress.android.models.Blog;
import org.wordpress.android.models.Person;
import org.wordpress.android.ui.ActivityLauncher;
import org.wordpress.android.ui.people.utils.PeopleUtils;
import org.wordpress.android.util.AnalyticsUtils;
import org.wordpress.android.util.ToastUtils;

import java.util.List;
Expand Down Expand Up @@ -116,6 +118,7 @@ public void onPersonSelected(Person person) {
personDetailFragment.setPersonDetails(personID, localTableBlogID);
}
if (!personDetailFragment.isAdded()) {
AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.OPENED_PERSON);
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.add(R.id.fragment_container, personDetailFragment, KEY_PERSON_DETAIL_FRAGMENT);
fragmentTransaction.addToBackStack(null);
Expand Down Expand Up @@ -143,6 +146,7 @@ public void onRoleChanged(long personID, int localTableBlogId, String newRole) {
new PeopleUtils.UpdateUserCallback() {
@Override
public void onSuccess(Person person) {
AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.PERSON_UPDATED);
PeopleTable.save(person);
refreshOnScreenFragmentDetails();
}
Expand Down Expand Up @@ -190,6 +194,7 @@ private void removeSelectedPerson() {
new PeopleUtils.RemoveUserCallback() {
@Override
public void onSuccess(long personID, int localTableBlogId) {
AnalyticsUtils.trackWithCurrentBlogDetails(AnalyticsTracker.Stat.PERSON_REMOVED);
// remove the person from db, navigate back to list fragment and refresh it
Person person = PeopleTable.getPerson(personID, localTableBlogId);
String text;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ public enum Stat {
OPENED_ACCOUNT_SETTINGS,
OPENED_APP_SETTINGS,
OPENED_MY_PROFILE,
OPENED_PEOPLE_MANAGEMENT,
OPENED_PERSON,
CREATED_ACCOUNT,
ACCOUNT_LOGOUT,
SHARED_ITEM,
Expand All @@ -134,6 +136,8 @@ public enum Stat {
LOGIN_INSERTED_INVALID_URL,
LOGIN_AUTOFILL_CREDENTIALS_FILLED,
LOGIN_AUTOFILL_CREDENTIALS_UPDATED,
PERSON_REMOVED,
PERSON_UPDATED,
PUSH_AUTHENTICATION_APPROVED,
PUSH_AUTHENTICATION_EXPIRED,
PUSH_AUTHENTICATION_FAILED,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,14 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat(
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Me - Opened My Profile");
break;
case OPENED_PEOPLE_MANAGEMENT:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("People Management - Accessed List");
break;
case OPENED_PERSON:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("People Management - Accessed Details");
break;
case CREATED_ACCOUNT:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Created Account");
Expand Down Expand Up @@ -822,6 +830,14 @@ private AnalyticsTrackerMixpanelInstructionsForStat instructionsForStat(
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Login - Auto Fill Credentials Updated");
break;
case PERSON_REMOVED:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("People Management - Removed Person");
break;
case PERSON_UPDATED:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("People Management - Updated Person");
break;
case PUSH_AUTHENTICATION_APPROVED:
instructions = AnalyticsTrackerMixpanelInstructionsForStat.
mixpanelInstructionsForEventName("Push Authentication - Approved");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,12 @@ public void track(AnalyticsTracker.Stat stat, Map<String, ?> properties) {
case OPENED_MY_PROFILE:
eventName = "my_profile_opened";
break;
case OPENED_PEOPLE_MANAGEMENT:
eventName = "people_management_list_opened";
break;
case OPENED_PERSON:
eventName = "people_management_details_opened";
break;
case CREATED_ACCOUNT:
eventName = "account_created";
break;
Expand Down Expand Up @@ -393,6 +399,12 @@ public void track(AnalyticsTracker.Stat stat, Map<String, ?> properties) {
case LOGIN_AUTOFILL_CREDENTIALS_UPDATED:
eventName = "login_autofill_credentials_updated";
break;
case PERSON_REMOVED:
eventName = "people_management_person_removed";
break;
case PERSON_UPDATED:
eventName = "people_management_person_updated";
break;
case PUSH_AUTHENTICATION_APPROVED:
eventName = "push_authentication_approved";
break;
Expand Down