Sha256: add11f678e6022137f5eb14e372a6233f40741283086e3d88b74ad761a7f2599

Contents?: true

Size: 745 Bytes

Versions: 57

Compression:

Stored size: 745 Bytes

Contents

<% if config[:tech_docs][:ga_tracking_id].is_a?(String) && !config[:tech_docs][:ga_tracking_id].empty? %>
  <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','https://www.google-analytics.com/analytics.js','ga');

  ga('create', '<%= config[:tech_docs][:ga_tracking_id] %>', 'auto');
  ga('set', 'anonymizeIp', true);
  ga('set', 'displayFeaturesTask', null);
  ga('set', 'transport', 'beacon');
  ga('set', 'page', location.pathname+location.search+location.hash);
  ga('send', 'pageview');
  </script>
<% end %>

Version data entries

57 entries across 57 versions & 2 rubygems

Version Path
govuk_tech_docs-4.1.1 lib/source/layouts/_analytics.erb
govuk_tech_docs-4.1.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-4.0.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.5.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.4.5 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.4.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.3.1 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.3.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.2.1 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.2.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.1.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.0.1 lib/source/layouts/_analytics.erb
govuk_tech_docs-3.0.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.4.3 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.4.2 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.4.1 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.4.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.3.0 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.2.2 lib/source/layouts/_analytics.erb
govuk_tech_docs-2.2.1 lib/source/layouts/_analytics.erb