stealth-mixpanel 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f192db1f0e71fb6a8455e331c2d9f5257411de3a1f60b0854f7ccc7e936374b
4
- data.tar.gz: ebcd912c792d425040c0a84fc7e1e4ad60526df7f9f8bea494e82fcfd0ed2126
3
+ metadata.gz: 1b3a2036f84083daf83419b754e0d08f48108724d48cab33a67cc7eba11b10b7
4
+ data.tar.gz: c3d40dc7a46d0e1a015eaf8e97cbb49c6c8b11fb2c7dd8f91940df2ec1adf2f4
5
5
  SHA512:
6
- metadata.gz: 57ef3e05da02107ed0c666c7e79549062d5c207cd4358780efe581772a3b5baa6d97dd6e9bb9538a7289b1052a2d30de86e0f1afd1c6ec82261620381f561244
7
- data.tar.gz: f06234b962ae18f22acb05d344073f6282fa81c56498d360c7f54d4185753d8fcddecbdeeab0e8d94f541559cf5ecaf65d62d79fc92b9c90077e91db77d9735d
6
+ metadata.gz: 39e38894b36f4700ac41fdbbcafa1c718c973afac977d065dd7f57b25c4cf45114b9a9c3e85079c7d8f4acf9127617351e366ac5fe810a946f8a5e176edae41f
7
+ data.tar.gz: 44841c8175f8d95b2d8f65b5a5f235ebd7712b75adeaa679c3c6443e9dae9616205730c7cf012653d5d7aa66fc66a92d89452490bb1364b89a8ab4bb63816f87
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  gemspec
2
2
 
3
3
  source 'https://rubygems.org'
4
- ruby '2.5.1'
data/Gemfile.lock CHANGED
@@ -41,7 +41,7 @@ GEM
41
41
  erubi (1.7.1)
42
42
  i18n (1.1.1)
43
43
  concurrent-ruby (~> 1.0)
44
- loofah (2.2.2)
44
+ loofah (2.2.3)
45
45
  crass (~> 1.0.2)
46
46
  nokogiri (>= 1.5.9)
47
47
  method_source (0.9.0)
@@ -53,7 +53,7 @@ GEM
53
53
  nokogiri (1.8.5)
54
54
  mini_portile2 (~> 2.3.0)
55
55
  puma (3.12.0)
56
- rack (2.0.5)
56
+ rack (2.0.6)
57
57
  rack-protection (2.0.4)
58
58
  rack
59
59
  rack-test (1.1.0)
@@ -71,19 +71,19 @@ GEM
71
71
  thor (>= 0.19.0, < 2.0)
72
72
  rake (12.3.1)
73
73
  redis (4.0.2)
74
- rspec (3.6.0)
75
- rspec-core (~> 3.6.0)
76
- rspec-expectations (~> 3.6.0)
77
- rspec-mocks (~> 3.6.0)
78
- rspec-core (3.6.0)
79
- rspec-support (~> 3.6.0)
80
- rspec-expectations (3.6.0)
74
+ rspec (3.8.0)
75
+ rspec-core (~> 3.8.0)
76
+ rspec-expectations (~> 3.8.0)
77
+ rspec-mocks (~> 3.8.0)
78
+ rspec-core (3.8.0)
79
+ rspec-support (~> 3.8.0)
80
+ rspec-expectations (3.8.1)
81
81
  diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.6.0)
83
- rspec-mocks (3.6.0)
82
+ rspec-support (~> 3.8.0)
83
+ rspec-mocks (3.8.0)
84
84
  diff-lcs (>= 1.2.0, < 2.0)
85
- rspec-support (~> 3.6.0)
86
- rspec-support (3.6.0)
85
+ rspec-support (~> 3.8.0)
86
+ rspec-support (3.8.0)
87
87
  sidekiq (5.2.2)
88
88
  connection_pool (~> 2.2, >= 2.2.2)
89
89
  rack-protection (>= 1.5.0)
@@ -112,11 +112,8 @@ PLATFORMS
112
112
  ruby
113
113
 
114
114
  DEPENDENCIES
115
- rspec (= 3.6.0)
115
+ rspec (= 3.8.0)
116
116
  stealth-mixpanel!
117
117
 
118
- RUBY VERSION
119
- ruby 2.5.1p57
120
-
121
118
  BUNDLED WITH
122
119
  1.16.3
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This gem provides out-of-the-box tracking of state transitions inside of [Stealth](https://github.com/hellostealth/stealth) via the [Mixpanel](https://mixpanel.com) service. You are free to track additional events as needed, and we may add more baseline events in the future.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/stealth-mixpanel.svg)](https://badge.fury.io/rb/stealth-mixpanel)
6
+
5
7
  ## Setup
6
8
 
7
9
  Once you have your Mixpanel Project Token, set the `MIXPANEL_PROJECT_TOKEN` environment variable. That's the only setup required!
@@ -10,4 +12,23 @@ Once you have your Mixpanel Project Token, set the `MIXPANEL_PROJECT_TOKEN` envi
10
12
 
11
13
  Here are the events that are tracked automatically:
12
14
 
13
- * `State Change`: these are sent to Mixpanel each time a state transition takes place. The user's `recipient_id` is sent to Mixpanel as the `distinct_id`. Additional properties for `flow` and `state` are also sent with the event.
15
+ * `State Change`: these are sent to Mixpanel each time a state transition takes place. The user's `recipient_id` is sent to Mixpanel as the `distinct_id`. Additional properties for `flow` and `state` are also sent with the event. Please note that when an `update_session_to` is called, the user's session is updated immediately and therefore an event is also sent to Mixpanel.
16
+
17
+ ## Tracking Custom Events
18
+
19
+ If you'd like to track custom events or store user profiles, you can use the following:
20
+
21
+ ```ruby
22
+
23
+ tracker = Stealth::Mixpanel.new
24
+
25
+ # Track events
26
+
27
+ tracker.track(current_session_id, 'event-to-track')
28
+
29
+ # Store/update user profiles
30
+
31
+ tracker.people.set(current_session_id, { offer_code: '1234-2', happy: 'yes' })
32
+ ```
33
+
34
+ For more information about tracking custom events or user profiles, please check out the [mixpanel-ruby](https://github.com/mixpanel/mixpanel-ruby) gem. The `tracker` instance above is just a `Mixpanel::Tracker` object.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'stealth-mixpanel'
3
- s.version = '0.9.4'
3
+ s.version = '0.9.5'
4
4
  s.summary = "Stealth Mixpanel"
5
5
  s.description = "Built-in state tracking for Stealth bots with Mixpanel."
6
6
  s.authors = ["Mauricio Gomes"]
@@ -12,6 +12,6 @@ Gem::Specification.new do |s|
12
12
  s.add_dependency 'stealth', '< 2.0'
13
13
  s.add_dependency 'mixpanel-ruby', '~> 2.2'
14
14
 
15
- s.add_development_dependency "rspec", "3.6.0"
15
+ s.add_development_dependency "rspec", "= 3.8.0"
16
16
 
17
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stealth-mixpanel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mauricio Gomes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2018-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: stealth
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - '='
46
46
  - !ruby/object:Gem::Version
47
- version: 3.6.0
47
+ version: 3.8.0
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - '='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.6.0
54
+ version: 3.8.0
55
55
  description: Built-in state tracking for Stealth bots with Mixpanel.
56
56
  email: mauricio@whoisblackops.com
57
57
  executables: []
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  version: '0'
89
89
  requirements: []
90
90
  rubyforge_project:
91
- rubygems_version: 2.7.6
91
+ rubygems_version: 2.7.7
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Stealth Mixpanel