Skip to main content

Events

Events are the primary way to track user interactions, learning outcomes, and training progress in your XR application. The Insights SDK provides specialized event types designed for educational and training scenarios.

Assessment Events (Required)

Assessment events are required to activate the grading system, comprehensive dashboards, and LMS integration. Assessments track overall performance across an entire experience, course, or curriculum—think of it as the final score or outcome for a complete learning module.

When to Use

Use assessment events to track:

  • Complete training modules or courses
  • Final exams or comprehensive evaluations
  • Overall user performance across an experience
  • Gradeable items that integrate with your LMS

Usage

// Start an assessment
Abxr.EventAssessmentStart("safety_training");

// ... user completes the training ...

// Complete with score and pass/fail status
Abxr.EventAssessmentComplete("safety_training", 92, EventStatus.Pass);

// Or for a failed attempt
Abxr.EventAssessmentComplete("safety_training", 45, EventStatus.Fail);

// With additional metadata
Abxr.EventAssessmentComplete("safety_training", 92, EventStatus.Pass, new Abxr.Dict {
{"difficulty", "advanced"},
{"time_spent", "1200"}
});

Available Status Values:

  • EventStatus.Pass - User passed the assessment
  • EventStatus.Fail - User failed the assessment
  • EventStatus.Complete - Assessment completed (no pass/fail)
  • EventStatus.Incomplete - Assessment not finished

Best Practices

  • Pair start and complete events: Each EventAssessmentStart should have a corresponding EventAssessmentComplete
  • Use consistent naming: Use the same assessment name for start and complete events
  • Score range: We recommend scores between 0-100, but any integer range is acceptable
  • Always include status: Set Pass/Fail status to enable LMS grade reporting
  • Duration tracking: Duration is automatically calculated between start and complete events
tip

When an Assessment completes, it automatically records and closes out the session in supported LMS platforms.

Objective Events

Objectives track specific learning goals or sub-tasks within an assessment. These represent individual skills, concepts, or milestones that contribute to the overall assessment score.

When to Use

Use objective events to track:

  • Individual learning objectives within a course
  • Specific tasks or skills being practiced
  • Sub-components of a larger assessment
  • Granular progress tracking

Usage

// Start an objective
Abxr.EventObjectiveStart("valve_operation");

// ... user performs the task ...

// Complete with score and status
Abxr.EventObjectiveComplete("valve_operation", 100, EventStatus.Complete);

// With metadata
Abxr.EventObjectiveComplete("valve_operation", 85, EventStatus.Pass, new Abxr.Dict {
{"attempts", "2"},
{"hints_used", "1"}
});

Interaction Events

Interactions track individual user responses or actions within an objective or assessment. These capture specific user inputs, choices, or behaviors that demonstrate engagement and learning progress.

When to Use

Use interaction events to track:

  • Multiple choice question responses
  • Button clicks and UI interactions
  • Individual user decisions
  • Specific actions that demonstrate learning

Usage

// Start an interaction
Abxr.EventInteractionStart("question_1");

// ... user selects an answer ...

// Complete with type, result, and response
Abxr.EventInteractionComplete(
"question_1",
InteractionType.Select,
InteractionResult.Correct,
"option_b"
);

// Multiple choice with metadata
Abxr.EventInteractionComplete(
"safety_question",
InteractionType.Select,
InteractionResult.Correct,
"proper_ppe",
new Abxr.Dict { {"question_id", "sq_001"} }
);

Interaction Types:

  • InteractionType.Bool - True/false questions
  • InteractionType.Select - Multiple choice
  • InteractionType.Text - Text input
  • InteractionType.Rating - Rating scale
  • InteractionType.Number - Numeric input
  • InteractionType.Matching - Matching exercises
  • InteractionType.Performance - Performance-based tasks
  • InteractionType.Sequencing - Ordering tasks

Interaction Results:

  • InteractionResult.Correct - User answered correctly
  • InteractionResult.Incorrect - User answered incorrectly
  • InteractionResult.Neutral - No right/wrong answer (default)

Additional Event Types

Level Events

Track level-based progression in game-like training experiences:

Abxr.EventLevelStart("level_1");
// ... user plays level ...
Abxr.EventLevelComplete("level_1", 85);

Critical Events

Flag important safety violations, high-risk errors, or critical moments:

Abxr.EventCritical("safety_violation", new Abxr.Dict {
{"violation_type", "missing_ppe"},
{"severity", "high"}
});

Custom Events

For tracking any other user behavior or system event:

Abxr.Event("button_pressed");
Abxr.Event("tool_selected", new Abxr.Dict { {"tool", "wrench"} });
Abxr.Event("player_teleported", transform.position, new Abxr.Dict { {"destination", "workstation"} });

Event Hierarchy

Understanding how events relate to each other:

Assessment (overall course/module)
├── Objective (specific learning goal)
│ ├── Interaction (user response)
│ └── Interaction (user response)
├── Objective (another learning goal)
│ └── Interaction (user response)
└── Level (optional game-like structure)

Example Training Flow:

  1. EventAssessmentStart("fire_safety_training") - Start the overall training
  2. EventObjectiveStart("identify_extinguisher") - Start first learning objective
  3. EventInteractionComplete("question_1", ...) - User answers question
  4. EventObjectiveComplete("identify_extinguisher", 100, Pass) - Complete objective
  5. EventObjectiveStart("use_extinguisher") - Start next objective
  6. EventObjectiveComplete("use_extinguisher", 90, Pass) - Complete objective
  7. EventAssessmentComplete("fire_safety_training", 95, Pass) - Complete training

Automatic Features

The SDK automatically enhances your events with:

  • Duration tracking: Time between start and complete events is calculated automatically
  • Scene information: Current Unity scene name is included with every event
  • Module context: When module targets are set, the current module identifier is automatically included with all events
  • Super metadata: Global metadata set via Abxr.Register() is merged into all events
  • Timestamps: All events are timestamped automatically
Module Targets

Module targets allow single applications to contain multiple training modules with individual tracking and grading. The module identifier can be set through LMS assignments, deep links, or programmatically, and is automatically included with all events for precise tracking. Learn more in the SDK Documentation.