How to do simple tracking of a click with custom INT parameter

  • So all I want to do is track a button click & pass in an INT.
  • The API docs are not clear on this simple use case. I have read them through.
  • Then I just want to be able to grab a list of all clicks with that INT.

e.g Button 1 click -> track INT = 12.

e.g Pull back all clicks with INT = 12

What I’ve tried to do is set up Goals and then use it like this:

So using a Goal Id of 1 from the Matomo system:

_paq.push(['trackGoal', 1, 12);

This works and I can see the ‘12’ logged as revenue in the web system, which is fine.

I just want to be able to pull out the list of tracking items with that ‘revenue’ value, which is really my custom INT id.’.

If this is totally wrong, then please can someone explain a better alternative?