Retrieve user interaction analytics from custom Animate interactive

How do I link user interactions in a custom Adobe Animate interactive to report metrics such as time spent on a screen and which assets and buttons students are interacting with to Captivate’s analytics reporting system?