@cuemath/leap
TypeScript icon, indicating that this package has built-in type declarations

2.8.49 • Public • Published

Peer Dependencies

Worksheet

  • fast-equals@5.0.1
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css?family=Noto+Serif:400,400i,700"
rel="stylesheet"
/>
<link rel="preconnect" href="https://learnosity.com" />

📊 Analytics Event Bank

📌 Purpose

This document serves as a central repository for tracking all analytics events. Understanding what events are logged, how they are logged, and where they are tracked ensures better management and organization.

🔍 Tracking Platform-Specific Events

Platform-specific events should be added to designated files to maintain a structured approach.

📂 File Structure

  • features/
    • analytics-events/
      • platform-event-student --> Contains student-related events
      • platform-event-teacher --> Contains teacher-related events

⚠️ Note: After adding an event to these files, import it into the relevant platform where it needs to be tracked.

🛠️ Usage Example

const PLATFORM_EVENT_STUDENT = {
    // Define events here
    YOU_HAVE_SEEN_THE_ANALYTICS_USAGE: 'you_have_seen_the_analytics_usage',
};

How to track them on Plugins

Simply whitelist the events that you have added above

const PLATFORM_WHITELIST_ANALYTICS_EVENT_STUDENT = {
    // whitelist the events here
    [PLATFORM_EVENT_STUDENT.YOU_HAVE_SEEN_THE_ANALYTICS_USAGE]: ['mixpanel', 'webengage'],
};

This will make sure that the event is also getting tracked on the specified plugin.

🔍 Tracking feature-specific Events

Feature-specific events should be added in the {{your-feature}}-analytics-events.ts which then needs to be imported in the following path:

  • features/
    • analytics-events/
      • whitelist-events.ts

🛠️ Usage Example

const FEATURE_ANALYTICS_EVENT = {
    // Define events here
    YOU_HAVE_SEEN_THE_FEATURE_ANALYTICS_USAGE: 'you_have_seen_the_feature_analytics_usage',
};

How to track them on Plugins

Simply whitelist the events that you have added above

const PLATFORM_WHITELIST_ANALYTICS_EVENT_STUDENT = {
    // whitelist the events here
    [FEATURE_ANALYTICS_EVENT.YOU_HAVE_SEEN_THE_FEATURE_ANALYTICS_USAGE]: ['mixpanel', 'webengage'],
};

This will make sure that the event is also getting tracked on the specified plugin.

Troubleshooting

Common troubleshooting steps while using storybook:

  • If Google Places Search is not working, run on local.cuemath.com:PORT instead of localhost:PORT
  • For worksheet story please run on local-teacher.cuemath.com:PORT instead of localhost:PORT, also you may need to update the security object

/@cuemath/leap/

    Package Sidebar

    Install

    npm i @cuemath/leap

    Weekly Downloads

    6,123

    Version

    2.8.49

    License

    none

    Unpacked Size

    61.8 MB

    Total Files

    2334

    Last publish

    Collaborators

    • cuemath