vwo-sdk 1.14.0 → 1.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vwo.rb +8 -14
- data/lib/vwo/constants.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b54dc7f86b437e994c1aec92ceae2afbb5f0045deeefb2ed7feb791094e025fd
|
4
|
+
data.tar.gz: 4d087003e85fbccc63af443c7ba7e7068079df27e151e48df5f52952cd14e680
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85f28097bbc3a311354e0702f27738dc9381d37e67beba61dd7978babf81b626e1a0ccee83b503fd5e5c4fe03235cde8fd875d0643fa4e50356bc8bfd101be8c
|
7
|
+
data.tar.gz: 26c18b27e473970f0dd3ad2bf27fd4ff7e81c0aac6ee4eb84decd4f5a21db74e02082d34eb1dc74106890dd353d430bec7c77a3b90fd7fb09b9e92056072e719
|
data/lib/vwo.rb
CHANGED
@@ -563,10 +563,11 @@ class VWO
|
|
563
563
|
# @param[String] :campaign_key Unique campaign key
|
564
564
|
# @param[String] :user_id ID assigned to a user
|
565
565
|
# @param[String] :goal_identifier Unique campaign's goal identifier
|
566
|
-
# @param[
|
566
|
+
# @param[Hash] :options Contains revenue value and custom variables
|
567
567
|
# @param[Numeric|String] :revenue_value It is the revenue generated on triggering the goal
|
568
568
|
#
|
569
|
-
|
569
|
+
|
570
|
+
def track(campaign_key, user_id, goal_identifier, options = {})
|
570
571
|
unless @is_instance_valid
|
571
572
|
@logger.log(
|
572
573
|
LogLevelEnum::ERROR,
|
@@ -579,18 +580,11 @@ class VWO
|
|
579
580
|
return false
|
580
581
|
end
|
581
582
|
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
goal_type_to_track = get_goal_type_to_track(args[0])
|
588
|
-
elsif args.is_a?(Array)
|
589
|
-
revenue_value = args[0]
|
590
|
-
custom_variables = nil
|
591
|
-
should_track_returning_user = @should_track_returning_user
|
592
|
-
goal_type_to_track = @goal_type_to_track
|
593
|
-
end
|
583
|
+
revenue_value = options['revenue_value'] || options[:revenue_value]
|
584
|
+
custom_variables = options['custom_variables'] || options[:custom_variables]
|
585
|
+
variation_targeting_variables = options['variation_targeting_variables'] || options[:variation_targeting_variables]
|
586
|
+
should_track_returning_user = get_should_track_returning_user(options)
|
587
|
+
goal_type_to_track = get_goal_type_to_track(options)
|
594
588
|
|
595
589
|
# Check for valid args
|
596
590
|
unless (valid_string?(campaign_key) || campaign_key.is_a?(Array) || campaign_key.nil?) && valid_string?(user_id) && valid_string?(goal_identifier) && (custom_variables.nil? || valid_hash?(custom_variables)) &&
|
data/lib/vwo/constants.rb
CHANGED
@@ -26,7 +26,7 @@ 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.14.
|
29
|
+
SDK_VERSION = '1.14.1'
|
30
30
|
SDK_NAME = 'ruby'
|
31
31
|
VWO_DELIMITER = '_vwo_'
|
32
32
|
MAX_EVENTS_PER_REQUEST = 5000
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vwo-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- VWO
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: coveralls
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0.70'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: mocha
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.13.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.13.0
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: json-schema
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|