Sha256: 37add96dff55f9758187ad1c3d387966a356700f370c29f2a211ff3581c01954

Contents?: true

Size: 607 Bytes

Versions: 1

Compression:

Stored size: 607 Bytes

Contents

<% if trackers %>
<script async src='https://www.googletagmanager.com/gtag/js?id=<%= trackers[0][:id] %>'></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments)};
  gtag('js', new Date());

  <% if set_options %>
    gtag('set', <%= set_options.to_json %>);
  <% end %>

  <% trackers.each do |tracker| %>
    <% pages.each do |page| %>
      gtag('config', '<%= tracker[:id] %>', <%= tracker_options.merge(page.params).to_json %>);
    <% end %>
    gtag('config', '<%= tracker[:id] %>', <%= tracker_options.to_json %>);
  <% end %>
</script>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-tracker-1.8.0 lib/rack/tracker/google_global/template/google_global.erb