Tracking data
Meya supports three modes of tracking data that can be configured depending on what you would like to track and report on.
Tracking entries
As your bot responds to user queries and actions it writes data entries into various ledgers that collectively form the app's storage, or bot's "memory". Some of these ledgers are short lived e.g. http
, log
ledgers, where as other ledgers are long lived e.g. event
, user
, thread
. Internally the Meya platform stores all these entries for a set time period, and you can query these entries from the Logs page in the Meya Console use GridQL.
When you add an analytics integration to your app, you can configure the integration to stream entries to the 3rd party system (see the Segment integration). This can be useful if you would like deeper insights into the bot & user actions, as well as error alerting.
If you have your own analytics & reporting system, you can easily create your own analytics integration to stream data into your own data systems (see the Segment integration code as an example).
Tracking custom events
Tracking custom events is easy with the analytics.track
component.
Here’s an example:
steps:
- track: test.event
data:
foo: bar
This will store an analytics.track
entry on the event ledger with the custom data in it's payload.
The
track
property is the signature field for theanalytics.track
component.
Tracking custom user data
If you have authenticated a user with your own system and established their identity, it's often useful to track this. You can use the analytics.identify
component to track a user, this will then be sent to your analytics integrations such as Segment.
Here’s an example:
steps:
- identify:
foo: bar
The
identify
property is the signature field for theanalytics.identify
component.
This will store and analytics.identify
entry on the event ledger with the custom user data in it's payload.
Updated about 2 years ago