Right now, our components are mostly used in the console. Our console tracks users with Matomo. Our tracking configuration is minimal (mostly used for browser/OS/device stats). We would like to get more insights on how the console and the components are used to improve our product. This means our components must trigger some kind of signals that can be caught and digested into an anlytics service such as Matomo.
Discussion
Our components should emit some DOM events that can listened to and pushed to Matomo by the console (or any other user)
This means we need to think about those as part of the "designing a component" phase, along with thinking about inputs, outputs, stories, i18n...
Here are examples how what we could have with the <cc-env-var-form> component (depending on the level of details we want):
load-variables to have a reference of how much this component is used
we need the context but do we need the ID of the app, I don't think so
update-variables to know how many users update vs readonly
toggle-mode to know how many people use each mode
display-error-message to know if our error message are useful and displayed
Question A: How do we emit those events?
Do we only have a single DOM event named cc-user-event with a payload for details?
Do we have one DOM event per type of user action?
Do we need to namespace those?
Details
Before going into the details of this discussion, we need to get more familiar with how custom events/actions work in Matomo (and similar tools).
Context
Right now, our components are mostly used in the console. Our console tracks users with Matomo. Our tracking configuration is minimal (mostly used for browser/OS/device stats). We would like to get more insights on how the console and the components are used to improve our product. This means our components must trigger some kind of signals that can be caught and digested into an anlytics service such as Matomo.
Discussion
Here are examples how what we could have with the
<cc-env-var-form>
component (depending on the level of details we want):load-variables
to have a reference of how much this component is usedupdate-variables
to know how many users update vs readonlytoggle-mode
to know how many people use each modedisplay-error-message
to know if our error message are useful and displayedQuestion A: How do we emit those events?
cc-user-event
with a payload for details?Details
Before going into the details of this discussion, we need to get more familiar with how custom events/actions work in Matomo (and similar tools).