Give Posthog a correct total count of decryption failures (#7475)
This commit is contained in:
parent
9fd933a0b6
commit
59ef2704f0
1 changed files with 7 additions and 5 deletions
|
@ -1632,11 +1632,13 @@ export default class MatrixChat extends React.PureComponent<IProps, IState> {
|
||||||
const dft = new DecryptionFailureTracker((total, errorCode) => {
|
const dft = new DecryptionFailureTracker((total, errorCode) => {
|
||||||
Analytics.trackEvent('E2E', 'Decryption failure', errorCode, String(total));
|
Analytics.trackEvent('E2E', 'Decryption failure', errorCode, String(total));
|
||||||
CountlyAnalytics.instance.track("decryption_failure", { errorCode }, null, { sum: total });
|
CountlyAnalytics.instance.track("decryption_failure", { errorCode }, null, { sum: total });
|
||||||
|
for (let i = 0; i < total; i++) {
|
||||||
PosthogAnalytics.instance.trackEvent<ErrorEvent>({
|
PosthogAnalytics.instance.trackEvent<ErrorEvent>({
|
||||||
eventName: "Error",
|
eventName: "Error",
|
||||||
domain: "E2EE",
|
domain: "E2EE",
|
||||||
name: errorCode,
|
name: errorCode,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}, (errorCode) => {
|
}, (errorCode) => {
|
||||||
// Map JS-SDK error codes to tracker codes for aggregation
|
// Map JS-SDK error codes to tracker codes for aggregation
|
||||||
switch (errorCode) {
|
switch (errorCode) {
|
||||||
|
|
Loading…
Reference in a new issue