-
Notifications
You must be signed in to change notification settings - Fork 11
Tracking code
The tracking code is provided when the developer
registers a new game (via the front-end) and is used to link a player with a given game version. We use the tracking code to identify the data stored in each collection. Both games and activities have their own tracking codes.
To be able to correctly send data to the collector endpoint you must follow these steps:
- Issue a
POST localhost:3000/api/proxy/gleaner/collector/start/:trackingCode
with the provided tracking code. The response will contain the authorization token (authToken
) needed to identify the following requests. - Issue
POST localhost:3000/api/proxy/gleaner/collector/track
with an authorization header (<Authorization:authToken>
) and your tracking data inside the body of the request following the xAPI statement JSON format.
The rage-analytics tracker automatically issues a request to the collectorHost/start/:trackingCode
in order to receive an authorization token
used to identify the client.
In the game LostInSpace the collectorHost
and the trackingCode
are automatically parsed from this file with the format collectorHost;trackingCode
. This means that in order to set up the trackingCode
all you need to do is edit this file with the value of the collectorHost
provided when registering the server-side application rage-analytics back-end and the trackingCode
provided when creating a new game.
![](https://cloud.githubusercontent.com/assets/19714314/19110239/2886c538-8af9-11e6-94b9-b3b42578cf52.png)
Figure 1.: tracking code for Lost in Space game, obtained from the developer configuration page.
Note that the trackingCode
is obtained by issuing a GET
API call to /api/games/:gameId/versions/:versionId
which returns the following response:
{
"_id": "559a447831b76cec185bf513",
"gameId": "559a447831b7acec185bf513",
"trackingCode": "575acfd9557ab538177a958awbg5le01tzh93sor"
}
- Home
- Game developers Guide
- Analytics developers Guide
- Analytics users Guide
- System Overview
- Tracker
- A2
- Analytics Real-time
- Analytics Front-end
- Analytics Back-end
- Game Storage Server
- Upgrading RAGE Analytics
- Wiki Style Guide