Skip to content

Commit b5ec541

Browse files
cdhawkeshortcuts
andauthored
feat(specs): revenue and filterEffects typing updates (#2105)
Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
1 parent 19cac10 commit b5ec541

File tree

3 files changed

+125
-9
lines changed

3 files changed

+125
-9
lines changed

specs/abtesting/common/parameters.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,75 @@ trafficPercentage:
4848
type: integer
4949
description: A/B test traffic percentage.
5050
example: 60
51+
52+
currencies:
53+
type: object
54+
description: A/B test currencies.
55+
example:
56+
USD:
57+
currency: USD
58+
revenue: 120.0
59+
mean: 53.7
60+
standardDeviation: 12.3
61+
EUR:
62+
currency: EUR
63+
revenue: 100.0
64+
mean: 43.7
65+
standardDeviation: 10.3
66+
additionalProperties:
67+
type: object
68+
properties:
69+
currency:
70+
type: string
71+
description: Currency code.
72+
example: 'USD'
73+
revenue:
74+
type: number
75+
format: double
76+
description: Revenue for this currency.
77+
example: 120.0
78+
mean:
79+
type: number
80+
format: double
81+
description: Mean for this currency.
82+
example: 53.7
83+
standardDeviation:
84+
type: number
85+
format: double
86+
description: Standard deviation for this currency.
87+
example: 12.3
88+
89+
filterEffects:
90+
type: object
91+
description: A/B test filter effects resulting from configuration settings.
92+
properties:
93+
outliers:
94+
type: object
95+
description: Outliers removed from the A/B test as a result of configuration settings.
96+
example:
97+
usersCount: 1
98+
trackedSearchesCount: 237
99+
properties:
100+
usersCount:
101+
type: integer
102+
description: Number of users removed from the A/B test.
103+
example: 1
104+
trackedSearchesCount:
105+
type: integer
106+
description: Number of tracked searches removed from the A/B test.
107+
example: 237
108+
emptySearch:
109+
type: object
110+
description: Empty searches removed from the A/B test as a result of configuration settings.
111+
example:
112+
usersCount: 1
113+
trackedSearchesCount: 237
114+
properties:
115+
usersCount:
116+
type: integer
117+
description: Number of users removed from the A/B test.
118+
example: 1
119+
trackedSearchesCount:
120+
type: integer
121+
description: Number of tracked searches removed from the A/B test.
122+
example: 237

specs/abtesting/common/schemas/ABTest.yml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,35 @@ ABTest:
2121
format: double
2222
description: >
2323
[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) based on conversion. A value of 0.95 or over is considered to be _significant_.
24-
$ref: '../parameters.yml#/endAt'
24+
example: 1
25+
addToCartSignificance:
26+
type: number
27+
format: double
28+
description: >
29+
[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) based on add-to-cart data. A value of 0.95 or over is considered to be _significant_.
30+
example: 1
31+
purchaseSignificance:
32+
type: number
33+
format: double
34+
description: >
35+
[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) based on purchase data. A value of 0.95 or over is considered to be _significant_.
36+
example: 1
37+
revenueSignificance:
38+
type: object
39+
additionalProperties:
40+
type: number
41+
format: double
42+
description: >
43+
[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) based on revenue data. A value of 0.95 or over is considered to be _significant_.
44+
example:
45+
USD: 1
46+
EUR: 0.87
2547
updatedAt:
2648
$ref: '../parameters.yml#/updatedAt'
2749
createdAt:
2850
$ref: '../parameters.yml#/createdAt'
51+
endAt:
52+
$ref: '../parameters.yml#/endAt'
2953
name:
3054
$ref: '../parameters.yml#/name'
3155
status:
@@ -42,5 +66,8 @@ ABTest:
4266
- updatedAt
4367
- conversionSignificance
4468
- clickSignificance
69+
- purchaseSignificance
70+
- addToCartSignificance
71+
- revenueSignificance
4572
- abTestID
4673
- variants

specs/abtesting/common/schemas/Variant.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ variant:
88
type: object
99
additionalProperties: false
1010
properties:
11+
addToCartCount:
12+
type: integer
13+
description: Number of add-to-cart events for this variant.
14+
example: 0
15+
addToCartRate:
16+
type: number
17+
format: double
18+
description: Variant's [add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate).
19+
example: 0.0
1120
averageClickPosition:
1221
type: integer
1322
description: Variant's [average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position).
@@ -30,22 +39,27 @@ variant:
3039
format: double
3140
description: Variant's [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
3241
example: 0.14546725846658964
42+
currencies:
43+
$ref: '../parameters.yml#/currencies'
3344
description:
3445
$ref: '../parameters.yml#/description'
46+
filterEffects:
47+
$ref: '../parameters.yml#/filterEffects'
3548
index:
3649
$ref: '../parameters.yml#/index'
3750
noResultCount:
3851
type: integer
3952
description: Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for that variant.
4053
example: 0
41-
outlierTrackedSearchesCount:
54+
purchaseCount:
4255
type: integer
43-
description: Number of tracked searches attributed to [outlier traffic](https://www.algolia.com/doc/guides/ab-testing/how-to-read-your-a-b-test-results/#is-the-split-off) that were removed from the A/B test. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
44-
example: 0
45-
outlierUsersCount:
46-
type: integer
47-
description: Number of users attributed to [outlier traffic](https://www.algolia.com/doc/guides/ab-testing/how-to-read-your-a-b-test-results/#is-the-split-off) that were removed from the A/B test.
56+
description: Number of purchase events for this variant.
4857
example: 0
58+
purchaseRate:
59+
type: number
60+
format: double
61+
description: Variant's [purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate).
62+
example: 0.0
4963
searchCount:
5064
type: integer
5165
description: Number of searches carried out during the A/B test.
@@ -71,5 +85,8 @@ variant:
7185
- clickThroughRate
7286
- clickCount
7387
- averageClickPosition
74-
- outlierUsersCount
75-
- outlierTrackedSearchesCount
88+
- currencies
89+
- addToCartRate
90+
- addToCartCount
91+
- purchaseRate
92+
- purchaseCount

0 commit comments

Comments
 (0)