Hello Adèle,
Happy to chime in!
I'm not knowledgeable about the HTML code you're referring to, but if you need a quick way to track how much time your learners spend on a particular section of your course, you can use Storyline 360's built-in elapsed time variables for that purpose.
You can also follow the instructions here to build advanced xAPI statements which you can then send to your LMS for reporting.
I'm unsure of the best way to track quiz questions that are mostly answered incorrectly, but the information you need to generate this report should be readily available in your LMS's reporting section. I'll let other community members chime in with their own experiences!