Skip to main content
typos
Source Link
Mawg
  • 9.2k
  • 5
  • 40
  • 91

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comemntcomment, and 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have alogina login screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he naviagetsnavigates away wihtoutwithout logging out might be problematic. This is left as an exercise for the reader ;-)

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comemnt, and 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have alogin screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he naviagets away wihtout logging out might be problematic. This is left as an exercise for the reader ;-)

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comment, and 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have a login screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he navigates away without logging out might be problematic. This is left as an exercise for the reader ;-)

edited body
Source Link
Mawg
  • 9.2k
  • 5
  • 40
  • 91

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comemnt, asnand 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have alogin screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he naviagets away wihtout logging out might be problematic. This is left as an exercise for the reader ;-)

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comemnt, asn 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have alogin screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he naviagets away wihtout logging out might be problematic. This is left as an exercise for the reader ;-)

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comemnt, and 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have alogin screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he naviagets away wihtout logging out might be problematic. This is left as an exercise for the reader ;-)

Source Link
Mawg
  • 9.2k
  • 5
  • 40
  • 91

This is not really answer, since it doesn't recommend any software. However 1) it is too large for a comemnt, asn 2) it tells you how to code what you are asking for.

1. Name of the user logged in.

You already know that right? You have alogin screen where he typed it in, after all. Create a service and tell it about the log in.

2. Which page/route user is on.
3. Time spent on each page.

Each page is a component. Add code to 'ngOnInit()' for each page to tell the service that the user has chanegd page. The service should then start a timer, cancelling any previous timer. You now have the data that you wanted, although length of time on the final page if he naviagets away wihtout logging out might be problematic. This is left as an exercise for the reader ;-)