1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

1-1192: track the feature type and the new lifetime (#4395)

This PR adds tracking of the feature type and the new lifetime to the
existing plausible event. This allows us extra insights into what users
change it to.
This commit is contained in:
Thomas Heartman 2023-08-03 11:34:03 +02:00 committed by GitHub
parent 64b00fa52d
commit 1b320fbdec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,14 +79,19 @@ export const FeatureTypeForm: VFC<FeatureTypeFormProps> = ({
throw new Error('No feature toggle type loaded');
const value = doesntExpire ? 0 : lifetime;
await updateFeatureTypeLifetime(featureType?.id, value);
await updateFeatureTypeLifetime(featureType.id, value);
refetch();
setToastData({
title: 'Feature type updated',
type: 'success',
});
navigate('/feature-toggle-type');
tracker.trackEvent('feature-type-edit');
tracker.trackEvent('feature-type-edit', {
props: {
featureTypeId: featureType.id,
newLifetime: value,
},
});
} catch (error: unknown) {
setToastApiError(formatUnknownError(error));
}