Learn More

Community Blog


Getting Started with a Unity 3D xAPI Pilot

We are pleased to announce access to the GBLxAPI library Unity API asset for using xAPI in games and simulations. This article is provided to community members as guidance on how you can get started with a small pilot project implementing GBLxAPI into a K-12 game/application that has been developed using the Unity 3D engine with our community API for Unity. The instructions that follow assume that the product is a learning game however the same guidance would apply for use with using xAPI to collect data in a non-learning project. 

UPDATED 03/15/2021

This article has now been updated below to reflect the release of version 1.1 of the Unity xAPI published by the GBLxAPI community. Access is now available to the public on the Github repository instead of by request.

The GBLxAPI library has been downloaded by over 200 developers world-wide prior to the release of version 1.1.  DiG-iT! Games®, the core developer, uses it in production for educational and casual entertainment games.  Their implementation alone has generated almost 10 million records to their learning record store over the past few years.


Getting Started xAPI and Unity

For an initial pilot, we recommend the following steps:

Getting Familiar with xAPI

1.    Join the the community to get early access to updated tools including the API.  The Unity xAPI API has evolved over the years and streamlined for developers to easily implement into their projects.

2.    Play the Game Demo, if you have not already.  It is a great way to get a feel for how learning and non-learning data is captured from a Unity game.  Besides this is a fun brain teaser game for those that love math.

3.    Review the larger xAPI standard for general background if you have not already. GBLxAPI is based on the xAPI specification.  It is meant to capture learning everywhere.  Here are some suggested links.

a.    xAPI Specification
b.   xAPI Overview
c.   Short GBLxAPI Presentation

4.    Review the GBLxAPI core vocabulary structure and explore the additional URIs that support these new xAPI context extensions. The additional URIs are IDs in the GBLxAPI vocabulary that are used in a context extension like Domain.  They are core to the standard and provide the interoperable transparency that are community goals for the K-12 community.  Please note that GBLxAPI was introduced a method for K-12 applications but the Unity module is agnostic and applicable to any application.

Implementing xAPI in Unity

5.    Review the Unity GBLxAPI API documentation found on the community GitHub site in the wiki. Note this has been updated for version 1.1.  If you used the beta version there are archive notes and and wiki page on upgrading.

6.    Pick a Unity game to pilot that has learning outcomes. It doesn’t need to have many learning outcomes and if your project has extensive telemetry activities you should start with a smaller subset of data to track at first.

7.    Organize the learning events you would like to track.  In many cases these will already exist or perhaps be found in a design document. We have provided an Excel sample template tool that is used with the GBLxAPI game demo that you can further customize or use your own method.  This available with the download package.

8.    Declare your specific URIs for your organization and game activities in the template.

9.    Select the learning and non-learning events with corresponding xAPI(GBLxAPI) URIs for your verbs and activity types.

10.  Request a sandbox learning record store(LRS) be created for you on the community learning record store or setup your own store. Dig-iT! Games is hosting an LRS for community use for free at this time.  They are using an open-source LRS created by Learning Locker.  You can make this request when you join the community.

11.  Implement the API in your game following the guidance documentation and using the information in the template.  The API is designed to simplify the process.  You should probably start with one or two events and verify it is all working correctly.

12.  Test to confirm all your statements are transmitting to the LRS once have them set in UNITY by looking at the source data stream in the LRS.

13.  Create some basic visualization reports in the LRS and perhaps export some of the data to view in other formats.

At this point you have successfully implemented GBLxAPI in your UNITY application. Congratulations!  Your product is producing xAPI statements to an LRS.  You now have data being generated that is transparent and interoperable in the community.  You can export your LRS data to another LRS at any time. 


UPDATED: We are no longer supporting access to a BI server integrated with our LRS data.  However, please feel free to reach out if you have questions

Advanced xAPI Reporting and Analysis

If you want to delve deeper into reports and analytics, a community enterprise class business intelligence has been setup for advance reporting and more.  Take a sneak peak at a sample report created with the tool from the game demo here.

14.  Obtain a sandbox account for the BI server if you have not already been provided one.

15.  Request your organization/store in the LRS be linked to the BI server.  This will generally be linked up by the BI administrator for the community.  This will import your LRS JSON data and pre-process it for further data analysis.

16.  A designer seat will be provided to you initially so you can create your dashboards and widgets.  Additional viewer seats can be provided.
Listed below is an example of the GBLxAPI data structure after pre-processing  on our BI Server for advanced reporting.  The core vocabulary context extensions for GBLxAPI are placed in individual tables. 

17.  Create your dashboards and then the corresponding widgets. The community manager can provides some samples.

The figure below represents the GBLxAPI data structure after pre-processing  on the BI Server for advanced reporting.  The core vocabulary context extensions for GBLxAPI are placed in individual tables.

xAPI JSON Table Processing
xAPI JSON Table Processing


Resources Needed

Educator/Designer & Developer are generally the types of individuals that are involved in implementing GBLxAPI in to your product.

Estimated Time to Implement to LRS:  40hr or less (your resources – Community organizer Dig-iT! Games can provide assistance through the Google Community Groupand via skype)

Please note that we do not recommend that you do your initial pilot with a production product. Create a copy of the game for the pilot testing and make it accessible to an internal group for testing.  Once you are satisfied with your testing then move to production. 

Ready to get started? Contact us to get your pilot started and all the tools you need to get up and running.

The GBLxAPI standard vocabulary can be used in other products developed outside of the Unity 3D game engine using other APIs in the broader xAPI community.  We did some testing with


© 2024 Dig-iT! Games LLC