STRUCT
Experiment
public struct Experiment: Codable, Equatable
Represents an experiment configuration from the API
Properties
id
public let id: Int
name
public let name: String
type
public let type: String
targetPlatform
public let targetPlatform: String
priority
public let priority: Int
visitorsLimit
public let visitorsLimit: Int
visitorsNow
public let visitorsNow: Int
globalJavascript
public let globalJavascript: String?
globalCss
public let globalCss: String?
deviceType
public let deviceType: String
traficAllocation
public let traficAllocation: Double
exclusive
public let exclusive: String
whereIncluded
public let whereIncluded: [String: [String]]?
whereExcluded
public let whereExcluded: [String: [String]]?
whenRestriction
public let whenRestriction: [String]?
whenTimezone
public let whenTimezone: String?
whenStart
public let whenStart: String?
whenEnd
public let whenEnd: String?
slug
public let slug: String
segment
public let segment: [SegmentCondition]?
variations
public let variations: [String: Variation]?
clicks
public let clicks: [String]?
trackEngagement
public let trackEngagement: Int
trackBounce
public let trackBounce: Int
goalTimeout
public let goalTimeout: Int
Methods
init(id:name:type:targetPlatform:priority:visitorsLimit:visitorsNow:globalJavascript:globalCss:deviceType:traficAllocation:exclusive:whereIncluded:whereExcluded:whenRestriction:whenTimezone:whenStart:whenEnd:slug:segment:variations:clicks:trackEngagement:trackBounce:goalTimeout:)
public init(
id: Int,
name: String,
type: String,
targetPlatform: String,
priority: Int,
visitorsLimit: Int,
visitorsNow: Int,
globalJavascript: String? = nil,
globalCss: String? = nil,
deviceType: String,
traficAllocation: Double,
exclusive: String,
whereIncluded: [String: [String]]? = nil,
whereExcluded: [String: [String]]? = nil,
whenRestriction: [String]? = nil,
whenTimezone: String? = nil,
whenStart: String? = nil,
whenEnd: String? = nil,
slug: String,
segment: [SegmentCondition]? = nil,
variations: [String: Variation]? = nil,
clicks: [String]? = nil,
trackEngagement: Int = 0,
trackBounce: Int = 0,
goalTimeout: Int = 0
)
Public initializer for testing and manual creation
init(from:)
public init(from decoder: Decoder) throws
Parameters
| Name | Description |
|---|---|
| decoder | The decoder to read data from. |