@@ -117,6 +117,8 @@ def create_metric_groups(self):
117
117
print ("Creating metric groups:" )
118
118
print (" - Store Purchases Metric Group" )
119
119
self .metgroup_store_purchases ()
120
+ print (" - Shorten Collection Page Metric Group" )
121
+ self .metgroup_shorten_collection_page ()
120
122
print ("Done" )
121
123
self .metric_groups_created = True
122
124
@@ -142,14 +144,14 @@ def create_flags(self):
142
144
self .flag_api_guarded_release ()
143
145
#print(" - C1 - Experiment: AI Models for Chatbot")
144
146
#self.flag_exp_chatbot_ai_models()
147
+ print (" - D1 - Feature Experiment: Suggested Items Carousel" )
148
+ self .flag_exp_suggestions_carousel ()
145
149
print (" - D1 - Funnel Experiment: Promotion Banner" )
146
150
self .flag_exp_promotion_banner ()
147
- print (" - D2 - Feature Experiment: Suggested Items Carousel" )
148
- self .flag_exp_suggestions_carousel ()
149
- print (" - D3 - Funnel Experiment: New Shorten Collection Page" )
150
- self .flag_exp_shorten_collections_page ()
151
- print (" - D4 - Feature Experiment: New Search Engine" )
151
+ print (" - D3 - Feature Experiment: New Search Engine" )
152
152
self .flag_exp_new_search_engine ()
153
+ print (" - D4 - Funnel Experiment: New Shorten Collection Page" )
154
+ self .flag_exp_shorten_collections_page ()
153
155
print (" - E1 - Migration: Database (Migration Tool)" )
154
156
self .flag_database_migration ()
155
157
@@ -358,7 +360,7 @@ def run_ecommerce_shorten_collection_funnel_experiment(self):
358
360
359
361
def create_ecommerce_shorten_collection_funnel_experiment (self ):
360
362
metrics = [
361
- self .ldproject .exp_metric ("shorten-collection-page-increase-conversation- metric-group" , True ), #TODO: need to get metric key for metric group for shorten collection
363
+ self .ldproject .exp_metric ("shorten-collection-page-metric-group" , True ),
362
364
self .ldproject .exp_metric ("in-cart-total-price" , False )
363
365
]
364
366
res = self .ldproject .create_experiment (
@@ -444,13 +446,29 @@ def create_togglebank_ai_config_experiment(self):
444
446
##################################################
445
447
# Create all the experiment holdouts
446
448
447
- # def create_and_run_experiments(self):
448
- # self.run_ecommerce_collection_banner_funnel_experiment()
449
- # self.run_ecommerce_upsell_component_feature_experiment()
450
- # self.run_ecommerce_shorten_collection_funnel_experiment()
451
- # self.run_ecommerce_new_search_engine_feature_experiment()
452
- # self.run_togglebank_ai_config_experiment()
453
-
449
+ def create_and_run_holdout (self ):
450
+ self .run_q4_increase_incart_price_holdout ()
451
+
452
+ def run_q4_increase_incart_price_holdout (self ):
453
+ metrics = [
454
+ {
455
+ "key" : "in-cart-total-price" ,
456
+ "isGroup" : False ,
457
+ "primary" : True
458
+ }
459
+ ]
460
+ res = self .ldproject .create_holdout (
461
+ self = self ,
462
+ holdout_key = "q-4-increase-average-total-in-cart-price" ,
463
+ holdout_name = "Q4 Increase Average Total Incart Price" ,
464
+ holdout_env_key = "production" ,
465
+ description = "This holdout is to see if the new experiments will increase average total cart price and overall revenue." ,
466
+ metrics = metrics ,
467
+ primary_metric_key = "in-cart-total-price" ,
468
+ randomization_unit = "users" ,
469
+ attributes = ["tier" ],
470
+ prerequisiteflagkey = "release-new-search-engine"
471
+ )
454
472
############################################################################################################
455
473
456
474
##################################################
@@ -461,7 +479,7 @@ def create_togglebank_ai_config_experiment(self):
461
479
##################################################
462
480
# Create all the experiment layers
463
481
464
- # def create_and_run_experiments (self):
482
+ # def create_and_run_layer (self):
465
483
# self.run_ecommerce_collection_banner_funnel_experiment()
466
484
# self.run_ecommerce_upsell_component_feature_experiment()
467
485
# self.run_ecommerce_shorten_collection_funnel_experiment()
@@ -754,6 +772,18 @@ def metric_store_checkout_completed(self):
754
772
success_criteria = "HigherThanBaseline" ,
755
773
tags = ["experiment" ]
756
774
)
775
+
776
+ def metric_search_engine (self ):
777
+ res = self .ldproject .create_metric (
778
+ "search-engine-add-to-cart" ,
779
+ "New Search Engine Add To Cart is Clicked" ,
780
+ "search-engine-add-to-cart" ,
781
+ "This metric will track the number of times the new add to cart button within the new search engine is clicked." ,
782
+ numeric = False ,
783
+ unit = "" ,
784
+ success_criteria = "HigherThanBaseline" ,
785
+ tags = ["experiment" ]
786
+ )
757
787
758
788
############################################################################################################
759
789
@@ -989,6 +1019,19 @@ def metgroup_store_purchases(self):
989
1019
description = "This metric group will track the store purchases" ,
990
1020
)
991
1021
1022
+ def metgroup_shorten_collection_page (self ):
1023
+ res = self .ldproject .create_metric_group (
1024
+ "shorten-collection-page-metric-group" ,
1025
+ "Shorten Collection Page Metric Group" ,
1026
+ [
1027
+ {"key" : "item-added" , "nameInGroup" : "1" },
1028
+ {"key" : "cart-accessed" , "nameInGroup" : "2" },
1029
+ {"key" : "customer-checkout" , "nameInGroup" : "3" },
1030
+ ],
1031
+ kind = "funnel" ,
1032
+ description = "This metric group will track the store purchases relating to the new shorten collection page." ,
1033
+ )
1034
+
992
1035
993
1036
############################################################################################################
994
1037
@@ -1169,7 +1212,7 @@ def flag_exp_chatbot_ai_models(self):
1169
1212
def flag_exp_promotion_banner (self ):
1170
1213
res = self .ldproject .create_flag (
1171
1214
"storeAttentionCallout" ,
1172
- "D1 - Funnel Experiment: Promotion Banner" ,
1215
+ "D2 - Funnel Experiment: Promotion Banner" ,
1173
1216
"Releasing New Collection Promotion Banner for the Galaxy Marketplace" ,
1174
1217
[
1175
1218
{
@@ -1193,7 +1236,7 @@ def flag_exp_promotion_banner(self):
1193
1236
def flag_exp_suggestions_carousel (self ):
1194
1237
res = self .ldproject .create_flag (
1195
1238
"cartSuggestedItems" ,
1196
- "D2 - Feature Experiment: Suggested Items Carousel" ,
1239
+ "D1 - Feature Experiment: Suggested Items Carousel" ,
1197
1240
"Releasing New Suggested Items Carousel Component for the cart component in Galaxy Marketplace" ,
1198
1241
[
1199
1242
{
0 commit comments