Telemetry User Actions
How are the user actions (sign up/sign in/sign out) tracked by our Telemetry components?
Problem
We want to track whenever a Black Diamond user:
Signs In
Signs Out
Signs Up
Solution
Changes in the Database, where the data is stored
A table was added in the Assessment DB. That table is called TelemetryUserAction. It has the following columns:
Id
UserId: The azure user ID used by Microsoft to uniquely identify the user
UserEmail: The email that is present in the Active Directory for the user. This can be null for some users.
Platform: Indicates which platform was the user logged into. It will probably be BDS.
Action: It can be
sign-in
sign-out
sign-up
Timestamp
Endpoints in the Telemetry API
POST
https://api-telemetry-staging.azurewebsites.net/bds/{actionId}
Creates a sign up/sign out/sign up log for the corresponding user.
Path Parameters
Name | Type | Description |
---|---|---|
actionId* | String | The Id for the action performed. It can be sign-up, sign-in or sign-out. |
Query Parameters
Name | Type | Description |
---|---|---|
apiKey* | String | The API Key. Changes depending on the environment. |
Request Body
Name | Type | Description |
---|---|---|
objectId | String | The azure user ID. |
String | The email for the user. |
Calls to the Telemetry API
Sign Up
When a user is created using the BDS user creation endpoint (https://bds.mobilize.net/api/users), a request is sent to the Telemetry API. This request is sent from the backend of the BDS portal. You can review Commit b0471e24 for more information.
Sign In
When a user signs in, the Azure B2C sends a request to the Telemetry API. The code for this request was added in Commit 8b027378. In that commit:
The TelemetryApiUrl environment variable was added to the appsettings.json file.
A technical profile was added (ReportLogin). This technical profile includes the objectId and mail claims in the body of the request.
The User Journey SignUpOrSignIn was overwritten to include the step in which the ReportLogin technical profile is used.
The User Journey SignUpOrSignInWithForgotPassword now includes a step in which the ReportLogin technical profile is used.
Sign Out
When a user signs out, the frontend of the portal sends a request to the backend of the portal. There, the backend retrieves the necessary information and sends the request to the Telemetry API. You can review Commit b0471e24 for more information.
Last updated