I am using AWS Amplify to host an Angular application and using Cognito user pool. I have created a dashboard on Amazon Quicksight for BI purposes. One of the metrics that I want to monitor is how much time a user spend in the application. Obviously I can't calculate the time that the user log out because not many users log out once they are done with the app. Do you have any idea on how I can achieve this metric?
I have contacted AWS support and here their answer:
Currently there is no metric that supports this function to track the login duration time of a user. The only metrics that are currently available for Cognito user pools are as mentioned in this link.
So it seems I can't track session duration using Cognito service. I asked the support whether if I can track it using Amplify service and here is their answer:
Actually AWS Amplify is just a framework that lets you build apps to use AWS Services in the background. Hence, when you use Amplify for authentication it is still using Cognito as the main authentication provider. Amplify has very limited metrics of its own as you can see from this link, however it does not include any metric for session duration.