diff --git a/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx b/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx index 6cdf7944b1..44208ff0e7 100644 --- a/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx +++ b/apps/admin-x-settings/src/components/settings/advanced/labs/FeatureToggle.tsx @@ -1,4 +1,5 @@ import React from 'react'; +import trackEvent from '../../../../utils/analytics'; import {ConfigResponseType, configDataType} from '@tryghost/admin-x-framework/api/config'; import {Toggle} from '@tryghost/admin-x-design-system'; import {getSettingValue, useEditSettings} from '@tryghost/admin-x-framework/api/settings'; @@ -20,6 +21,7 @@ const FeatureToggle: React.FC<{ flag: string; label?: string; }> = ({label, flag key: 'labs', value: JSON.stringify({...labs, [flag]: newValue}) }]); + trackEvent('Feature Toggled', {state: newValue ? 'on' : 'off', feature: flag}); client.setQueriesData([configDataType], current => ({ config: { ...(current as ConfigResponseType).config,