vwo-sdk 1.6.0 → 1.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vwo/constants.rb +29 -4
- data/lib/vwo/core/bucketer.rb +1 -1
- data/lib/vwo/core/variation_decider.rb +158 -40
- data/lib/vwo/enums.rb +30 -5
- data/lib/vwo/logger.rb +1 -1
- data/lib/vwo/schemas/settings_file.rb +32 -2
- data/lib/vwo/services/batch_events_dispatcher.rb +110 -0
- data/lib/vwo/services/batch_events_queue.rb +175 -0
- data/lib/vwo/services/event_dispatcher.rb +1 -13
- data/lib/vwo/services/hooks_manager.rb +36 -0
- data/lib/vwo/services/operand_evaluator.rb +1 -1
- data/lib/vwo/services/segment_evaluator.rb +1 -1
- data/lib/vwo/services/settings_file_manager.rb +8 -4
- data/lib/vwo/services/settings_file_processor.rb +6 -1
- data/lib/vwo/services/usage_stats.rb +29 -0
- data/lib/vwo/user_storage.rb +1 -1
- data/lib/vwo/utils/campaign.rb +108 -1
- data/lib/vwo/utils/custom_dimensions.rb +26 -3
- data/lib/vwo/utils/feature.rb +3 -1
- data/lib/vwo/utils/function.rb +1 -1
- data/lib/vwo/utils/impression.rb +58 -7
- data/lib/vwo/utils/request.rb +15 -1
- data/lib/vwo/utils/segment.rb +1 -1
- data/lib/vwo/utils/uuid.rb +1 -1
- data/lib/vwo/utils/validations.rb +85 -1
- data/lib/vwo.rb +575 -203
- metadata +35 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '084660e0c3fcb3c07826944ba8d83988711b59165ea54a54b1e47042a889bbf5'
|
4
|
+
data.tar.gz: 62c4ae889870a381d2973967412f0916baa0d25ce377604aa096c5f4dd0a8e79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67fd788b416ac54e9d27999ca757662eb88a123a804ccf3c93538e58787a3fd1181686543a7abdbb94dbd7d66f5d1c63421ae21d1b3e794b93cff6951355fdd2
|
7
|
+
data.tar.gz: 7950a38da6e5993575ff46e1c1ba2f901d98fa4112e54070297c78846e2b29eacdae4042c51d03f1e9e8b05d55aa4e60b698fa70af43c7d1ae2167953aaaec6c
|
data/lib/vwo/constants.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2019-
|
1
|
+
# Copyright 2019-2021 Wingify Software Pvt. Ltd.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -26,20 +26,29 @@ class VWO
|
|
26
26
|
HTTP_PROTOCOL = 'http://'
|
27
27
|
HTTPS_PROTOCOL = 'https://'
|
28
28
|
URL_NAMESPACE = '6ba7b811-9dad-11d1-80b4-00c04fd430c8'
|
29
|
-
SDK_VERSION = '1.
|
29
|
+
SDK_VERSION = '1.16.0'
|
30
30
|
SDK_NAME = 'ruby'
|
31
|
+
VWO_DELIMITER = '_vwo_'
|
32
|
+
MAX_EVENTS_PER_REQUEST = 5000
|
33
|
+
MIN_EVENTS_PER_REQUEST = 1
|
34
|
+
DEFAULT_EVENTS_PER_REQUEST = 100
|
35
|
+
DEFAULT_REQUEST_TIME_INTERVAL = 600 # 10 * 60(secs) = 600 secs i.e. 10 minutes
|
36
|
+
MIN_REQUEST_TIME_INTERVAL = 2
|
31
37
|
|
32
38
|
module ENDPOINTS
|
33
39
|
BASE_URL = 'dev.visualwebsiteoptimizer.com'
|
34
|
-
|
40
|
+
SETTINGS_URL = '/server-side/settings'
|
41
|
+
WEBHOOK_SETTINGS_URL = '/server-side/pull'
|
35
42
|
TRACK_USER = '/server-side/track-user'
|
36
43
|
TRACK_GOAL = '/server-side/track-goal'
|
37
44
|
PUSH = '/server-side/push'
|
45
|
+
BATCH_EVENTS = '/server-side/batch-events'
|
38
46
|
end
|
39
47
|
|
40
48
|
module EVENTS
|
41
49
|
TRACK_USER = 'track-user'
|
42
50
|
TRACK_GOAL = 'track-goal'
|
51
|
+
PUSH = 'push'
|
43
52
|
end
|
44
53
|
|
45
54
|
module DATATYPE
|
@@ -59,13 +68,27 @@ class VWO
|
|
59
68
|
INTEGER = 'integer'
|
60
69
|
DOUBLE = 'double'
|
61
70
|
BOOLEAN = 'boolean'
|
71
|
+
JSON = 'json'
|
72
|
+
end
|
73
|
+
|
74
|
+
module Hooks
|
75
|
+
DECISION_TYPES = {
|
76
|
+
'CAMPAIGN_DECISION' => 'CAMPAIGN_DECISION'
|
77
|
+
}
|
62
78
|
end
|
63
79
|
|
64
80
|
RUBY_VARIABLE_TYPES = {
|
65
81
|
'string' => [String],
|
66
82
|
'integer' => [Integer],
|
67
83
|
'double' => [Float],
|
68
|
-
'boolean' => [TrueClass, FalseClass]
|
84
|
+
'boolean' => [TrueClass, FalseClass],
|
85
|
+
'json' => [Hash]
|
86
|
+
}
|
87
|
+
|
88
|
+
GOAL_TYPES = {
|
89
|
+
'REVENUE' => 'REVENUE_TRACKING',
|
90
|
+
'CUSTOM' => 'CUSTOM_GOAL',
|
91
|
+
'ALL' => 'ALL'
|
69
92
|
}
|
70
93
|
|
71
94
|
module ApiMethods
|
@@ -75,6 +98,8 @@ class VWO
|
|
75
98
|
IS_FEATURE_ENABLED = 'is_feature_enabled'
|
76
99
|
GET_FEATURE_VARIABLE_VALUE = 'get_feature_variable_value'
|
77
100
|
PUSH = 'push'
|
101
|
+
GET_AND_UPDATE_SETTINGS_FILE = 'get_and_update_settings_file'
|
102
|
+
FLUSH_EVENTS = 'flush_events'
|
78
103
|
end
|
79
104
|
|
80
105
|
module PushApi
|
data/lib/vwo/core/bucketer.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2019-
|
1
|
+
# Copyright 2019-2021 Wingify Software Pvt. Ltd.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -18,15 +18,20 @@ require_relative '../utils/campaign'
|
|
18
18
|
require_relative '../services/segment_evaluator'
|
19
19
|
require_relative '../utils/validations'
|
20
20
|
require_relative 'bucketer'
|
21
|
+
require_relative '../constants'
|
22
|
+
require_relative '../services/hooks_manager'
|
23
|
+
require_relative '../utils/uuid'
|
21
24
|
|
22
25
|
class VWO
|
23
26
|
module Core
|
24
27
|
class VariationDecider
|
25
|
-
attr_reader :user_storage_service
|
28
|
+
attr_reader :user_storage_service, :has_stored_variation, :hooks_manager
|
26
29
|
|
27
30
|
include VWO::Enums
|
28
31
|
include VWO::Utils::Campaign
|
29
32
|
include VWO::Utils::Validations
|
33
|
+
include VWO::CONSTANTS
|
34
|
+
include VWO::Utils::UUID
|
30
35
|
|
31
36
|
FILE = FileNameEnum::VariationDecider
|
32
37
|
|
@@ -34,12 +39,13 @@ class VWO
|
|
34
39
|
# @param[Hash] - Settings file
|
35
40
|
# @param[Class] - Class instance having the capability of
|
36
41
|
# get and save.
|
37
|
-
def initialize(settings_file, user_storage_service = nil)
|
42
|
+
def initialize(settings_file, user_storage_service = nil, options = {})
|
38
43
|
@logger = VWO::Logger.get_instance
|
39
44
|
@user_storage_service = user_storage_service
|
40
45
|
@bucketer = VWO::Core::Bucketer.new
|
41
46
|
@settings_file = settings_file
|
42
47
|
@segment_evaluator = VWO::Services::SegmentEvaluator.new
|
48
|
+
@hooks_manager = VWO::Services::HooksManager.new(options)
|
43
49
|
end
|
44
50
|
|
45
51
|
# Returns variation for the user for the passed campaign-key
|
@@ -51,14 +57,42 @@ class VWO
|
|
51
57
|
# @param[String] :user_id The unique ID assigned to User
|
52
58
|
# @param[Hash] :campaign Campaign hash itself
|
53
59
|
# @param[String] :campaign_key The unique ID of the campaign passed
|
60
|
+
# @param[String] :goal_identifier The unique campaign's goal identifier
|
54
61
|
# @return[String,String] ({variation_id, variation_name}|Nil): Tuple of
|
55
62
|
# variation_id and variation_name if variation allotted, else nil
|
56
63
|
|
57
|
-
def get_variation(user_id, campaign, api_name, campaign_key, custom_variables = {}, variation_targeting_variables = {})
|
64
|
+
def get_variation(user_id, campaign, api_name, campaign_key, custom_variables = {}, variation_targeting_variables = {}, goal_identifier = '')
|
58
65
|
campaign_key ||= campaign['key']
|
59
66
|
|
60
67
|
return unless campaign
|
61
68
|
|
69
|
+
@has_stored_variation = false
|
70
|
+
decision = {
|
71
|
+
:campaign_id => campaign['id'],
|
72
|
+
:campaign_key => campaign_key,
|
73
|
+
:campaign_type => campaign['type'],
|
74
|
+
# campaign segmentation conditions
|
75
|
+
:custom_variables => custom_variables,
|
76
|
+
# event name
|
77
|
+
:event => Hooks::DECISION_TYPES['CAMPAIGN_DECISION'],
|
78
|
+
# goal tracked in case of track API
|
79
|
+
:goal_identifier => goal_identifier,
|
80
|
+
# campaign whitelisting flag
|
81
|
+
:is_forced_variation_enabled => campaign['isForcedVariationEnabled'] ? campaign['isForcedVariationEnabled'] : false,
|
82
|
+
:sdk_version => SDK_VERSION,
|
83
|
+
# API name which triggered the event
|
84
|
+
:source => api_name,
|
85
|
+
# Passed in API
|
86
|
+
:user_id => user_id,
|
87
|
+
# Campaign Whitelisting conditions
|
88
|
+
:variation_targeting_variables => variation_targeting_variables,
|
89
|
+
:is_user_whitelisted => false,
|
90
|
+
:from_user_storage_service => false,
|
91
|
+
:is_feature_enabled => true,
|
92
|
+
# VWO generated UUID based on passed UserId and Account ID
|
93
|
+
:vwo_user_id => generator_for(user_id, @settings_file['accountId'])
|
94
|
+
}
|
95
|
+
|
62
96
|
if campaign['isForcedVariationEnabled']
|
63
97
|
variation = evaluate_whitelisting(
|
64
98
|
user_id,
|
@@ -88,6 +122,19 @@ class VWO
|
|
88
122
|
)
|
89
123
|
)
|
90
124
|
|
125
|
+
if variation
|
126
|
+
if campaign['type'] == CampaignTypes::VISUAL_AB || campaign['type'] == CampaignTypes::FEATURE_TEST
|
127
|
+
decision[:variation_name] = variation['name']
|
128
|
+
decision[:variation_id] = variation['id']
|
129
|
+
if campaign['type'] == CampaignTypes::FEATURE_TEST
|
130
|
+
decision[:is_feature_enabled] = variation['isFeatureEnabled']
|
131
|
+
elsif campaign['type'] == CampaignTypes::VISUAL_AB
|
132
|
+
decision[:is_user_whitelisted] = !!variation['name']
|
133
|
+
end
|
134
|
+
end
|
135
|
+
@hooks_manager.execute(decision)
|
136
|
+
end
|
137
|
+
|
91
138
|
return variation if variation && variation['name']
|
92
139
|
else
|
93
140
|
@logger.log(
|
@@ -106,6 +153,14 @@ class VWO
|
|
106
153
|
variation = get_stored_variation(user_id, campaign_key, user_campaign_map) if valid_hash?(user_campaign_map)
|
107
154
|
|
108
155
|
if variation
|
156
|
+
variation = variation.dup # deep copy
|
157
|
+
end
|
158
|
+
|
159
|
+
if variation
|
160
|
+
if valid_string?(user_campaign_map['goal_identifier']) && api_name == ApiMethods::TRACK
|
161
|
+
variation['goal_identifier'] = user_campaign_map['goal_identifier']
|
162
|
+
end
|
163
|
+
@has_stored_variation = true
|
109
164
|
@logger.log(
|
110
165
|
LogLevelEnum::INFO,
|
111
166
|
format(
|
@@ -116,7 +171,55 @@ class VWO
|
|
116
171
|
variation_name: variation['name']
|
117
172
|
)
|
118
173
|
)
|
174
|
+
decision[:from_user_storage_service] = !!variation['name']
|
175
|
+
if variation
|
176
|
+
if campaign['type'] == CampaignTypes::VISUAL_AB || campaign['type'] == CampaignTypes::FEATURE_TEST
|
177
|
+
decision[:variation_name] = variation['name']
|
178
|
+
decision[:variation_id] = variation['id']
|
179
|
+
if campaign['type'] == CampaignTypes::FEATURE_TEST
|
180
|
+
decision[:is_feature_enabled] = variation['isFeatureEnabled']
|
181
|
+
end
|
182
|
+
end
|
183
|
+
@hooks_manager.execute(decision)
|
184
|
+
end
|
119
185
|
return variation
|
186
|
+
else
|
187
|
+
@logger.log(
|
188
|
+
LogLevelEnum::DEBUG,
|
189
|
+
format(
|
190
|
+
LogMessageEnum::DebugMessages::NO_STORED_VARIATION,
|
191
|
+
file: FILE,
|
192
|
+
campaign_key: campaign_key,
|
193
|
+
user_id: user_id
|
194
|
+
)
|
195
|
+
)
|
196
|
+
|
197
|
+
if ([ApiMethods::TRACK, ApiMethods::GET_VARIATION_NAME, ApiMethods::GET_FEATURE_VARIABLE_VALUE].include? api_name) &&
|
198
|
+
@user_storage_service && campaign['type'] != CampaignTypes::FEATURE_ROLLOUT
|
199
|
+
@logger.log(
|
200
|
+
LogLevelEnum::DEBUG,
|
201
|
+
format(
|
202
|
+
LogMessageEnum::DebugMessages::CAMPAIGN_NOT_ACTIVATED,
|
203
|
+
file: FILE,
|
204
|
+
campaign_key: campaign_key,
|
205
|
+
user_id: user_id,
|
206
|
+
api_name: api_name
|
207
|
+
)
|
208
|
+
)
|
209
|
+
|
210
|
+
@logger.log(
|
211
|
+
LogLevelEnum::INFO,
|
212
|
+
format(
|
213
|
+
LogMessageEnum::InfoMessages::CAMPAIGN_NOT_ACTIVATED,
|
214
|
+
file: FILE,
|
215
|
+
campaign_key: campaign_key,
|
216
|
+
user_id: user_id,
|
217
|
+
api_name: api_name,
|
218
|
+
reason: api_name == ApiMethods::TRACK ? 'track it' : 'get the decision/value'
|
219
|
+
)
|
220
|
+
)
|
221
|
+
return
|
222
|
+
end
|
120
223
|
end
|
121
224
|
|
122
225
|
# Pre-segmentation
|
@@ -178,7 +281,7 @@ class VWO
|
|
178
281
|
variation = get_variation_allotted(user_id, campaign)
|
179
282
|
|
180
283
|
if variation && variation['name']
|
181
|
-
save_user_storage(user_id, campaign_key, variation['name']) if variation['name']
|
284
|
+
save_user_storage(user_id, campaign_key, variation['name'], goal_identifier) if variation['name']
|
182
285
|
|
183
286
|
@logger.log(
|
184
287
|
LogLevelEnum::INFO,
|
@@ -197,6 +300,17 @@ class VWO
|
|
197
300
|
format(LogMessageEnum::InfoMessages::NO_VARIATION_ALLOCATED, file: FILE, campaign_key: campaign_key, user_id: user_id)
|
198
301
|
)
|
199
302
|
end
|
303
|
+
|
304
|
+
if variation
|
305
|
+
if campaign['type'] == CampaignTypes::VISUAL_AB || campaign['type'] == CampaignTypes::FEATURE_TEST
|
306
|
+
decision[:variation_name] = variation['name']
|
307
|
+
decision[:variation_id] = variation['id']
|
308
|
+
if campaign['type'] == CampaignTypes::FEATURE_TEST
|
309
|
+
decision[:is_feature_enabled] = variation['isFeatureEnabled']
|
310
|
+
end
|
311
|
+
end
|
312
|
+
@hooks_manager.execute(decision)
|
313
|
+
end
|
200
314
|
variation
|
201
315
|
end
|
202
316
|
|
@@ -293,6 +407,45 @@ class VWO
|
|
293
407
|
nil
|
294
408
|
end
|
295
409
|
|
410
|
+
# If UserStorageService is provided, save the assigned variation
|
411
|
+
#
|
412
|
+
# @param[String] :user_id Unique user identifier
|
413
|
+
# @param[String] :campaign_key Unique campaign identifier
|
414
|
+
# @param[String] :variation_name Variation identifier
|
415
|
+
# @param[String] :goal_identifier The unique campaign's goal identifier
|
416
|
+
# @return[Boolean] true if found otherwise false
|
417
|
+
|
418
|
+
def save_user_storage(user_id, campaign_key, variation_name, goal_identifier)
|
419
|
+
unless @user_storage_service
|
420
|
+
@logger.log(
|
421
|
+
LogLevelEnum::DEBUG,
|
422
|
+
format(LogMessageEnum::DebugMessages::NO_USER_STORAGE_SERVICE_SAVE, file: FILE)
|
423
|
+
)
|
424
|
+
return false
|
425
|
+
end
|
426
|
+
new_campaign_user_mapping = {}
|
427
|
+
new_campaign_user_mapping['campaign_key'] = campaign_key
|
428
|
+
new_campaign_user_mapping['user_id'] = user_id
|
429
|
+
new_campaign_user_mapping['variation_name'] = variation_name
|
430
|
+
if !goal_identifier.empty?
|
431
|
+
new_campaign_user_mapping['goal_identifier'] = goal_identifier
|
432
|
+
end
|
433
|
+
|
434
|
+
@user_storage_service.set(new_campaign_user_mapping)
|
435
|
+
|
436
|
+
@logger.log(
|
437
|
+
LogLevelEnum::INFO,
|
438
|
+
format(LogMessageEnum::InfoMessages::SAVING_DATA_USER_STORAGE_SERVICE, file: FILE, user_id: user_id)
|
439
|
+
)
|
440
|
+
true
|
441
|
+
rescue StandardError
|
442
|
+
@logger.log(
|
443
|
+
LogLevelEnum::ERROR,
|
444
|
+
format(LogMessageEnum::ErrorMessages::SAVE_USER_STORAGE_SERVICE_FAILED, file: FILE, user_id: user_id)
|
445
|
+
)
|
446
|
+
false
|
447
|
+
end
|
448
|
+
|
296
449
|
private
|
297
450
|
|
298
451
|
# Evaluate all the variations in the campaign to find
|
@@ -464,41 +617,6 @@ class VWO
|
|
464
617
|
variation_name
|
465
618
|
)
|
466
619
|
end
|
467
|
-
|
468
|
-
# If UserStorageService is provided, save the assigned variation
|
469
|
-
#
|
470
|
-
# @param[String] :user_id Unique user identifier
|
471
|
-
# @param[String] :campaign_key Unique campaign identifier
|
472
|
-
# @param[String] :variation_name Variation identifier
|
473
|
-
# @return[Boolean] true if found otherwise false
|
474
|
-
|
475
|
-
def save_user_storage(user_id, campaign_key, variation_name)
|
476
|
-
unless @user_storage_service
|
477
|
-
@logger.log(
|
478
|
-
LogLevelEnum::DEBUG,
|
479
|
-
format(LogMessageEnum::DebugMessages::NO_USER_STORAGE_SERVICE_SAVE, file: FILE)
|
480
|
-
)
|
481
|
-
return false
|
482
|
-
end
|
483
|
-
new_campaign_user_mapping = {}
|
484
|
-
new_campaign_user_mapping['campaign_key'] = campaign_key
|
485
|
-
new_campaign_user_mapping['user_id'] = user_id
|
486
|
-
new_campaign_user_mapping['variation_name'] = variation_name
|
487
|
-
|
488
|
-
@user_storage_service.set(new_campaign_user_mapping)
|
489
|
-
|
490
|
-
@logger.log(
|
491
|
-
LogLevelEnum::INFO,
|
492
|
-
format(LogMessageEnum::InfoMessages::SAVING_DATA_USER_STORAGE_SERVICE, file: FILE, user_id: user_id)
|
493
|
-
)
|
494
|
-
true
|
495
|
-
rescue StandardError
|
496
|
-
@logger.log(
|
497
|
-
LogLevelEnum::ERROR,
|
498
|
-
format(LogMessageEnum::ErrorMessages::SAVE_USER_STORAGE_SERVICE_FAILED, file: FILE, user_id: user_id)
|
499
|
-
)
|
500
|
-
false
|
501
|
-
end
|
502
620
|
end
|
503
621
|
end
|
504
622
|
end
|
data/lib/vwo/enums.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Copyright 2019-
|
1
|
+
# Copyright 2019-2021 Wingify Software Pvt. Ltd.
|
2
2
|
#
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
4
|
# you may not use this file except in compliance with the License.
|
@@ -71,6 +71,8 @@ class VWO
|
|
71
71
|
SegmentEvaluator = VWO_PATH + '/services/segment_evaluator'
|
72
72
|
Logger = VWO_PATH + '/logger'
|
73
73
|
SettingsFileProcessor = VWO_PATH + '/services/settings_file_processor'
|
74
|
+
BatchEventsQueue = VWO_PATH + '/services/batch_events_queue'
|
75
|
+
BatchEventsDispatcher = VWO_PATH + '/services/batch_events_dispatcher'
|
74
76
|
|
75
77
|
CampaignUtil = UTIL_PATH + '/campaign'
|
76
78
|
FunctionUtil = UTIL_PATH + '/function'
|
@@ -106,6 +108,11 @@ class VWO
|
|
106
108
|
GOT_VARIATION_FOR_USER = '(%<file>s): userId:%<user_id>s for campaign:%<campaign_key>s got variationName:%<variation_name>s'
|
107
109
|
SEGMENTATION_STATUS = '(%<file>s): In API: %<api_name>s, for UserId:%<user_id>s of campaign:%<campaign_key>s with variables:%<custom_variables>s %<status>s %<segmentation_type>s for %<variation_name>s'
|
108
110
|
PARAMS_FOR_PUSH_CALL = '(%<file>s): Params for push call - %<properties>s'
|
111
|
+
CAMPAIGN_NOT_ACTIVATED = '(%<file>s): Campaign:%<campaign_key>s for User ID:%<user_id>s is not yet activated for API:%<api_name>s. Use activate API to activate A/B test or isFeatureEnabled API to activate Feature Test.'
|
112
|
+
BATCH_EVENT_LIMIT_EXCEEDED = '(%<file>s): Impression event - %<end_point>s failed due to exceeding payload size. Parameter eventsPerRequest in batchEvents config in launch API has value:%<eventsPerRequest>s for accountId:%<accountId>s. Please read the official documentation for knowing the size limits.'
|
113
|
+
BULK_NOT_PROCESSED = "(%<file>s): Batch events couldn't be received by VWO. Calling Flush Callback with error and data."
|
114
|
+
BEFORE_FLUSHING = '(%<file>s): Flushing events queue %<manually>s having %<length>s events %<timer>s queue summary: %<queue_metadata>s'
|
115
|
+
EVENT_BATCHING_INSUFFICIENT = '(%<file>s): %<key>s not provided, assigning default value'
|
109
116
|
end
|
110
117
|
|
111
118
|
# Info Messages
|
@@ -120,9 +127,9 @@ class VWO
|
|
120
127
|
AUDIENCE_CONDITION_NOT_MET = '(%<file>s): userId:%<user_id>s does not become part of campaign because of not meeting audience conditions'
|
121
128
|
GOT_VARIATION_FOR_USER = '(%<file>s): userId:%<user_id>s for campaign:%<campaign_key>s got variationName:%<variation_name>s'
|
122
129
|
USER_GOT_NO_VARIATION = '(%<file>s): userId:%<user_id>s for campaign:%<campaign_key>s did not allot any variation'
|
123
|
-
IMPRESSION_SUCCESS = '(%<file>s): Impression event - %<end_point>s was successfully received by VWO having main keys:
|
124
|
-
MAIN_KEYS_FOR_IMPRESSION = '(%<file>s): Having main keys:
|
125
|
-
MAIN_KEYS_FOR_PUSH_API = '(%<file>s): Having main keys:
|
130
|
+
IMPRESSION_SUCCESS = '(%<file>s): Impression event - %<end_point>s was successfully received by VWO having main keys: sdkKey:%<sdk_key>s accountId:%<account_id>s campaignId:%<campaign_id>s and variationId:%<variation_id>s'
|
131
|
+
MAIN_KEYS_FOR_IMPRESSION = '(%<file>s): Having main keys: {sdkKey:%<sdk_key>s accountId:%<account_id>s campaignId:%<campaign_id>s and variationId:%<variation_id>s}'
|
132
|
+
MAIN_KEYS_FOR_PUSH_API = '(%<file>s): Having main keys: {sdkKey:%<sdk_key>s accountId:%<account_id>s u:%<u>s and tags:%<tags>s}'
|
126
133
|
INVALID_VARIATION_KEY = '(%<file>s): Variation was not assigned to userId:%<user_id>s for campaign:%<campaign_key>s'
|
127
134
|
|
128
135
|
USER_IN_FEATURE_ROLLOUT = '(%<file>s): User ID:%<user_id>s is in feature rollout:%<campaign_key>s'
|
@@ -140,6 +147,14 @@ class VWO
|
|
140
147
|
|
141
148
|
SEGMENTATION_STATUS = '(%<file>s): In API: %<api_name>s, for UserId:%<user_id>s of campaign:%<campaign_key>s with variables:%<custom_variables>s %<status>s %<segmentation_type>s %<variation_name>s'
|
142
149
|
WHITELISTING_SKIPPED = '(%<file>s): In API: %<api_name>s, Skipping whitelisting for UserId:%<user_id>s of campaign:%<campaign_key>s'
|
150
|
+
SETTINGS_NOT_UPDATED = '(%<file>s): Settings-file fetched are same as earlier fetched settings'
|
151
|
+
SETTINGS_FILE_UPDATED = '(%<file>s): %<api_name>s vwo_sdk_instance is updated with the latest settings_file'
|
152
|
+
CAMPAIGN_NOT_ACTIVATED = '(%<file>s): Activate the campaign:%<campaign_key>s for User ID:%<user_id>s to %<reason>s.'
|
153
|
+
GOAL_ALREADY_TRACKED = '(%<file>s): Goal:%<goal_identifier>s of Campaign:%<campaign_key>s for User ID:%<user_id>s has already been tracked earlier. Skipping now'
|
154
|
+
USER_ALREADY_TRACKED = '(%<file>s): User ID:%<user_id>s for Campaign:%<campaign_key>s has already been tracked earlier for "%<api_name>s" API. Skipping now'
|
155
|
+
API_CALLED = '(%<file>s): API: {api_name} called for UserId:%<user_id>s'
|
156
|
+
BULK_IMPRESSION_SUCCESS = '(%<file>s): Impression event - %<end_point>s was successfully received by VWO having accountId:%<a>s'
|
157
|
+
AFTER_FLUSHING = '(%<file>s): Events queue having %<length>s events has been flushed %<manually>s queue summary: %<queue_metadata>s'
|
143
158
|
end
|
144
159
|
|
145
160
|
# Warning Messages
|
@@ -152,7 +167,7 @@ class VWO
|
|
152
167
|
API_CONFIG_CORRUPTED = '(%<file>s): %<api_name>s API has corrupted configuration'
|
153
168
|
GET_VARIATION_NAME_API_INVALID_PARAMS = '(%<file>s): %<api_name>s API got bad parameters. It expects campaignTestKey(String) as first and userId(String) as second argument, customVariables(Hash) can be passed via options for pre-segmentation'
|
154
169
|
GET_VARIATION_API_CONFIG_CORRUPTED = '(%<file>s): "getVariation" API has corrupted configuration'
|
155
|
-
TRACK_API_INVALID_PARAMS = '(%<file>s): %<api_name>s API got bad parameters. It expects campaignTestKey(String) as first userId(String) as second and goalIdentifier(String/Number) as third argument. Fourth is revenueValue(Float/Number/String) and is required for revenue goal only. customVariables(Hash) can be passed via options for pre-segmentation'
|
170
|
+
TRACK_API_INVALID_PARAMS = '(%<file>s): %<api_name>s API got bad parameters. It expects campaignTestKey(Nil/String/Array) as first userId(String) as second and goalIdentifier(String/Number) as third argument. Fourth is revenueValue(Float/Number/String) and is required for revenue goal only. customVariables(Hash) can be passed via options for pre-segmentation'
|
156
171
|
TRACK_API_CONFIG_CORRUPTED = '(%<file>s): "track" API has corrupted configuration'
|
157
172
|
TRACK_API_GOAL_NOT_FOUND = '(%<file>s): Goal:%<goal_identifier>s not found for campaign:%<campaign_key>s and userId:%<user_id>s'
|
158
173
|
TRACK_API_REVENUE_NOT_PASSED_FOR_REVENUE_GOAL = '(%<file>s): Revenue value should be passed for revenue goal:%<goal_identifier>s for campaign:%<campaign_key>s and userId:%<user_id>s'
|
@@ -179,6 +194,16 @@ class VWO
|
|
179
194
|
PUSH_API_INVALID_PARAMS = '(%<file>s): %<api_name>s API got bad parameters. It expects tag_key(String) as first and tag_value(String) as second argument and user_id(String) as third argument'
|
180
195
|
TAG_VALUE_LENGTH_EXCEEDED = '(%<file>s): In API: %<api_name>s, the length of tag_value:%<tag_value>s and userID: %<user_id>s can not be greater than 255'
|
181
196
|
TAG_KEY_LENGTH_EXCEEDED = '(%<file>s): In API: %<api_name>s, the length of tag_key:%<tag_key>s and userID: %<user_id>s can not be greater than 255'
|
197
|
+
TRACK_API_MISSING_PARAMS = '(%<file>s): "track" API got bad parameters. It expects campaignKey(null/String/array) as first, userId(String/Number) as second and goalIdentifier (string) as third argument. options is revenueValue(Float/Number/String) and is required for revenue goal only.'
|
198
|
+
NO_CAMPAIGN_FOUND = '(%<file>s): No campaign found for goal_identifier:%<goal_identifier>s. Please verify from VWO app.'
|
199
|
+
INVALID_TRACK_RETURNING_USER_VALUE = '(%<file>s): should_track_returning_user should be boolean'
|
200
|
+
INVALID_GOAL_TYPE = '(%<file>s): goal_type_to_track should be certain strings'
|
201
|
+
EVENT_BATCHING_NOT_OBJECT = '(%<file>s): Batch events settings are not of type object.'
|
202
|
+
EVENTS_PER_REQUEST_INVALID = '(%<file>s): events_per_request should be an integer'
|
203
|
+
REQUEST_TIME_INTERVAL_INVALID = '(%<file>s): request_time_interval should be a number'
|
204
|
+
EVENTS_PER_REQUEST_OUT_OF_BOUNDS = '(%<file>s): events_per_request should be >= %<min_value>s and <= %<max_value>s'
|
205
|
+
REQUEST_TIME_INTERVAL_OUT_OF_BOUNDS = '(%<file>s): request_time_interval should be >= %<min_value>s'
|
206
|
+
FLUSH_CALLBACK_INVALID = '(%<file>s): flush_callback is not callable'
|
182
207
|
end
|
183
208
|
end
|
184
209
|
|