-
Notifications
You must be signed in to change notification settings - Fork 1
Analytics
{
"id": "8760E02A-9ED8-4523-A512-B9F4AAD6227B",
"userID": "31505184-3148-4726-BB6E-5EF93671FD89",
"date":"2023-02-12T19:36:11Z",
"clientPlatform": "ios",
"clientPlatformVersion": "16.3",
"appVersion": "1.6",
"boardBusCount": 11,
"userSettings": {
"colorTheme": "dark",
"colorBlindMode": false,
"debugMode": false,
"logging": true,
"maximumStopDistance": 70,
"serverBaseURL": "https://staging.shuttletracker.app"
},
"eventType": {
"locationAuthorizationStatusDidChange": {
"authorizationStatus": 2
}
}
}{
"id": "8760E02A-9ED8-4523-A512-B9F4AAD6227B",
"userID": "31505184-3148-4726-BB6E-5EF93671FD89",
"date":"2023-02-12T19:36:11Z",
"clientPlatform": "macos",
"clientPlatformVersion": "13.2",
"appVersion": "1.6",
"userSettings": {
"colorTheme": "dark",
"colorBlindMode": false,
"logging": true,
"serverBaseURL": "https://staging.shuttletracker.app"
},
"eventType": {
"announcementsListOpened": { }
}
}{
"id": "500349CC-2FC5-41FD-AE0D-E02A24287BAE",
"userID": "D108F485-163A-4E97-B73A-BEAF6A12A08C",
"date":"2023-02-12T19:36:11Z",
"clientPlatform": "android",
"clientPlatformVersion": "12.0",
"appVersion": "1.2",
"boardBusCount": 11,
"userSettings": {
"colorTheme": "dark",
"colorBlindMode": false,
"logging": true,
"serverBaseURL": "https://staging.shuttletracker.app"
},
"eventType": {
"colorBlindModeToggled": {
"enabled": false
}
}
}{
"id": "1B5F75D8-1A28-4906-9042-AB6F0421D784",
"date":"2023-02-12T19:36:11Z",
"clientPlatform": "web",
"clientPlatformVersion": "Safari",
"userSettings": {
"colorTheme": "dark",
"colorBlindMode": false,
"serverBaseURL": "https://staging.shuttletracker.app"
},
"eventType": {
"colorBlindModeToggled": {
"enabled": false
}
}
}The "id" property should be a universally unique identifier (UUID) that’s unique per submission.
The "userID" property should be a UUID that’s unique per user. To support privacy features and to account for users who might use Shuttle Tracker across different platforms, the user identifier is unstable—i.e., it approximates a specific human user but is not guaranteed to remain the same as that user uses privacy features or moves across different client platforms. It can be null or omitted entirely if there is no consistent user identity at all on a particular platform (such as Web).
The "date" property should be a timestamp as of the submission of the analytics entry. It should be formatted as an ISO-8601 string. If the time zone is omitted, then it should represent the default UTC time zone.
The "clientPlatform" property should be one of the following:
"ios""macos""android""web"
The "clientPlatformVersion" property should be a client platform version string that’s consistently formatter per platform across different analytics submissions. For native clients, it should be the OS version string (e.g., “15.3.1” on iOS). For Web clients, it should be the brand name of the user’s Web browser with no version information (e.g., “Safari”). It can be null or omitted entirely if the OS version (or browser brand name) can’t be detected.
The "appVersion" property should be an app version string (for the Shuttle Tracker app) that’s consistently formatter per platform across different analytics submissions. It can be null or omitted entirely if Shuttle Tracker doesn’t have a specific version string on a particular platform (such as Web).
The "boardBusCount" property should be the number of times that the user has used Board Bus so far since the last analytics submission for the relevant user. Clients should maintain a local counter that’s incremented every time Board Bus is activated (either manually or automatically). When an analytics submission is triggered, the local counter should be reset to zero.
The "userSettings" property should be an object of the following form:
{
"colorTheme": "dark",
"colorBlindMode": false,
"debugMode": false,
"logging": true,
"maximumStopDistance": 70,
"serverBaseURL": "https://staging.shuttletracker.app"
}The "colorTheme" property should be either "light" or "dark". All of these properties can be null or omitted entirely if they’re not applicable or simply unknown.
The "eventType" property should be an object with a single nested key-value pair that describes the event that triggered the analytics submission. The key of that nested key-value pair should be the name of the event type, and the value should be another nested object that contains the event payload. The name of the event type should be one of the following:
"coldLaunch""boardBusTapped""leaveBusTapped""boardBusActivated""boardBusDeactivated""busSelectionCanceled""announcementsListOpened""announcementViewed""permissionsSheetOpened""networkToastPermissionsTapped""colorBlindModeToggled""debugModeToggled""serverBaseURLChanged""locationAuthorizationStatusDidChange""locationAccuracyAuthorizationDidChange"
Most of these event types should have empty payloads, which are represented as an empty JSON dictionary { }. The event types that do require nonempty payloads should be structured as follows:
The payload should have a single Boolean property "manual" that indicates whether Board Bus was activated manually ("true") or automatically ("false").
"boardBusActivated": {
"manual": true
}The payload should have a single Boolean property "manual" that indicates whether Board Bus was activated manually ("true") or automatically ("false").
"boardBusDeactivated": {
"manual": true
}The payload should have a single UUID property "id" with the identifier of the announcement that the user viewed.
"announcementViewed": {
"id": "0842BA4B-2CF3-4EDA-8CBC-9277E13E82AE"
}The payload should have a single Boolean property "enabled" that indicates whether Color-Blind Mode is enabled after the user toggled the setting.
"colorBlindModeToggled": {
"enabled": false
}The payload should have a single Boolean property "enabled" that indicates whether Debug Mode is enabled after the user toggled the setting.
"debugModeToggled": {
"enabled": false
}The payload should have a single URL property "url" with the server base URL after the user changed the setting.
"serverBaseURLChanged": {
"url": "https://staging.shuttletracker.app"
}The payload should have a single integer property "authorizationStatus" with an integer that represents the new authorization status. The available options are as follows:
-
0: Not determined -
1: Restricted -
2: Denied -
3: Authorized always -
4: Authorized when in use
"locationAuthorizationStatusDidChange": {
"authorizationStatus": 2
}The payload should have a single integer property "accuracyAuthorization" with an integer that represents the new accuracy authorization. The available options are as follows:
-
0: Full accuracy -
1: Reduced accuracy
"locationAccuracyAuthorizationDidChange": {
"accuracyAuthorization": 1
}