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:
parent
64b00fa52d
commit
1b320fbdec
@ -79,14 +79,19 @@ export const FeatureTypeForm: VFC<FeatureTypeFormProps> = ({
|
|||||||
throw new Error('No feature toggle type loaded');
|
throw new Error('No feature toggle type loaded');
|
||||||
|
|
||||||
const value = doesntExpire ? 0 : lifetime;
|
const value = doesntExpire ? 0 : lifetime;
|
||||||
await updateFeatureTypeLifetime(featureType?.id, value);
|
await updateFeatureTypeLifetime(featureType.id, value);
|
||||||
refetch();
|
refetch();
|
||||||
setToastData({
|
setToastData({
|
||||||
title: 'Feature type updated',
|
title: 'Feature type updated',
|
||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
navigate('/feature-toggle-type');
|
navigate('/feature-toggle-type');
|
||||||
tracker.trackEvent('feature-type-edit');
|
tracker.trackEvent('feature-type-edit', {
|
||||||
|
props: {
|
||||||
|
featureTypeId: featureType.id,
|
||||||
|
newLifetime: value,
|
||||||
|
},
|
||||||
|
});
|
||||||
} catch (error: unknown) {
|
} catch (error: unknown) {
|
||||||
setToastApiError(formatUnknownError(error));
|
setToastApiError(formatUnknownError(error));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user