How to Track Performance Analytics Events
Performance analytics are experience question and answer analytics. There are four types of questions that you can track performance data for in your scene: multiple choice questions, marker questions, scene hunts, and timed hunts.
Contact us if you want to tag questions and answers with concepts.
Our sample scene, "Experience Performance Analytics", which demonstrates how to configure performance analytics in your scene, can be found in our examples scene folder under Packages/com.strivr.strivrsdk/Examples/Scenes/. Sideload an APK of this scene in your headset to interact with it. Or, to experiment with this scene in the editor with a simulated rig, you can add the device simulator rig that’s a sample of XR Interaction Toolkit 2.3.2 and drag the "XR Device Simulator" into this scene. Note: keeping this device simulator in your scene will prevent the VR rig from working in your APK.
Overall, the steps are:
-
Set up an experience for your scene (see the Creating an experience section) and add a script with calls to start and finish the experience (
StrivrAnalytics.StartExperience(StrivrExperienceData data)
andStrivrAnalytics.FinishExperience()
). -
Under the "Experience Questions" list, add to the list which will create a Performance Question ScriptableObject.
-
Fill out the Performance Question ScriptableObject, and add to the Answers list to create associated Answer ScriptableObjects.
-
You can then associate Answer ScriptableObjects to specific game objects in your scene, and from a script:
-
Create a
PerformanceQuestionEventData
data object. -
Track the data object with this call,
StrivrAnalytics.TrackPerformanceAnalyticsEvent(PerformanceQuestionEventData data)
-
For example:
PerformanceQuestionEventData data = new PerformanceQuestionEventData
{
Id = questionId,
AnswerId = answerId,
TimeElapsed = timeElapsed,
QuestionAttemptCount = attemptCount,
DidUserInteract = didUserInteract,
};
StrivrAnalytics.TrackPerformanceAnalyticsEvent(data);
Test Mode
must be disabled in your Project Settings and you must launch the APK from Player in order for this data to appear in Portal under Analytics > By Course
and Analytics > By Learner
.
In order for score data to appear in Portal, you must keep track of the user’s current and maximum possible score. Then to score the performance for the experience, call StrivrAnalytics.TrackScore(int score, int maxScore) before calling StrivrAnalytics.FinishExperience() . There are examples of this in both the "Experience Scoring Analytics" and "Experience Performance Analytics" scenes.
|
The data in Portal shows the currently existing scene’s experience and performance analytics data for the most recently published APK. If you had previously generated data for an Exprience Question that you then removed from your scene, you will not see that particular question’s data in Portal anymore. |