Insights Quickstart
Get Insights events flowing from your app in minutes. Choose your development environment below.
1) Install
- Unity
- Unreal Engine
- WebXR
- Add the AbxrLib Unity package (via UPM or local package).
- Ensure your Android/Gradle toolchain is compatible.
Unreal Engine SDK is currently in early beta. Expect issues and feedback is welcome.
- Download the plugin from the GitHub repository.
- Copy the plugin folder to your project's
Pluginsdirectory. - Open your Unreal project and go to
Edit > Plugins. - Find
ABXRLib SDKand enable it. - Once imported, you will see
ABXRLib SDKconfiguration options in your Project Settings.
npm i @arborxr/abxrlib-webxr
# or
yarn add @arborxr/abxrlib-webxr
2) Required Configuration
Default integrations use App Token and Org Token (JWTs from the ArborXR portal or your distribution channel). For Unity and Unreal, AbxrLib usually generates or resolves the org token at runtime when the device or ArborXR client provides org context, so you often set App Token only and leave Org Token empty in project settings. For local development in the Editor, you can paste your App Token into the Org Token field when you need both fields populated.
- Unity
- Unreal Engine
- WebXR
- Open
Analytics for XR > Configurationin the Unity Editor. - Use App Tokens defaults to enabled in the AbxrLib configuration asset; keep it on for JWT authentication.
- Set App Token (required): JWT for your app from Content Library → Managed app → Insights Hub (or your channel).
- Org Token: Leave empty to use dynamic org token when the headset or ArborXR runtime supplies org context. For Editor testing, you may paste the same value as App Token into Org Token if your workflow needs both fields filled.
- Production / wide distribution: Prefer App Token plus dynamic org token (empty org token) where supported. Single-customer or production_custom builds may require an explicit org token—follow your distribution guidelines.
Unreal Engine SDK is currently in early beta. Expect issues and feedback is welcome.
- Open
Edit > Project Settings > Plugins > AbxrLib Configuration(or ABXR Configuration) in the Unreal Editor. - Use App Tokens defaults to enabled in the AbxrLib configuration asset; keep it on for JWT authentication.
- Set App Token (required): JWT from Content Library → Managed app → Insights Hub (or your channel).
- Org Token: Leave empty to use dynamic org token when the headset or ArborXR runtime supplies org context. For Editor testing, you may paste the same value as App Token into Org Token if your workflow needs both fields filled.
- Production / wide distribution: Prefer App Token plus dynamic org token (empty org token) where supported. Single-customer or production_custom builds may require an explicit org token—follow your distribution guidelines.
See the Unreal README for packaging and UI setup steps after credentials.
- App Token (required) and optional Org Token / buildType: load from config or env at build time (see SDK init).
- Base URL: Use sandbox for development, production when ready (per SDK / deployment defaults).
- Development: For local testing, you can set Org Token to the same JWT as App Token when you need both values populated.
- Querying Insights via the REST API (org identifiers, tokens, scopes): see Query Insights data.
Additional authentication options and credential flows are documented in Full documentation → Configuration.
Avoid embedding long-lived org tokens or other embedded authentication secrets in builds intended for broad third-party distribution. Reserve embedded org credentials for single-customer deployments; for general distribution, use ArborXR-managed devices and runtime-supplied tokens.
3) Initialize
- Unity
- Unreal Engine
- WebXR
In Unity the Abxr object will automatically be available. Skip to the next section.
In Unreal the Abxr object will automatically be available. Skip to the next section.
import { Abxr_init } from 'abxrlib-for-webxr';
// Typically loaded from config/env at build time
const APP_TOKEN = 'eyJ...'; // App Token (JWT) from portal or env
Abxr_init({
appToken: APP_TOKEN,
orgToken: undefined, // optional; for local dev you can set orgToken to the same JWT as appToken
buildType: 'development',
});
REST base URL and environment defaults come from the SDK or your deployment; see the WebXR SDK README.
4) Essential Event Tracking (Required)
Assessment events are required to activate grading dashboards and LMS integration. Send these events to track training completion, scores, and pass/fail status.
- Unity
- Unreal Engine
- WebXR
// When training starts
Abxr.EventAssessmentStart("safety_training");
// When training completes
Abxr.EventAssessmentComplete("safety_training", 92, EventStatus.Pass);
// or
Abxr.EventAssessmentComplete("safety_training", 25, EventStatus.Fail);
// or
Abxr.EventAssessmentComplete("safety_training", 25, EventStatus.Incomplete);
// If your score range is NOT 0-100, pass score_min and score_max in meta:
// Abxr.EventAssessmentComplete("safety_training", 350, EventStatus.Pass, new Abxr.Dict().With("score_min", "0").With("score_max", "400"));
Assessment Complete:
Score(second parameter): default range is 0–100. If your scale is different (e.g. 0–400 or 1–10), you must passscore_minandscore_maxin themetaparameter; otherwise the SDK will clamp the score and log a warning.- The
EventStatusenum hasPass,Fail,Complete,Incomplete,Browsed,NotAttemptedoptions
Unreal Engine SDK is currently in early beta. Expect issues and feedback is welcome.
// When training starts
UAbxr::EventAssessmentStart(TEXT("safety_training"));
// When training completes
UAbxr::EventAssessmentComplete(TEXT("safety_training"), 92, EEventStatus::Pass);
// or
UAbxr::EventAssessmentComplete(TEXT("safety_training"), 25, EEventStatus::Fail);
// If your score range is NOT 0-100, pass score_min and score_max in meta.
Assessment Complete:
Score(second parameter): default range is 0–100. If your scale differs, passscore_minandscore_maxinmetaso the SDK does not clamp the score.- The
EEventStatusenum hasPass,Fail,Complete,Incomplete,Browsed,NotAttemptedoptions
// When training starts
Abxr.eventAssessmentStart('safety_training');
// When training completes
Abxr.eventAssessmentComplete('safety_training', 92, 'Pass');
// or
Abxr.eventAssessmentComplete('safety_training', 25, 'Fail');
// If your score range is NOT 0-100, pass score_min and score_max in meta.
Assessment Complete:
Score(second parameter): default range is 0–100. If your scale differs, passscore_minandscore_maxinmeta.EventStatus(third parameter): acceptsPass,Fail,Complete,Incomplete,Browsed,NotAttempted
Integration Checklist
The Integration Checklist lays out the essential requirements for developers to seamlessly integrate with ArborXR Insights. Covering LMS integration, basic reporting, and our core activities and sessions structure; it ensures your app meets the baseline for reliable data tracking and visualization based on our systems.
Choose your preferred format:
SDK Logic Flow Diagram
This flowchart visually maps out the step-by-step logic to implement our SDK successfully. It highlights assessment logic as core and shows how optional objectives and interactions can be added for richer data insights.
Click the diagram to open the full-size PDF.
Documentation for Objectives and Interactions here.
5) Improving your Dashboards & Charts (Recommended)
The Insights dashboards and charts will be key to improving your content and helping your customer measure training efficacy. See here for more recommendations on powering the assessments dashboard.
Assessment Tracking Examples
Unity (C#) - Click to collapse
// Add at the start your training (or training module)
Abxr.EventAssessmentStart("safety_training1");
// Add at the end your training (or training module)
Abxr.EventAssessmentComplete("safety_training1", 92, EventStatus.Pass);
// or
Abxr.EventAssessmentComplete("safety_training1", 28, EventStatus.Fail);
Unreal Engine (C++) - Click to expand
// Add at the start your training (or training module)
UAbxr::EventAssessmentStart(TEXT("safety_training1"));
// Add at the end your training (or training module)
UAbxr::EventAssessmentComplete(TEXT("safety_training1"), 92, EEventStatus::Pass);
// or
UAbxr::EventAssessmentComplete(TEXT("safety_training1"), 28, EEventStatus::Fail);
WebXR (JavaScript/TypeScript) - Click to expand
// Add at the start your training (or training module)
Abxr.EventAssessmentStart('safety_training1');
// Add at the end your training (or training module)
Abxr.EventAssessmentComplete('safety_training1', 92, Abxr.EventStatus.Pass);
// or
Abxr.EventAssessmentComplete('safety_training1', 28, Abxr.EventStatus.Fail);
When need to show specific example:
- Unity
- Unreal Engine
- WebXR
// To mark a specific objective start
Abxr.EventObjectiveStart("open_valve");
// When the objective is complete
Abxr.EventObjectiveComplete("open_valve", 100, EventStatus.Complete);
// To mark a specific objective start
UAbxr::EventObjectiveStart(TEXT("open_valve"));
// When the objective is complete
UAbxr::EventObjectiveComplete(TEXT("open_valve"), 92, EEventStatus::Complete);
// To mark a specific objective start
Abxr.EventObjectiveStart("open_valve");
// When the objective is complete
Abxr.EventObjectiveComplete("open_valve", 100, 'Complete');
See the Events documentation for Objectives, Interactions, and advanced tracking options.
FAQs & Recommendations
- Security: Avoid embedding long-lived org tokens or other embedded authentication secrets in builds intended for broad third-party distribution. Use ArborXR-managed devices and runtime-supplied tokens where possible.
- Environments: Use separate App Tokens (or separate app registrations) for development vs production as appropriate for your pipeline.
- Unity
- Unreal Engine
- WebXR
- CORS: If you call protected APIs from the browser, use a backend proxy or configure allowed origins
- PII: Avoid sending personally identifiable information in event metadata; prefer stable, non-identifying IDs
- Environments: Start in sandbox; flip
BASE_URLto production when ready
Next Steps
- Events - Learn about Assessment, Objective, and Interaction events
- SDK Libraries - Explore available SDKs for Unity, WebXR, and Unreal
- LMS Integration - Connect to learning management systems
- Best Practices - Tips for effective analytics implementation
