Sha256: 45c8df4366302829b4275bf1de770d306d54be123e09e28eaf26d317c18d1068

Contents?: true

Size: 519 Bytes

Versions: 1

Compression:

Stored size: 519 Bytes

Contents

<% if container %>
<% if events.any? %>
<script>
  dataLayer = [];
  dataLayer.push(<%= events.map(&:write).join(', ') %>);
</script>
<% end %>

<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','<%= container %>');</script>
<% end %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rack-tracker-1.3.1 lib/rack/tracker/google_tag_manager/template/google_tag_manager_head.erb