garails 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/app/controllers/garails/google_analytics_controller.rb +9 -4
- data/lib/garails/version.rb +1 -1
- metadata +8 -31
data/Gemfile.lock
CHANGED
@@ -17,10 +17,7 @@ class Garails::GoogleAnalyticsController < ActionController::Base
|
|
17
17
|
UTM_COOKIE_NAME = "__utmmobile"
|
18
18
|
|
19
19
|
def utm
|
20
|
-
if Garails.ga_setup?
|
21
|
-
g = Garails.mobile_gabba(request, :utmn => params[:utmn], :utmcc => "__utma=999.999.999.999.999.1;", :utmhid => "")
|
22
|
-
g.page_view('', :utmvid => @visitor_id)
|
23
|
-
end
|
20
|
+
record_access if Garails.ga_setup?
|
24
21
|
response.headers.merge(UTM_HEADERS)
|
25
22
|
respond_to do |format|
|
26
23
|
format.gif { send_data UTM_GIF_DATA, :type => :gif, :disposition => "inline" }
|
@@ -29,6 +26,14 @@ class Garails::GoogleAnalyticsController < ActionController::Base
|
|
29
26
|
|
30
27
|
private
|
31
28
|
|
29
|
+
def record_access
|
30
|
+
mobile_gabba.page_view('', :utmvid => @visitor_id)
|
31
|
+
end
|
32
|
+
|
33
|
+
def mobile_gabba
|
34
|
+
Garails.mobile_gabba(request, :utmn => params[:utmn], :utmcc => "__utma=999.999.999.999.999.1;", :utmhid => "")
|
35
|
+
end
|
36
|
+
|
32
37
|
def extract_visitor_id
|
33
38
|
@visitor_id = cookies[UTM_COOKIE_NAME] || construct_new_visitor_id
|
34
39
|
cookie_data = {:value => @visitor_id, :expires => Time.now + 2.years, :path => '/'}
|
data/lib/garails/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: garails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-10-
|
12
|
+
date: 2011-10-13 00:00:00.000000000 +09:00
|
13
|
+
default_executable:
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: gabbara
|
16
|
-
requirement: &
|
17
|
+
requirement: &18279520 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
19
|
requirements:
|
19
20
|
- - ~>
|
@@ -21,7 +22,7 @@ dependencies:
|
|
21
22
|
version: 0.0.5
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
+
version_requirements: *18279520
|
25
26
|
description: Google Analytics for Rails
|
26
27
|
email: michael@mobalean.com
|
27
28
|
executables: []
|
@@ -70,6 +71,7 @@ files:
|
|
70
71
|
- test/test_app/public/favicon.ico
|
71
72
|
- test/test_app/script/rails
|
72
73
|
- test/test_helper.rb
|
74
|
+
has_rdoc: true
|
73
75
|
homepage: http://github.com/mreinsch/garails
|
74
76
|
licenses: []
|
75
77
|
post_install_message:
|
@@ -90,33 +92,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
92
|
version: '0'
|
91
93
|
requirements: []
|
92
94
|
rubyforge_project:
|
93
|
-
rubygems_version: 1.
|
95
|
+
rubygems_version: 1.6.2
|
94
96
|
signing_key:
|
95
97
|
specification_version: 3
|
96
98
|
summary: Google Analytics for Rails
|
97
|
-
test_files:
|
98
|
-
- test/controllers/google_analytics_controller_test.rb
|
99
|
-
- test/test_app/.gitignore
|
100
|
-
- test/test_app/app/controllers/application_controller.rb
|
101
|
-
- test/test_app/app/helpers/application_helper.rb
|
102
|
-
- test/test_app/app/views/layouts/application.html.erb
|
103
|
-
- test/test_app/config.ru
|
104
|
-
- test/test_app/config/application.rb
|
105
|
-
- test/test_app/config/boot.rb
|
106
|
-
- test/test_app/config/database.yml
|
107
|
-
- test/test_app/config/environment.rb
|
108
|
-
- test/test_app/config/environments/test.rb
|
109
|
-
- test/test_app/config/initializers/backtrace_silencers.rb
|
110
|
-
- test/test_app/config/initializers/garails.rb
|
111
|
-
- test/test_app/config/initializers/inflections.rb
|
112
|
-
- test/test_app/config/initializers/mime_types.rb
|
113
|
-
- test/test_app/config/initializers/secret_token.rb
|
114
|
-
- test/test_app/config/initializers/session_store.rb
|
115
|
-
- test/test_app/config/routes.rb
|
116
|
-
- test/test_app/db/seeds.rb
|
117
|
-
- test/test_app/public/404.html
|
118
|
-
- test/test_app/public/422.html
|
119
|
-
- test/test_app/public/500.html
|
120
|
-
- test/test_app/public/favicon.ico
|
121
|
-
- test/test_app/script/rails
|
122
|
-
- test/test_helper.rb
|
99
|
+
test_files: []
|