Sha256: ff042f84e7bea15c7809e150b43a8158ef7434763773804b38d2456e45ee3552
Contents?: true
Size: 1.03 KB
Versions: 35
Compression:
Stored size: 1.03 KB
Contents
<% sc = site.social_config if sc.auto_ga_js && sc.google_analytics_id %> <script> (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','//www.google-analytics.com/analytics.js','ga'); ga('create', '<%= raw sc.google_analytics_id %>', 'auto'); ga('send', 'pageview'); <% if ga_events && ga_events.count > 0 %> <% ga_events.each do |arr| %> <% cat = arr[0] ? arr[0] : nil action = arr[1] ? arr[1] : nil label = arr[2] ? arr[2] : nil value = arr[3] ? arr[3] : nil arr2 = [cat, action] arr2 << (label ? label : '') if label || (label.nil? && value) arr2 << value if value %> ga('send', 'event'<% arr2.each do |x| %>, <%= raw Caboose.json(x) %><% end %>); <% end %> <% end %> </script> <% end %>
Version data entries
35 entries across 35 versions & 1 rubygems