Sha256: 70f918fcf14c46b1e5ecb40029fd1f062f15bd9f333273c854e682ca67b4274c

Contents?: true

Size: 1.05 KB

Versions: 16

Compression:

Stored size: 1.05 KB

Contents

module Analytical
  module Modules
    class Performancing
      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: Performancing Metrics -->
      		<script type="text/javascript">
      		var clicky = { log: function(){ return; }, goal: function(){ return; }};
      		var clicky_site_id = #{options[:site_id]};
      		(function() {
      		  var s = document.createElement('script');
      		  s.type = 'text/javascript';
      		  s.async = true;
      		  s.src = ( document.location.protocol == 'https:' ? 'https://pmetrics.performancing.com' : 'http://pmetrics.performancing.com' ) + '/js';
      		  ( document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0] ).appendChild( s );
      		})();
      		</script>
      	  <!-- End Performancing Metrics -->
          HTML
          js
        end
      end

    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

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