mixpanel 3.0.1 → 3.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +9 -0
- data/lib/mixpanel/person.rb +5 -1
- data/mixpanel.gemspec +1 -1
- data/spec/mixpanel/tracker_spec.rb +5 -0
- metadata +22 -22
data/README.md
CHANGED
@@ -258,6 +258,14 @@ Example:
|
|
258
258
|
|
259
259
|
**event_name** and **properties** take the same form as [tracking the event directly](#track-events-directly).
|
260
260
|
|
261
|
+
Note that you must call mixpanel.people.identify() in conjunction with People requests like set(). If you make set() requests before
|
262
|
+
you identify the user, the change will not be immediately sent to Mixpanel. Mixpanel will wait for you to call identify() and then send the accumulated changes.
|
263
|
+
|
264
|
+
```ruby
|
265
|
+
@mixpanel.append_people_identify distinct_id
|
266
|
+
@mixpanel.append_set properties
|
267
|
+
```
|
268
|
+
|
261
269
|
### Execute Javascript API call
|
262
270
|
|
263
271
|
*Note*: You should setup the [Rack Middleware](#rack-middleware).
|
@@ -368,3 +376,4 @@ end
|
|
368
376
|
* [Sylvain Niles](https://github.com/sylvainsf)
|
369
377
|
* [GBH](https://github.com/GBH)
|
370
378
|
* [Goalee](https://github.com/Goalee)
|
379
|
+
* [Ahmed Belal](https://github.com/AhmedBelal)
|
data/lib/mixpanel/person.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Mixpanel::Person
|
2
|
-
PERSON_PROPERTIES = %w{email created first_name last_name last_login username country_code}
|
2
|
+
PERSON_PROPERTIES = %w{email created first_name last_name name last_login username country_code}
|
3
3
|
PERSON_URL = 'http://api.mixpanel.com/engage/'
|
4
4
|
|
5
5
|
def set(distinct_id, properties={}, options={})
|
@@ -25,6 +25,10 @@ module Mixpanel::Person
|
|
25
25
|
def append_identify(distinct_id)
|
26
26
|
append 'identify', distinct_id
|
27
27
|
end
|
28
|
+
|
29
|
+
def append_people_identify(distinct_id)
|
30
|
+
append 'people.identify', distinct_id
|
31
|
+
end
|
28
32
|
|
29
33
|
protected
|
30
34
|
|
data/mixpanel.gemspec
CHANGED
@@ -2,7 +2,7 @@ files = ['README.md', 'LICENSE', 'Rakefile', 'mixpanel.gemspec', '{spec,lib}/**/
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
s.name = "mixpanel"
|
5
|
-
s.version = "3.0.
|
5
|
+
s.version = "3.0.2"
|
6
6
|
s.rubyforge_project = "mixpanel"
|
7
7
|
s.description = "Simple lib to track events in Mixpanel service. It can be used in any rack based framework."
|
8
8
|
s.author = "Alvaro Gil"
|
@@ -84,6 +84,11 @@ describe Mixpanel::Tracker do
|
|
84
84
|
mixpanel_queue_should_include(@mixpanel, "identify", "some@one.com")
|
85
85
|
end
|
86
86
|
|
87
|
+
it "should allow people.identify to be called through the JS api" do
|
88
|
+
@mixpanel.append_people_identify "an_identity"
|
89
|
+
mixpanel_queue_should_include(@mixpanel, "people.identify", "an_identity")
|
90
|
+
end
|
91
|
+
|
87
92
|
it "should allow the tracking of super properties in JS" do
|
88
93
|
props = {:user_id => 12345, :gender => 'male'}
|
89
94
|
@mixpanel.append_register props
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mixpanel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-26 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: json
|
16
|
-
requirement: &
|
16
|
+
requirement: &2153672300 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2153672300
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rack
|
27
|
-
requirement: &
|
27
|
+
requirement: &2153671860 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2153671860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: escape
|
38
|
-
requirement: &
|
38
|
+
requirement: &2153671440 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2153671440
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: active_support
|
49
|
-
requirement: &
|
49
|
+
requirement: &2153671020 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '0'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2153671020
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &2153670600 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2153670600
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rack-test
|
71
|
-
requirement: &
|
71
|
+
requirement: &2153670180 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2153670180
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: fakeweb
|
82
|
-
requirement: &
|
82
|
+
requirement: &2153669760 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2153669760
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: nokogiri
|
93
|
-
requirement: &
|
93
|
+
requirement: &2153669340 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2153669340
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rake
|
104
|
-
requirement: &
|
104
|
+
requirement: &2153668920 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2153668920
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: ruby-debug19
|
115
|
-
requirement: &
|
115
|
+
requirement: &2160944480 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,7 +120,7 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2160944480
|
124
124
|
description: Simple lib to track events in Mixpanel service. It can be used in any
|
125
125
|
rack based framework.
|
126
126
|
email: zevarito@gmail.com
|