Class: Analytical::Modules::Hubspot
- Inherits:
-
Object
- Object
- Analytical::Modules::Hubspot
- Includes:
- Base
- Defined in:
- lib/analytical/modules/hubspot.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 = {}) ⇒ Hubspot
constructor
A new instance of Hubspot.
Methods included from Base
#init_location, #init_location?, #process_queued_commands, #protocol, #queue
Constructor Details
#initialize(options = {}) ⇒ Hubspot
Returns a new instance of Hubspot.
6 7 8 9 |
# File 'lib/analytical/modules/hubspot.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 21 22 23 24 |
# File 'lib/analytical/modules/hubspot.rb', line 11 def init_javascript(location) init_location(location) do js = <<-HTML <!-- Analytical Init: Hubspot --> <script type="text/javascript" language="javascript"> var hs_portalid=#{[:portal_id]}; var hs_salog_version = "2.00"; var hs_ppa = "#{[:domain]}"; document.write(unescape("%3Cscript src='" + document.location.protocol + "//" + hs_ppa + "/salog.js.aspx' type='text/javascript'%3E%3C/script%3E")); </script> HTML js end end |