mixpanel 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  [![Build Status](https://secure.travis-ci.org/zevarito/mixpanel.png?branch=master)](http://travis-ci.org/zevarito/mixpanel)
2
2
 
3
+ ### If you are upgrading from a previous version to 4.x.x please read deprecation notes.
4
+
3
5
  ## Table of Contents
4
6
 
5
7
  - [What is Mixpanel] (#what-is-mixpanel)
@@ -127,7 +129,7 @@ Where **options** is a hash that accepts the following keys:
127
129
  This allows you to use a before_filter to set these variables, redirect, and still have them only transmitted
128
130
  once.
129
131
 
130
- *To enable persistence*, you must set the flag twice: here when instantiating Middleware and again when you initialize
132
+ *To enable persistence*, you must set the flag twice: when instantiating Middleware and here when you initialize
131
133
  the Mixpanel class.
132
134
 
133
135
  * **api_key** : string
@@ -332,7 +334,19 @@ you identify the user, the change will not be immediately sent to Mixpanel. Mixp
332
334
  @mixpanel.append("identify", "Unique Identifier")
333
335
  ```
334
336
 
337
+ ### Give people real names with Javascript
338
+
339
+ *Note*: You should setup the [Rack Middleware](#rack-middleware).
340
+
341
+ This gives names to people tracked in the `Stream` view:
342
+
343
+ ```ruby
344
+ @mixpanel.append("name_tag", "John Doe")
345
+ ```
346
+
347
+
335
348
  ### Prevent middleware from inserting code
349
+
336
350
  *Note*: Only applies when [Rack Middleware](#rack-middleware) is setup.
337
351
 
338
352
  Occasionally you may need to send a request for HTML that you don't want the middleware to alter. In your AJAX request include the header "SKIP_MIXPANEL_MIDDLEWARE" to prevent the mixpanel code from being inserted.
@@ -483,6 +497,11 @@ MixPanel.track("Front Page Load", {
483
497
  - 1.9.3
484
498
  - JRuby 1.8 Mode
485
499
 
500
+ ## Deprecation Notes
501
+
502
+ * 4.0.0
503
+ People API #append_people_identify => #append_identify
504
+
486
505
  ## Collaborators and Maintainers
487
506
 
488
507
  * [Alvaro Gil](https://github.com/zevarito) (Author)
@@ -98,7 +98,7 @@ module Mixpanel
98
98
  <<-EOT
99
99
  <!-- start Mixpanel -->
100
100
  <script type="text/javascript">
101
- (function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
101
+ (function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!==typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]);b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]);
102
102
  mixpanel.init("#{@token}");
103
103
  mixpanel.set_config(#{@options[:config].to_json});
104
104
  </script>
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 = "4.0.0"
5
+ s.version = "4.0.1"
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"
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: 4.0.0
4
+ version: 4.0.1
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: 2013-04-18 00:00:00.000000000Z
12
+ date: 2013-05-10 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- requirement: &2156195040 !ruby/object:Gem::Requirement
16
+ requirement: &2153783040 !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: *2156195040
24
+ version_requirements: *2153783040
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rack
27
- requirement: &2156194600 !ruby/object:Gem::Requirement
27
+ requirement: &2153782600 !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: *2156194600
35
+ version_requirements: *2153782600
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: escape
38
- requirement: &2156194180 !ruby/object:Gem::Requirement
38
+ requirement: &2153782180 !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: *2156194180
46
+ version_requirements: *2153782180
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &2156193760 !ruby/object:Gem::Requirement
49
+ requirement: &2153781760 !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: *2156193760
57
+ version_requirements: *2153781760
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rack-test
60
- requirement: &2156193340 !ruby/object:Gem::Requirement
60
+ requirement: &2153781340 !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: *2156193340
68
+ version_requirements: *2153781340
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: fakeweb
71
- requirement: &2156192920 !ruby/object:Gem::Requirement
71
+ requirement: &2153780920 !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: *2156192920
79
+ version_requirements: *2153780920
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: nokogiri
82
- requirement: &2156192500 !ruby/object:Gem::Requirement
82
+ requirement: &2153780500 !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: *2156192500
90
+ version_requirements: *2153780500
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: rake
93
- requirement: &2156218440 !ruby/object:Gem::Requirement
93
+ requirement: &2153806420 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,7 +98,7 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *2156218440
101
+ version_requirements: *2153806420
102
102
  description: Simple lib to track events in Mixpanel service. It can be used in any
103
103
  rack based framework.
104
104
  email: zevarito@gmail.com