ganalytics 0.0.1 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -1
- data/lib/ganalytics/configuration.rb +1 -1
- data/lib/ganalytics/google_analytics_filter.rb +2 -2
- data/lib/ganalytics/version.rb +1 -1
- metadata +1 -1
data/Gemfile
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
module Ganalytics
|
2
2
|
module GoogleAnalyticsFilter
|
3
3
|
def add_google_analytics
|
4
|
-
return unless (Ganalytics.
|
4
|
+
return unless (Ganalytics.google_tracking_id.present? and request.env['SERVER_NAME'] != 'localhost')
|
5
5
|
|
6
6
|
google_code = "<script type=\"text/javascript\">
|
7
7
|
var _gaq = _gaq || [];
|
8
|
-
_gaq.push(['_setAccount', '#{Ganalytics.
|
8
|
+
_gaq.push(['_setAccount', '#{Ganalytics.google_tracking_id}']);
|
9
9
|
_gaq.push(['_trackPageview']);
|
10
10
|
|
11
11
|
(function() {
|
data/lib/ganalytics/version.rb
CHANGED