facebook_app 0.0.28 → 0.0.29

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,11 @@ module FacebookApp
27
27
  transition [:permissions_dialogue, :installed, :denied_permissions] => :generated_infographic
28
28
  end
29
29
 
30
+ event :subscribe do
31
+ # incompletely specified state machine. TODO complete
32
+ transition any => :subscribed
33
+ end
34
+
30
35
  event :sign_up_on_identified do
31
36
  transition any => :signed_up_for_identified
32
37
  end
@@ -13,7 +13,7 @@ module FacebookApp
13
13
  end
14
14
 
15
15
  def funnel(from_state, to_state, marketing_type=:all)
16
- state_count(from_state, marketing_type)/ state_count(to_state, marketing_type)
16
+ state_count(to_state, marketing_type).fdiv(state_count(from_state, marketing_type)) * 100
17
17
  rescue ZeroDivisionError
18
18
  "Cannot compute yet"
19
19
  end
@@ -38,6 +38,10 @@ module FacebookApp
38
38
  state_count(:generated_infographic, marketing_mode).to_s
39
39
  end
40
40
 
41
+ def subscribed_state_count(marketing_mode)
42
+ state_count(:subscribed, marketing_mode).to_s
43
+ end
44
+
41
45
  def signed_up_identified_state_count(marketing_mode)
42
46
  state_count(:signed_up_identified, marketing_mode).to_s
43
47
  end
@@ -1,6 +1,6 @@
1
1
  h4.title Funnel Information
2
2
  hr
3
- p Percentage of all #{from_stage.to_s.humanize} users reaching this stage: #{conversion_summary.funnel(from_stage, to_stage)}
4
- p Percentage of viral #{from_stage.to_s.humanize} users reaching this stage: #{conversion_summary.funnel(from_stage, to_stage, :viral)}
5
- p Percentage of advertised #{from_stage.to_s.humanize} users reaching this stage: #{conversion_summary.funnel(from_stage, to_stage, :advertising)}
3
+ p Percentage of Advertised users from previous stage reaching this stage: #{number_to_percentage conversion_summary.funnel(from_stage, to_stage, :advertising)}
4
+ p Percentage of Viral users from previous stage reaching this stage: #{number_to_percentage conversion_summary.funnel(from_stage, to_stage, :viral)}
5
+ p Percentage of All users from previous stage reaching this stage: #{number_to_percentage conversion_summary.funnel(from_stage, to_stage)}
6
6
  hr
@@ -4,20 +4,17 @@ h2 Unique users who reached splash page
4
4
 
5
5
  h2 Unique users who saw permissions dialogue for this app
6
6
  = render :partial => 'conversion_stage', :locals => {:state => :permissions_state_count, :conversion_summary => conversion_summary }
7
- = render :partial => "funnel", :locals => {:from_stage => :splash_page, :to_stage => :permission_dialogue, :conversion_summary => conversion_summary}
7
+ = render :partial => "funnel", :locals => {:from_stage => :splash_page, :to_stage => :permissions_dialogue, :conversion_summary => conversion_summary}
8
8
 
9
9
  h2 Unique users who installed this facebook app (accepted permissions)
10
10
  = render :partial => 'conversion_stage', :locals => {:state => :installed_state_count, :conversion_summary => conversion_summary }
11
- = render :partial => "funnel", :locals => {:from_stage => :permissions_dialogue, :to_stage => :accept_infographics, :conversion_summary => conversion_summary}
11
+ = render :partial => "funnel", :locals => {:from_stage => :permissions_dialogue, :to_stage => :installed, :conversion_summary => conversion_summary}
12
12
 
13
- h2 Unique users who denied permissions for this app
14
- p Note that these users are all redirected to Identified.com, so it's not a complete loss
15
- = render :partial => 'conversion_stage', :locals => {:state => :denied_state_count, :conversion_summary => conversion_summary }
16
- h2 Unique users who sent an infographic
17
- = render :partial => 'conversion_stage', :locals => {:state => :infographic_state_count, :conversion_summary => conversion_summary }
18
- = render :partial => "funnel", :locals => {:from_stage => :accept_permissions, :to_stage => :generate_infographic, :conversion_summary => conversion_summary}
13
+ h2 Unique users who subscribed to scores
14
+ = render :partial => 'conversion_stage', :locals => {:state => :subscribed_state_count, :conversion_summary => conversion_summary }
15
+ = render :partial => "funnel", :locals => {:from_stage => :generated_infographic, :to_stage => :subscribed, :conversion_summary => conversion_summary}
19
16
 
20
- h2 Unique users who installed Identified app after coming through here
17
+ h2 Unique users who installed Identified
21
18
  p Installed the Identified Facebook app (success)
22
19
  = render :partial => 'conversion_stage', :locals => {:state => :signed_up_identified_state_count, :conversion_summary => conversion_summary }
23
- = render :partial => "funnel", :locals => {:from_stage => :generate_infographic, :to_stage => :signed_up_identified, :conversion_summary => conversion_summary}
20
+ p Funnel analysis available on request (requires rewrite)
@@ -1,3 +1,3 @@
1
1
  module FacebookApp
2
- VERSION = "0.0.28"
2
+ VERSION = "0.0.29"
3
3
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: facebook_app
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.28
5
+ version: 0.0.29
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jack Kinsella