xAPI statements are built into PRODUCER's publishing engine. So when you publish an experience using the the xAPI publishing option, xAPI statements will be generated and sent to your chosen LRS automatically.
xAPI Triggers
Below is a summary of the activities that trigger an xAPI statement:
Launches/Opens
launching an experience/module
opening a link
opening a document
starting to play a video
Completions
completion of a screen
playing a video to the end
completion of a bite
completion of a module
Question Responses and Scores
answering a question correctly
answering a question incorrectly
answering a reflective question
answering a short response question
recording a score for an experience/module
recording a score for a primary metric for an experience/module
recording a score for a secondary metric for an experience/module