Sha256: bdd4a7a3e89399c4b3ee0e17b3635cc49fafc112b637b774da15b8bdb0c2c02a
Contents?: true
Size: 1.52 KB
Versions: 6
Compression:
Stored size: 1.52 KB
Contents
module Analytical module Modules class ClickTale include Analytical::Modules::Base def initialize(options={}) super @tracking_command_location = [:body_prepend, :body_append] end def init_javascript(location) init_location(location) do case location.to_sym when :body_prepend js = <<-HTML <!-- Analytical Init: ClickTale Top part --> <script type="text/javascript"> var WRInitTime=(new Date()).getTime(); </script> <!-- ClickTale end of Top part --> HTML js when :body_append js = <<-HTML <!-- Analytical Init: ClickTale Bottom part --> <div id="ClickTaleDiv" style="display: none;"></div> <script type='text/javascript'> document.write(unescape("%3Cscript%20src='"+ (document.location.protocol=='https:'? 'https://clicktale.pantherssl.com/': 'http://s.clicktale.net/')+ "#{@options[:script_name] || "WRb6"}.js'%20type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var ClickTaleSSL=1; if(typeof ClickTale=='function') ClickTale(#{@options[:project_id]},#{@options[:site_traffic]},"www"); </script> <!-- ClickTale end of Bottom part --> HTML js end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems