You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/Abtesting/Models/ABTest.swift
+17-20Lines changed: 17 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -7,35 +7,26 @@ import Foundation
7
7
#endif
8
8
9
9
publicstructABTest:Codable,JSONEncodable{
10
-
/// Unique A/B test ID.
10
+
/// Unique A/B test identifier.
11
11
publicvarabTestID:Int
12
-
/// [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance)
13
-
/// based on click data. A value of 0.95 or over is considered to be _significant_.
14
12
publicvarclickSignificance:Double?
15
-
/// [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance)
16
-
/// based on conversion. A value of 0.95 or over is considered to be _significant_.
17
13
publicvarconversionSignificance:Double?
18
-
/// [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance)
19
-
/// based on add-to-cart data. A value of 0.95 or over is considered to be _significant_.
20
14
publicvaraddToCartSignificance:Double?
21
-
/// [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance)
22
-
/// based on purchase data. A value of 0.95 or over is considered to be _significant_.
23
15
publicvarpurchaseSignificance:Double?
24
-
/// [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance)
25
-
/// based on revenue data. A value of 0.95 or over is considered to be _significant_.
26
16
publicvarrevenueSignificance:[String:Double]?
27
-
/// Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
17
+
/// Date and time when the A/B test was last updated, in RFC 3339 format.
28
18
publicvarupdatedAt:String
29
-
/// Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
19
+
/// Date and time when the A/B test was created, in RFC 3339 format.
30
20
publicvarcreatedAt:String
31
-
/// End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
21
+
/// End date and time of the A/B test, in RFC 3339 format.
32
22
publicvarendAt:String
33
23
/// A/B test name.
34
24
publicvarname:String
35
-
/// A/B test status.
36
-
publicvarstatus:String
37
-
/// A/B test variants.
25
+
publicvarstatus:AbtestingStatus
26
+
/// A/B test variants. The first variant is your _control_ index, typically your production index. The second
27
+
/// variant is an index with changed settings that you want to test against the control.
38
28
publicvarvariants:[Variant]
29
+
publicvarconfiguration:ABTestConfiguration?
39
30
40
31
publicinit(
41
32
abTestID:Int,
@@ -48,8 +39,9 @@ public struct ABTest: Codable, JSONEncodable {
48
39
createdAt:String,
49
40
endAt:String,
50
41
name:String,
51
-
status:String,
52
-
variants:[Variant]
42
+
status:AbtestingStatus,
43
+
variants:[Variant],
44
+
configuration:ABTestConfiguration?=nil
53
45
){
54
46
self.abTestID = abTestID
55
47
self.clickSignificance = clickSignificance
@@ -63,6 +55,7 @@ public struct ABTest: Codable, JSONEncodable {
0 commit comments