Sha256: 260a72aba3549a37f826256f3b9d27e02b9a88b405ed362ad05acf2982f61b0d

Contents?: true

Size: 788 Bytes

Versions: 24

Compression:

Stored size: 788 Bytes

Contents

module Analytical
  module Modules
    class Hubspot
      include Analytical::Modules::Base

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

      def init_javascript(location)
        init_location(location) do
          js = <<-HTML
          <!-- Analytical Init: Hubspot -->
          <script type="text/javascript" language="javascript">
          var hs_portalid=#{options[:portal_id]};
          var hs_salog_version = "2.00";
          var hs_ppa = "#{options[: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

    end
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
analytical-3.0.12 lib/analytical/modules/hubspot.rb
analytical-3.0.11 lib/analytical/modules/hubspot.rb
analytical-3.0.9 lib/analytical/modules/hubspot.rb
analytical-3.0.8 lib/analytical/modules/hubspot.rb
analytical-3.0.7 lib/analytical/modules/hubspot.rb
analytical-3.0.6 lib/analytical/modules/hubspot.rb
gsiener-analytical-2.10.2 lib/analytical/modules/hubspot.rb
gsiener-analytical-2.10.1 lib/analytical/modules/hubspot.rb
analytical-2.11.0 lib/analytical/modules/hubspot.rb
analytical-2.10.0 lib/analytical/modules/hubspot.rb
gsiener-analytical-2.10.0 lib/analytical/modules/hubspot.rb
analytical-2.9.0 lib/analytical/modules/hubspot.rb
analytical-2.8.0 lib/analytical/modules/hubspot.rb
analytical-2.7.2 lib/analytical/modules/hubspot.rb
analytical-2.7.1 lib/analytical/modules/hubspot.rb
analytical-2.7.0 lib/analytical/modules/hubspot.rb
analytical-2.6.0 lib/analytical/modules/hubspot.rb
analytical-2.5.0 lib/analytical/modules/hubspot.rb
analytical-2.4.0 lib/analytical/modules/hubspot.rb
analytical-2.3.0 lib/analytical/modules/hubspot.rb