jonathannelson-woopra_analytics 1.3 → 1.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -120,7 +120,7 @@ module JonathanNelson # :nodoc:
120
120
  <!-- Woopra Code Start -->
121
121
  <script type="text/javascript">
122
122
  var _wh = ((document.location.protocol=="https:") ? "https://sec1.woopra.com" : "http://static.woopra.com");
123
- document.write(unescape("%3Cscript src='" + _wh + "woopra.com/js/woopra.js' type='text/javascript'%3E%3C/script%3E"));
123
+ document.write(unescape("%3Cscript src='" + _wh + "/js/woopra.js' type='text/javascript'%3E%3C/script%3E"));
124
124
  </script>
125
125
  <!-- Woopra Code End -->
126
126
  HTML
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jonathannelson-woopra_analytics
3
3
  version: !ruby/object:Gem::Version
4
- version: "1.3"
4
+ version: "1.5"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Nelson
@@ -63,6 +63,6 @@ rubyforge_project: woopra_analytics
63
63
  rubygems_version: 1.2.0
64
64
  signing_key:
65
65
  specification_version: 2
66
- summary: "[Rails] This is a quick 'n' dirty module to easily enableWoopra Analytics support in your application."
66
+ summary: "[Rails] This module will easily enableWoopra Analytics support for your application."
67
67
  test_files: []
68
68
 
data/README DELETED
@@ -1,55 +0,0 @@
1
- WoopraAnalytics
2
- ===============
3
-
4
- This module will easily enable Woopra Analytics support for your application. By default it'll output the analytics code for every single page automatically, if it's configured correctly.
5
-
6
- If you want to disable the code insertion for particular pages, add the following to controllers that don't want it:
7
-
8
- skip_after_filter :add_woopra_analytics_code
9
-
10
- If you are running rails 2.1 or above add install this by adding:
11
-
12
- config.gem 'jonathannelson-woopra_analytics', :lib => 'jonathannelsoon/woopra_analytics', :source => 'http://gems.github.com'
13
-
14
- and run:
15
-
16
- rake gems:install
17
-
18
- That's it!
19
-
20
- USING LOCAL COPIES OF THE WOOPRA ANALYTICS JAVASCRIPT FILES
21
-
22
- Under certain circumstances you might find it valuable to serve a copy of the Analytics JavaScript directly from your server to your visitors, and not directly from Woopra. If your visitors are geographically very far from Woopra, or if they have low quality international bandwidth, the loading time for the Analytics JS might kill the user experience and force you to remove the valuable tracking code from your site.
23
-
24
- This plugin now supports local copies Woopra JavaScript files, updated via a rake task and served courtesy of the Rails AssetTagHelper methods. So even if you use asset hosts, the JS will be served from the correct source and under the correct protocol (HTTP/HTTPS).
25
-
26
- To enable cached copies and the following to your initialization code:
27
-
28
- JonathanNelson::WoopraAnalytics.local_javascript = true
29
-
30
- Use the following rake task to update the local copy of the JavaScript file:
31
-
32
- rake woopra_analytics:updates
33
-
34
- To keep the file updated you can add the following to your Capistrano configuration:
35
-
36
- after "deploy:symlink", "deploy:woopra_analytics"
37
-
38
- namespace :deploy do
39
- desc "Update local Woopra Analytics files"
40
- task :woopra_analytics, :role => :web do
41
- run "cd #{current_path} && rake woopra_analytics:update RAILS_ENV=#{ENV['RAILS_ENV']}"
42
- end
43
- end
44
-
45
- The above Capistrano recipe will almost certainly need some adjustments based on how you run your deployments, but you should get the idea.
46
-
47
- OVERRIDE APPLICATION-WIDE VALUES
48
-
49
- If you're using one Rails application to serve pages across multiple domains, you may wish to override the domain and tracker ID values on a controller-by-controller or view-by-view basis. You can do this by setting the override_domain_name properties. These properties are automatically reset after each use, so the values you set for domain_name (usually in an initializer) will apply to all other requests.
50
-
51
- before_filter :local_analytics
52
-
53
- def local_analytics
54
- JonathanNelson::WoopraAnalytics.override_domain_name = 'foo.com'
55
- end