Skip to content

Commit

Permalink
Fix to event details fired from interactive graph. (#1723)
Browse files Browse the repository at this point in the history
## Summary:
Missing two addtional event details fired from interactive graph

Issue: LEMS-2324

## Test plan:
N/A

Author: catandthemachines

Reviewers: SonicScrewdriver, benchristel, nedredmond

Required Reviewers:

Approved By: SonicScrewdriver

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1723
  • Loading branch information
catandthemachines authored Oct 4, 2024
1 parent dac7246 commit d4f4e2b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changeset/lovely-ants-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus": patch
"@khanacademy/perseus-core": patch
---

Updating event data sent within interactive graph
2 changes: 2 additions & 0 deletions packages/perseus-core/src/analytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export type PerseusAnalyticsEvent =
type: "perseus:interactive-graph-widget:rendered";
payload: {
type: string;
widgetType: string;
widgetId: string;
};
}
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,11 @@ export const MafsGraph = (props: MafsGraphProps) => {
useOnMountEffect(() => {
analytics.onAnalyticsEvent({
type: "perseus:interactive-graph-widget:rendered",
payload: {type},
payload: {
type,
widgetType: "INTERACTIVE_GRAPH",
widgetId: "interactive-graph",
},
});
});

Expand Down

0 comments on commit d4f4e2b

Please sign in to comment.