Sha256: cfcea0001406a6ab8d25b2d8b48e388f47cfc71d9807127ce6be236671a3a7e5

Contents?: true

Size: 638 Bytes

Versions: 7

Compression:

Stored size: 638 Bytes

Contents

<% unless @current_storytime_site.nil? || @current_storytime_site.ga_tracking_id.blank? %>
  <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', '<%= @current_storytime_site.ga_tracking_id %>', {'allowAnchor': true});

    ga('send', 'pageview', { 'page': location.pathname + location.search + location.hash});

  </script>
<% end %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
storytime-2.1.6 app/views/storytime/sites/_google_analytics_code.html.erb
storytime-2.1.5 app/views/storytime/sites/_google_analytics_code.html.erb
storytime-2.1.4 app/views/storytime/sites/_google_analytics_code.html.erb
storytime-2.1.3 app/views/storytime/sites/_google_analytics_code.html.erb
storytime-2.1.2 app/views/storytime/sites/_google_analytics_code.html.erb
storytime-2.1.1 app/views/storytime/sites/_google_analytics_code.html.erb
storytime-2.1.0 app/views/storytime/sites/_google_analytics_code.html.erb