Track dynamic values

I’m developing a quiz app and would like to track if a user has answered a question correctly. So let’s say a user clicks on an answer and it sends something like “questionID123:correct” or “questionID456:false”. In my backend I could then filter out these values and show stats about each question, i.e. “Question 4 in Quiz 1 was answered correctly 64% of the time”.

I can’t create a custom dimension for each question because each quiz contains at least 20 questions with 4 answers and they’re added via a custom CMS.
Sending the data after the quiz was finished also doesn’t work because of the 255 character limit.

Is there any way to make this work with Piwik?

Thanks in advance
Tim

Hi Tim, maybe using Events would work for you? Event Tracking - Analytics Platform - Matomo Haven’t thought in detail but hope this’ll work for you :thumbsup:

Thanks for the fast reply. It seems to work at first glance. Is there a limit on how many event names you can use?

I’m using this code now:

_paq.push(['trackEvent', 'Question', 'answered', questionId, answeredCorrectly]);

Where answeredCorrectly is an int with the value 100 if it was answered correctly and 0 if not. That way I can get the average directly.