Sha256: 8b1ad41db7136e8497c092b80a6ece0140b5aa09bf51f1008e0e481f8bfcee59
Contents?: true
Size: 790 Bytes
Versions: 29
Compression:
Stored size: 790 Bytes
Contents
# This file is part of the "Utopia Framework" project, and is licensed under the GNU AGPLv3. # Copyright 2010 Samuel Williams. All rights reserved. # See <utopia.rb> for licensing details. require 'utopia/tags' Utopia::Tags.create("google_analytics") do |transaction, state| html = <<EOF <!-- Google Analytics --> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> try { var pageTracker = _gat._getTracker(#{state[:id].dump}); pageTracker._trackPageview(); } catch(err) {}</script> <!-- Google Analytics --> EOF transaction.cdata(html) end
Version data entries
29 entries across 29 versions & 1 rubygems