Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 2.89 KB

File metadata and controls

54 lines (48 loc) · 2.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 only. [optional]
urls Array<UrlPost> One or more target URLs. Required for click and pageview metrics only. [optional]
is_numeric Boolean Whether to track numeric changes in value against a baseline (<code>true</code>) or to track a conversion when an end user takes an action (<code>false</code>). Required for custom metrics only. [optional]
unit String The unit of measure. Applicable for numeric custom metrics only. [optional]
event_key String The event key to use in your code. Required for custom conversion/binary and custom numeric metrics only. [optional]
success_criteria String Success criteria. Required for custom numeric metrics, optional for custom conversion metrics. [optional]
tags Array<String> Tags for the metric [optional]
randomization_units Array<String> An array of randomization units allowed for this metric [optional]
maintainer_id String The ID of the member who maintains this metric [optional]
unit_aggregation_type String The method by which multiple unit event values are aggregated [optional]
analysis_type String The method for analyzing metric events [optional]
percentile_value Integer The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>. [optional]
event_default MetricEventDefaultRep [optional]
data_source MetricDataSourceRefRep [optional]
filters EventFilter [optional]

Example

require 'launchdarkly_api'

instance = LaunchDarklyApi::MetricPost.new(
  key: metric-key-123abc,
  name: Example metric,
  description: optional description,
  kind: custom,
  selector: .dropdown-toggle,
  urls: invalid example,
  is_numeric: false,
  unit: orders,
  event_key: Order placed,
  success_criteria: HigherThanBaseline,
  tags: [&quot;example-tag&quot;],
  randomization_units: [&quot;user&quot;],
  maintainer_id: 569fdeadbeef1644facecafe,
  unit_aggregation_type: average,
  analysis_type: mean,
  percentile_value: 95,
  event_default: null,
  data_source: null,
  filters: null
)