Skip to content

Commit e010ac5

Browse files
JoshFergeJesse-Box
authored andcommitted
feat(autofix): Track instructions_provided on Code It Up clicks (#103068)
Add analytics to capture whether a user provided instructions when clicking "Code it up". Fixes AIML-1530
1 parent 038ea47 commit e010ac5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

static/app/components/events/autofix/autofixSolution.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,13 @@ function AutofixSolutionDisplay({
486486
});
487487
};
488488

489+
// Check if instructions were provided (either typed in input or already added to solution and active)
490+
const hasInstructions =
491+
instructions.trim().length > 0 ||
492+
solutionItems.some(
493+
item => item.timeline_item_type === 'human_instruction' && item.is_active !== false
494+
);
495+
489496
useEffect(() => {
490497
setSolutionItems(
491498
solution.map(item => ({
@@ -650,6 +657,9 @@ function AutofixSolutionDisplay({
650657
onClick={handleCodeItUp}
651658
analyticsEventName="Autofix: Code It Up"
652659
analyticsEventKey="autofix.solution.code"
660+
analyticsParams={{
661+
instruction_provided: hasInstructions,
662+
}}
653663
title={t('Implement this solution in code with Seer')}
654664
>
655665
{t('Code It Up')}

0 commit comments

Comments
 (0)