From 1b320fbdec0d29fb1eec5fed68494eeb00067d6d Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Thu, 3 Aug 2023 11:34:03 +0200 Subject: [PATCH] 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. --- .../FeatureTypeEdit/FeatureTypeForm/FeatureTypeForm.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/frontend/src/component/featureTypes/FeatureTypeEdit/FeatureTypeForm/FeatureTypeForm.tsx b/frontend/src/component/featureTypes/FeatureTypeEdit/FeatureTypeForm/FeatureTypeForm.tsx index 07e57ac1e1..b9ee0dcb20 100644 --- a/frontend/src/component/featureTypes/FeatureTypeEdit/FeatureTypeForm/FeatureTypeForm.tsx +++ b/frontend/src/component/featureTypes/FeatureTypeEdit/FeatureTypeForm/FeatureTypeForm.tsx @@ -79,14 +79,19 @@ export const FeatureTypeForm: VFC = ({ 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)); }