optimize_ab 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -71,24 +71,21 @@ module Helpers
71
71
  ####################################################################
72
72
 
73
73
 
74
- ######## Multi-Variate Control & Tracking Script ########
74
+ ######## Control / Tracking Script / Click Function ########
75
75
 
76
76
  def multi_head(k, ua, pv)
77
77
  js = <<-HTML
78
- <!-- Google Website Optimizer Control Script -->
79
78
  <script>
80
- function utmx_section(){}function utmx(){}
81
- (function(){var k="#{k}",d=document,l=d.location,c=d.cookie;function f(n){
82
- if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return escape(c.substring(i+n.
83
- length+1,j<0?c.length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
84
- d.write('<sc'+'ript src="'+
85
- 'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
86
- +'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
87
- +new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
88
- '" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
89
- </script><script>utmx("url",'A/B');</script>
90
- <!-- End of Google Website Optimizer Control Script -->
91
- <!-- Google Website Optimizer Tracking Script -->
79
+ function utmx_section(){}function utmx(){}
80
+ (function(){var k="#{k}",d=document,l=d.location,c=d.cookie;function f(n){
81
+ if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return escape(c.substring(i+n.
82
+ length+1,j<0?c.length:j))}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
83
+ d.write('<sc'+'ript src="'+
84
+ 'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
85
+ +'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
86
+ +new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
87
+ '" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
88
+ </script>
92
89
  <script type="text/javascript">
93
90
  var _gaq = _gaq || [];
94
91
  _gaq.push(['gwo._setAccount', "#{ua}"]);
@@ -100,14 +97,12 @@ module Helpers
100
97
  }
101
98
  catch(err){}
102
99
  }
103
-
104
100
  (function() {
105
101
  var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
106
102
  ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
107
103
  var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
108
104
  })();
109
105
  </script>
110
- <!-- End of Google Website Optimizer Tracking Script -->
111
106
  HTML
112
107
  return js.html_safe
113
108
  end
@@ -1,3 +1,3 @@
1
1
  module OptimizeAb
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: optimize_ab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: