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
- Unity
- Unreal Engine
- WebXR
// 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 assessmentEventStatus.Fail- User failed the assessmentEventStatus.Complete- Assessment completed (no pass/fail)EventStatus.Incomplete- Assessment not finished
Unreal Engine event tracking code will be available when the SDK is released.
// Start an assessment
Abxr.eventAssessmentStart('safety_training');
or
// Start an experience (for assessments without a score)
Abxr.eventExperienceStart('safety_training');
// ... user completes the training ...
// Complete with score and pass/fail status
Abxr.eventAssessmentComplete('safety_training', 92, 'Pass');
or
// Complete an experience
Abxr.eventExperienceComplete('safety_training');
// Or for a failed attempt
Abxr.eventAssessmentComplete('safety_training', 45, 'Fail');
// With additional metadata
Abxr.eventAssessmentComplete('safety_training', 92, 'Pass', {
difficulty: 'advanced',
time_spent: '1200'
});
or
// Complete an experience with additional metadata
Abxr.eventExperienceComplete('safety_training', {
difficulty: 'advanced',
time_spent: '1200'
});
Available Status Values:
'Pass'- User passed the assessment'Fail'- User failed the assessment'Complete'- Assessment completed (no pass/fail)'Incomplete'- Assessment not finished
Best Practices
- Pair start and complete events: Each
EventAssessmentStartshould have a correspondingEventAssessmentComplete - 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
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
- Unity
- Unreal Engine
- WebXR
// 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"}
});
Unreal Engine event tracking code will be available when the SDK is released.
// Start an objective
Abxr.eventObjectiveStart('valve_operation');
// ... user performs the task ...
// Complete with score and status
Abxr.eventObjectiveComplete('valve_operation', 100, 'Complete');
// With metadata
Abxr.eventObjectiveComplete('valve_operation', 85, 'Pass', {
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
- Unity
- Unreal Engine
- WebXR
// 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 questionsInteractionType.Select- Multiple choiceInteractionType.Text- Text inputInteractionType.Rating- Rating scaleInteractionType.Number- Numeric inputInteractionType.Matching- Matching exercisesInteractionType.Performance- Performance-based tasksInteractionType.Sequencing- Ordering tasks
Interaction Results:
InteractionResult.Correct- User answered correctlyInteractionResult.Incorrect- User answered incorrectlyInteractionResult.Neutral- No right/wrong answer (default)
Unreal Engine event tracking code will be available when the SDK is released.
// Start an interaction
Abxr.eventInteractionStart('question_1');
// ... user selects an answer ...
// Complete with type, result, and response
Abxr.eventInteractionComplete(
'question_1',
'Select',
'Correct',
'option_b'
);
// Multiple choice with metadata
Abxr.eventInteractionComplete(
'safety_question',
'Select',
'Correct',
'proper_ppe',
{ question_id: 'sq_001' }
);
Interaction Types:
'Bool'- True/false questions'Select'- Multiple choice'Text'- Text input'Rating'- Rating scale'Number'- Numeric input'Matching'- Matching exercises'Performance'- Performance-based tasks'Sequencing'- Ordering tasks
Interaction Results:
'Correct'- User answered correctly'Incorrect'- User answered incorrectly'Neutral'- No right/wrong answer (default)
Additional Event Types
Level Events
Track level-based progression in game-like training experiences:
- Unity
- Unreal Engine
- WebXR
Abxr.EventLevelStart("level_1");
// ... user plays level ...
Abxr.EventLevelComplete("level_1", 85);
Unreal Engine event tracking code will be available when the SDK is released.
Abxr.eventLevelStart('level_1');
// ... user plays level ...
Abxr.eventLevelComplete('level_1', 85);
Critical Events
Flag important safety violations, high-risk errors, or critical moments:
- Unity
- Unreal Engine
- WebXR
Abxr.EventCritical("safety_violation", new Abxr.Dict {
{"violation_type", "missing_ppe"},
{"severity", "high"}
});
Unreal Engine event tracking code will be available when the SDK is released.
Abxr.eventCritical('safety_violation', {
violation_type: 'missing_ppe',
severity: 'high'
});
Custom Events
For tracking any other user behavior or system event:
- Unity
- Unreal Engine
- WebXR
Abxr.Event("button_pressed");
Abxr.Event("tool_selected", new Abxr.Dict { {"tool", "wrench"} });
Abxr.Event("player_teleported", transform.position, new Abxr.Dict { {"destination", "workstation"} });
Unreal Engine event tracking code will be available when the SDK is released.
Abxr.event('button_pressed');
Abxr.event('tool_selected', { tool: 'wrench' });
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:
EventAssessmentStart("fire_safety_training")- Start the overall trainingEventObjectiveStart("identify_extinguisher")- Start first learning objectiveEventInteractionComplete("question_1", ...)- User answers questionEventObjectiveComplete("identify_extinguisher", 100, Pass)- Complete objectiveEventObjectiveStart("use_extinguisher")- Start next objectiveEventObjectiveComplete("use_extinguisher", 90, Pass)- Complete objectiveEventAssessmentComplete("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 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.
Related Documentation
- Quickstart Guide - Get started tracking events in minutes
- SDK Documentation - Complete SDK reference
- Best Practices - Tips for effective event tracking
- LMS Integration - Connect your events to learning management systems