yandex-metrica-rails 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
data/.coveralls.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
repo_token:
|
1
|
+
repo_token: 0EIoWeqsJMVB6L4KZpuVZhVhhntyvRvgI
|
@@ -1,7 +1,8 @@
|
|
1
|
+
require "yandex-metrica/rails/view_helpers"
|
1
2
|
module YandexMetrica::Rails
|
2
3
|
class Railtie < ::Rails::Railtie
|
3
4
|
initializer "yandex-metrica-rails" do
|
4
|
-
ActionView::Base.send :include, ViewHelpers
|
5
|
+
ActionView::Base.send :include, YandexMetrica::Rails::ViewHelpers
|
5
6
|
end
|
6
7
|
end
|
7
8
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<script type="text/javascript">
|
2
2
|
(function (d, w, c) {
|
3
3
|
(w[c] = w[c] || []).push(function() {
|
4
|
-
try { w.<%= counter_name %> = new Ya.Metrika(<%= counter_options %>);
|
4
|
+
try { w.<%= counter_name %> = new Ya.Metrika({<%= counter_options %>});
|
5
5
|
} catch(e) { }
|
6
6
|
});
|
7
7
|
|
@@ -18,5 +18,5 @@
|
|
18
18
|
})(document, window, "yandex_metrika_callbacks");
|
19
19
|
</script>
|
20
20
|
<% if noscript %>
|
21
|
-
|
21
|
+
<noscript><div><img src="//mc.yandex.ru/watch/<%= counter %>" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
22
22
|
<% end %>
|
@@ -1,8 +1,8 @@
|
|
1
1
|
<script src="//mc.yandex.ru/metrika/watch.js" type="text/javascript"></script>
|
2
2
|
<script type="text/javascript">
|
3
|
-
try { var <%= counter_name %> = new Ya.Metrika(<%= counter_options %>);
|
3
|
+
try { var <%= counter_name %> = new Ya.Metrika({<%= counter_options %>});
|
4
4
|
} catch(e) { }
|
5
5
|
</script>
|
6
6
|
<% if noscript %>
|
7
|
-
|
7
|
+
<noscript><div><img src="//mc.yandex.ru/watch/<%= counter %>" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
|
8
8
|
<% end %>
|