Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: [#175900141] Added profile deletion abort tracking #2649

Merged
merged 6 commits into from
Dec 31, 2020
Merged
12 changes: 11 additions & 1 deletion ts/store/middlewares/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ import {
import { profileEmailValidationChanged } from "../actions/profileEmailValidationChange";
import { loadServiceDetail, loadVisibleServices } from "../actions/services";
import { Action, Dispatch, MiddlewareAPI } from "../actions/types";
import { upsertUserDataProcessing } from "../actions/userDataProcessing";
import {
deleteUserDataProcessing,
upsertUserDataProcessing
} from "../actions/userDataProcessing";
import { userMetadataLoad, userMetadataUpsert } from "../actions/userMetadata";
import {
paymentAttiva,
Expand Down Expand Up @@ -417,7 +420,14 @@ const trackAction = (mp: NonNullable<typeof mixpanel>) => (
}
break;
case getType(removeAccountMotivation):
case getType(deleteUserDataProcessing.request):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you track also the deleteUserDataProcessing.success and the deleteUserDataProcessing.failure actions?

case getType(deleteUserDataProcessing.success):
return mp.track(action.type, action.payload);
case getType(deleteUserDataProcessing.failure):
return mp.track(action.type, {
choice: action.payload.choice,
reason: action.payload.error.message
});
}
return Promise.resolve();
};
Expand Down