Metrics Tracking
Every feature flag that you create can have connected metrics that can be used to track strategic KPIs relating to the feature. These metrics can be used to track the performance of control vs variation in the case of testing rules, and can also be used to measure the impact of personalize and rollout campaigns.
For each feature flag, you need to define at least one "Primary Metric", and you can set up as many secondary metrics as you'd like.
Metrics in FME are based on "Custom Events" that you can create in VWO > Data360>Events. All the custom events created in Data360 will be available to be used as metrics in your feature flags.
Once you have configured custom events as metrics for your feature flag, you can then trigger a conversion for each metric using the following code snippet:
Usage
//Record metric conversions for event:
vwoClient.trackEvent('event-name', userContext);
//Record metric conversions for event with properties:
vwoClient.trackEvent('event-name', userContext, {
userType: "free"
});
trackEvent() Parameters
Parameter | Type | Description |
---|---|---|
event_name Required | String | The unique event name you will see when creating the event in Data360. When the trackEvent() function is called, it will record a metric conversion in VWO for the given event name. |
userContext Required | String | Contains information about the current user, including a required unique identifier for each user. Read more about userContext here . |
eventProperties Optional | Object | any properties of this event that you wish to pass to VWO. E.g: for a "purchase" event, some properties could be "cartValue", "currency", "shippingMethod" etc. These must be passed as key-value pairs, and the property name should exactly match what you set while creating the event in VWO > Data360>Events. |
Updated 4 months ago