Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.89 KB

MetricPost.md

File metadata and controls

40 lines (34 loc) · 1.89 KB

LaunchDarklyApi::MetricPost

Properties

Name Type Description Notes
key String A unique key to reference the metric
name String A human-friendly name for the metric [optional]
description String Description of the metric [optional]
kind String The kind of event your metric will track
selector String One or more CSS selectors. Required for click metrics. [optional]
urls Array<UrlPost> One or more target URLs. Required for click and pageview metrics. [optional]
is_active Boolean Whether to track a conversion when users take an action. Required for custom metrics. Either <code>isActive</code> or <code>isNumeric</code> may be true, but not both. [optional]
is_numeric Boolean Whether to track numeric changes in value against a baseline. Required for custom metrics. Either <code>isActive</code> or <code>isNumeric</code> may be true, but not both. [optional]
unit String The unit of measure. Only for numeric custom metrics. [optional]
event_key String The event name to use in your code. Required for custom metrics. [optional]
success_criteria String Success criteria. Required for numeric custom metrics. [optional]
tags Array<String> Tags for the metric [optional]

Example

require 'launchdarkly_api'

instance = LaunchDarklyApi::MetricPost.new(
  key: example-metric,
  name: Example metric,
  description: optional description,
  kind: custom,
  selector: .dropdown-toggle,
  urls: invalid example,
  is_active: true,
  is_numeric: false,
  unit: orders,
  event_key: sales generated,
  success_criteria: Higher than baseline,
  tags: [&quot;example-tag&quot;]
)