Sha256: 1937e4b6036e0b40d88adc072a7bee6a92b2da78ddc5377c112c914ce38b5670

Contents?: true

Size: 652 Bytes

Versions: 1

Compression:

Stored size: 652 Bytes

Contents

module Analytical
  module CrazyEgg
    class Api
      include Analytical::Base::Api

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

      def init_javascript(location)
        return '' unless init_location?(location)
        code_url = "#{options[:key][0,4]}/#{options[:key][4,4]}"
        protocol = options[:ssl] ? 'https' : 'http'
        js = <<-HTML
        <!-- Analytical Init: CrazyEgg -->
        <script type="text/javascript" src="#{protocol}://s3.amazonaws.com/new.cetrk.com/pages/scripts/#{code_url}.js"> </script>
        HTML
        js
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
analytical-1.1.1 lib/analytical/crazy_egg.rb