Becky Goldberg demonstrated how to retrieve xAPI data in Storyline in week 12 of the Fall 2022  xAPI cohort. You can access the recording here or here. This is the sample file Becky showed in the session. 

The JavaScript file and wrapper that are needed are located in the resources tab of the player.