Skip to content

[Image] Add analytics events to explore image modal#3815

Merged
SonicScrewdriver merged 7 commits into
mainfrom
LEMS-4280/collect-data-about-long-description-usage
Jul 7, 2026
Merged

[Image] Add analytics events to explore image modal#3815
SonicScrewdriver merged 7 commits into
mainfrom
LEMS-4280/collect-data-about-long-description-usage

Conversation

@Evelas78

Copy link
Copy Markdown
Contributor

Summary:

Added an open and closed event to track how often the modal is used and how long users linger on the modal

Issue: https://khanacademy.atlassian.net/browse/LEMS-4280

Test plan:

  • Verified that CEDAR is firing the event using the networks tool of the chrome developer tab in webapp locally after publishing the event-schemas and perseus PR

…lytics events to explore image modal

Added an open and closed event to track how often the modal is used and how long users linger on the modal

Issue: https://khanacademy.atlassian.net/browse/LEMS-4280

Test plan:
- Verified that CEDAR is firing the event using the networks tool of the chrome developer tab in webapp locally after publishing the event-schemas and perseus PR
@Evelas78 Evelas78 self-assigned this Jun 25, 2026
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Size Change: +83 B (+0.02%)

Total Size: 517 kB

📦 View Changed
Filename Size Change
packages/perseus/dist/es/index.js 204 kB +83 B (+0.04%)
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.6 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 6.31 kB
packages/math-input/dist/es/index.js 98.5 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.item-splitting.js 12.9 kB
packages/perseus-core/dist/es/index.js 27.6 kB
packages/perseus-editor/dist/es/index.js 104 kB
packages/perseus-linter/dist/es/index.js 9.79 kB
packages/perseus-score/dist/es/index.js 9.86 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/strings.js 12.4 kB
packages/pure-markdown/dist/es/index.js 1.39 kB
packages/simple-markdown/dist/es/index.js 6.71 kB

compressed-size-action

Evelas78 added 2 commits June 25, 2026 10:33
…: Adding analytics events to explore image modal for tracking amount of uses and how long users linger on the widget
…ain' into LEMS-4280/collect-data-about-long-description-usage
@github-actions

github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (8ccbc0e) and published it to npm. You
can install it using the tag PR3815.

Example:

pnpm add @khanacademy/perseus@PR3815

If you are working in Khan Academy's frontend, you can run the below command.

./dev/tools/bump_perseus_version.ts -t PR3815

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -t PR3815

@Evelas78 Evelas78 marked this pull request as ready for review June 25, 2026 16:33

@catandthemachines catandthemachines left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!


React.useEffect(() => {
const openedAt = Date.now();
return () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooo I love how simple and clean this is!

Evelas78 added 4 commits June 26, 2026 09:19
…ain' into LEMS-4280/collect-data-about-long-description-usage
…ain' into LEMS-4280/collect-data-about-long-description-usage
…ain' into LEMS-4280/collect-data-about-long-description-usage
…ain' into LEMS-4280/collect-data-about-long-description-usage
@SonicScrewdriver SonicScrewdriver merged commit 5e27b11 into main Jul 7, 2026
12 checks passed
@SonicScrewdriver SonicScrewdriver deleted the LEMS-4280/collect-data-about-long-description-usage branch July 7, 2026 16:05
SonicScrewdriver added a commit that referenced this pull request Jul 7, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @khanacademy/math-input@26.5.0

### Minor Changes

- [#3866](#3866)
[`9ae69b7`](9ae69b7)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! -
Syncing deps to newest major versions of Wonder Blocks

### Patch Changes

- Updated dependencies
\[[`5e27b11`](5e27b11)]:
    -   @khanacademy/perseus-core@30.1.1
    -   @khanacademy/keypad-context@3.2.72

## @khanacademy/perseus@79.2.0

### Minor Changes

- [#3866](#3866)
[`9ae69b7`](9ae69b7)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! -
Syncing deps to newest major versions of Wonder Blocks

### Patch Changes

- [#3815](#3815)
[`5e27b11`](5e27b11)
Thanks [@Evelas78](https://github.com/Evelas78)! - Adding analytics
events to explore image modal for tracking amount of uses and how long
users linger on the widget

- Updated dependencies
\[[`9ae69b7`](9ae69b7),
[`5e27b11`](5e27b11)]:
    -   @khanacademy/math-input@26.5.0
    -   @khanacademy/perseus-core@30.1.1
    -   @khanacademy/keypad-context@3.2.72
    -   @khanacademy/kmath@2.4.31
    -   @khanacademy/perseus-linter@5.1.12
    -   @khanacademy/perseus-score@8.12.4

## @khanacademy/perseus-editor@34.2.0

### Minor Changes

- [#3866](#3866)
[`9ae69b7`](9ae69b7)
Thanks [@SonicScrewdriver](https://github.com/SonicScrewdriver)! -
Syncing deps to newest major versions of Wonder Blocks

### Patch Changes

- [#3863](#3863)
[`9ef574f`](9ef574f)
Thanks [@anakaren-rojas](https://github.com/anakaren-rojas)! - Enables
adding calc variant field into editor json

- Updated dependencies
\[[`9ae69b7`](9ae69b7),
[`5e27b11`](5e27b11)]:
    -   @khanacademy/math-input@26.5.0
    -   @khanacademy/perseus@79.2.0
    -   @khanacademy/perseus-core@30.1.1
    -   @khanacademy/keypad-context@3.2.72
    -   @khanacademy/kmath@2.4.31
    -   @khanacademy/perseus-linter@5.1.12

## @khanacademy/keypad-context@3.2.72

### Patch Changes

- Updated dependencies
\[[`5e27b11`](5e27b11)]:
    -   @khanacademy/perseus-core@30.1.1

## @khanacademy/kmath@2.4.31

### Patch Changes

- Updated dependencies
\[[`5e27b11`](5e27b11)]:
    -   @khanacademy/perseus-core@30.1.1

## @khanacademy/perseus-core@30.1.1

### Patch Changes

- [#3815](#3815)
[`5e27b11`](5e27b11)
Thanks [@Evelas78](https://github.com/Evelas78)! - Adding analytics
events to explore image modal for tracking amount of uses and how long
users linger on the widget

## @khanacademy/perseus-linter@5.1.12

### Patch Changes

- Updated dependencies
\[[`5e27b11`](5e27b11)]:
    -   @khanacademy/perseus-core@30.1.1
    -   @khanacademy/kmath@2.4.31

## @khanacademy/perseus-score@8.12.4

### Patch Changes

- Updated dependencies
\[[`5e27b11`](5e27b11)]:
    -   @khanacademy/perseus-core@30.1.1
    -   @khanacademy/kmath@2.4.31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants