Class: Analytical::Modules::CrazyEgg
- Inherits:
-
Object
- Object
- Analytical::Modules::CrazyEgg
- Includes:
- Base
- Defined in:
- lib/analytical/modules/crazy_egg.rb
Instance Attribute Summary
Attributes included from Base
#command_store, #initialized, #options, #tracking_command_location
Instance Method Summary collapse
- #init_javascript(location) ⇒ Object
-
#initialize(options = {}) ⇒ CrazyEgg
constructor
A new instance of CrazyEgg.
Methods included from Base
#init_location, #init_location?, #process_queued_commands, #protocol, #queue
Constructor Details
#initialize(options = {}) ⇒ CrazyEgg
Returns a new instance of CrazyEgg.
6 7 8 9 |
# File 'lib/analytical/modules/crazy_egg.rb', line 6 def initialize(={}) super @tracking_command_location = :body_append end |
Instance Method Details
#init_javascript(location) ⇒ Object
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/analytical/modules/crazy_egg.rb', line 11 def init_javascript(location) init_location(location) do code_url = "#{[:key].to_s[0,4]}/#{[:key].to_s[4,4]}" 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 |