Matamo to track events triggered in a browser extension

I am looking to collect statistics about usage of a browser extension we are building. So we want to track how users are interacting with the browser extension.

We want to be able to look at individual usage patterns, but keep this anonymous. So we will generate a unique ID per user that we will attach to all records.

Has anyone done something like this? Any best practices or advice?

It looks like a user ID stored in a cookie, even if it is not coded like a cookie… :wink:
Then give this user ID to Matomo:

  • With JavaScript API, use the setUserId parameter
  • With HTTP API : set the uid parameter
  • With MTM : set the User ID parameter of the Matomo configuration variable thanks to some datalayer variable