ipfs-shipyard / ignite-metrics

Metrics consent and client provider library for ipfs/ipfs-gui team (i.e. IPFS Ignite). See ipfs/ipfs-gui#129 for more details
Other
3 stars 3 forks source link

Explore possibility of creating user sessions with custom data. #87

Open whizzzkid opened 1 year ago

whizzzkid commented 1 year ago

Example: https://github.com/Countly/countly-sdk-nodejs/blob/master/examples/bulk_import_example.js#L20

The interface for ignite-metrics can be exposed such that we should allow tracking events against a unique identifier/deviceId.

The change could look like:

const metrics = new MetricsProvider({
  ...,
  deviceDetail: {
    deviceId: <device_id>,
    os: <os>,
    arch: <arch>,
    appVersion: <version>,
    additionalDetails: <overload>
  }
})

This will then call the add_user method and set the user_details and return an instance of the user instead of countly.