Class: Analytical::Modules::Loopfuse

Inherits:
Object
  • Object
show all
Includes:
Base
Defined in:
lib/analytical/modules/loopfuse.rb

Instance Attribute Summary

Attributes included from Base

#command_store, #initialized, #options, #tracking_command_location

Instance Method Summary collapse

Methods included from Base

#init_location, #init_location?, #process_queued_commands, #protocol, #queue

Constructor Details

#initialize(options = {}) ⇒ Loopfuse

Returns a new instance of Loopfuse.



6
7
8
9
# File 'lib/analytical/modules/loopfuse.rb', line 6

def initialize(options={})
  super
  @tracking_command_location = :body_append
end

Instance Method Details

#init_javascript(location) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/analytical/modules/loopfuse.rb', line 11

def init_javascript(location)
  init_location(location) do
    js = <<-HTML
    <!-- Analytical Init: LOOPFUSE TRACKING -->
    <script type="text/javascript">
    var LFHost = (("https:" == document.location.protocol) ? "https://" : "http://");
    document.write(unescape("%3Cscript src='" + LFHost + "lfov.net/webrecorder/js/listen.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    _lf_cid = "#{options[:cid]}";
    _lf_remora();
    </script>
		<!-- END: LOOPFUSE TRACKING -->
    HTML
    js
  end
end