hemju-google-analytics 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile
CHANGED
@@ -7,10 +7,10 @@ require 'rake/testtask'
|
|
7
7
|
|
8
8
|
spec = Gem::Specification.new do |s|
|
9
9
|
s.name = 'hemju-google-analytics'
|
10
|
-
s.version = '0.0.
|
10
|
+
s.version = '0.0.3'
|
11
11
|
s.has_rdoc = true
|
12
12
|
s.extra_rdoc_files = ['README', 'LICENSE']
|
13
|
-
s.summary =
|
13
|
+
s.summary = "A gem that generates Google Analytics Javascript code."
|
14
14
|
s.description = s.summary
|
15
15
|
s.author = 'Helmut Michael Juskewycz'
|
16
16
|
s.email = 'hjuskewycz@hemju.com'
|
@@ -30,7 +30,7 @@ Rake::RDocTask.new do |rdoc|
|
|
30
30
|
files =['README', 'LICENSE', 'lib/**/*.rb']
|
31
31
|
rdoc.rdoc_files.add(files)
|
32
32
|
rdoc.main = "README" # page to start on
|
33
|
-
rdoc.title = "google-analytics Docs"
|
33
|
+
rdoc.title = "hemju-google-analytics Docs"
|
34
34
|
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
|
35
35
|
rdoc.options << '--line-numbers'
|
36
36
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if
|
1
|
+
<% if Hemju::GoogleAnalytics.environments.nil? || Hemju::GoogleAnalytics.environments.include?(Rails.env) %>
|
2
2
|
<script type="text/javascript">
|
3
3
|
var _gaq = _gaq || [];_gaq.push(['_setAccount', Hemju::GoogleAnalytics.account]);_gaq.push(['_setDomainName', Hemju::GoogleAnalytics.domain]);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script');ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';ga.setAttribute('async', 'true');document.documentElement.firstChild.appendChild(ga);})();
|
4
4
|
</script>
|
@@ -2,7 +2,9 @@ Hemju::GoogleAnalytics.setup do |config|
|
|
2
2
|
|
3
3
|
config.account = "'UA-xxxxxxx-x'"
|
4
4
|
config.domain = ".your-domain"
|
5
|
-
|
6
|
-
|
5
|
+
|
6
|
+
# Define the environments when the Analyitcs code should be included.
|
7
|
+
# When set to nil, the code is always included.
|
8
|
+
config.environments = ["production"]
|
7
9
|
|
8
10
|
end
|
data/lib/google_analytics.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hemju-google-analytics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Helmut Michael Juskewycz
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-06-
|
18
|
+
date: 2010-06-22 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
22
|
-
description:
|
22
|
+
description: A gem that generates Google Analytics Javascript code.
|
23
23
|
email: hjuskewycz@hemju.com
|
24
24
|
executables: []
|
25
25
|
|
@@ -70,6 +70,6 @@ rubyforge_project:
|
|
70
70
|
rubygems_version: 1.3.7
|
71
71
|
signing_key:
|
72
72
|
specification_version: 3
|
73
|
-
summary:
|
73
|
+
summary: A gem that generates Google Analytics Javascript code.
|
74
74
|
test_files: []
|
75
75
|
|