Sha256: 0eaf18aa9ce0909f079a92bbbcfee64e3abf5db4416c39f7fe74b78bcf6e60fe

Contents?: true

Size: 846 Bytes

Versions: 24

Compression:

Stored size: 846 Bytes

Contents

module Analytical
  module Modules
    class Comscore
      include Analytical::Modules::Base

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

      def init_javascript(location)
        init_location(location) do
          js = <<-HTML
          <!-- Analytical Init: comScore -->
          <script>document.write(unescape("%3Cscript src='" + (document.location.protocol == "https:" ? "https://sb" : "http://b") + ".scorecardresearch.com/beacon.js' %3E%3C/script%3E"));</script>
          <script>COMSCORE.beacon({c1:2, c2:#{options[:key]}, c3:"", c4:"", c5:"", c6:"", c15:""});</script>
          <noscript><img src="http://b.scorecardresearch.com/p?c1=2&c2=#{options[:key]}&c3=&c4=&c5=&c6=&c15=&cj=1" /></noscript>
          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/comscore.rb
analytical-3.0.11 lib/analytical/modules/comscore.rb
analytical-3.0.9 lib/analytical/modules/comscore.rb
analytical-3.0.8 lib/analytical/modules/comscore.rb
analytical-3.0.7 lib/analytical/modules/comscore.rb
analytical-3.0.6 lib/analytical/modules/comscore.rb
gsiener-analytical-2.10.2 lib/analytical/modules/comscore.rb
gsiener-analytical-2.10.1 lib/analytical/modules/comscore.rb
analytical-2.11.0 lib/analytical/modules/comscore.rb
analytical-2.10.0 lib/analytical/modules/comscore.rb
gsiener-analytical-2.10.0 lib/analytical/modules/comscore.rb
analytical-2.9.0 lib/analytical/modules/comscore.rb
analytical-2.8.0 lib/analytical/modules/comscore.rb
analytical-2.7.2 lib/analytical/modules/comscore.rb
analytical-2.7.1 lib/analytical/modules/comscore.rb
analytical-2.7.0 lib/analytical/modules/comscore.rb
analytical-2.6.0 lib/analytical/modules/comscore.rb
analytical-2.5.0 lib/analytical/modules/comscore.rb
analytical-2.4.0 lib/analytical/modules/comscore.rb
analytical-2.3.0 lib/analytical/modules/comscore.rb