Javascript APM for collecting frontend metrics

Hi, I'm trying to collect metrics on the frontend like increment a metric whenever a user performs an action. My question is this: is the rum-agent meant for this use case or is there something more suitable? The reason I ask is because the example and API make it seem like Transaction is only for measuring time. If I were to collect metrics this way, I think I would just start the transaction, add the appropriate tags, and then end it right away.