lib/analytical/api.rb in analytical-1.3.0 vs lib/analytical/api.rb in analytical-1.4.0

- old
+ new

@@ -47,12 +47,19 @@ end # # These methods return the javascript that should be inserted into each section of your layout # - def head_javascript - [init_javascript(:head), tracking_javascript(:head)].delete_if{|s| s.blank?}.join("\n") + def head_prepend_javascript + [init_javascript(:head_prepend), tracking_javascript(:head_prepend)].delete_if{|s| s.blank?}.join("\n") end + + def head_append_javascript + [init_javascript(:head_append), tracking_javascript(:head_append)].delete_if{|s| s.blank?}.join("\n") + end + + alias_method :head_javascript, :head_append_javascript + def body_prepend_javascript [init_javascript(:body_prepend), tracking_javascript(:body_prepend)].delete_if{|s| s.blank?}.join("\n") end def body_append_javascript [init_javascript(:body_append), tracking_javascript(:body_append)].delete_if{|s| s.blank?}.join("\n") \ No newline at end of file