Sha256: a5b19c031d6d0cf784019d9c3c3146ff9bab747ed53e831972f8690fdd2a8f6e
Contents?: true
Size: 557 Bytes
Versions: 15
Compression:
Stored size: 557 Bytes
Contents
module JtRailsToolboxHelper def google_anaytics_tag(tracking_id) if Rails.env.production? && !tracking_id.blank? javascript_tag do "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '#{tracking_id}', 'auto'); ga('send', 'pageview');".html_safe end end end end
Version data entries
15 entries across 15 versions & 1 rubygems