Sha256: e142dff14b174f8744eafc8277107355110160fb9aa3743430dc063e00bf639b

Contents?: true

Size: 650 Bytes

Versions: 8

Compression:

Stored size: 650 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 location==:body_append
        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

8 entries across 8 versions & 1 rubygems

Version Path
analytical-1.1.0 lib/analytical/crazy_egg.rb
analytical-1.0.0 lib/analytical/crazy_egg.rb
analytical-0.16.0 lib/analytical/crazy_egg.rb
analytical-0.15.0 lib/analytical/crazy_egg.rb
analytical-0.14.0 lib/analytical/crazy_egg.rb
analytical-0.13.0 lib/analytical/crazy_egg.rb
analytical-0.12.0 lib/analytical/crazy_egg.rb
analytical-0.11.0 lib/analytical/crazy_egg.rb