<script id="transaction_cross_domain_analytics">
  (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', '<%= ga_account_code %>');

  // Load the plugin.
  ga('require', 'linker');

  // Define which domains to autoLink.
  ga('linker:autoLink', ['service.gov.uk']);

  ga('send', 'pageview');

</script>

<script id="transaction_cross_domain_analytics">
  (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();
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '<%= ga_account_code %>', 'auto', {'name': 'transactionTracker'});

  // Load the plugin.
  ga('require', 'linker');

  // Define which domains to autoLink.
  ga('linker:autoLink', ['service.gov.uk']);

  ga('transactionTracker.send', 'pageview');
</script>

Fix double-inclusion of Universal Analytics
Fix double-inclusion of Universal Analytics

Since https://github.com/alphagov/static/pull/508 was merged the
Universal Analytics code used to support cross-transaction tracking
would be broken.

This commit updates the in-template code as follows:

- Remove dynamic creation of Javascript loader
- Use UA namespacing[0] to namespace the `pageview` beacon sending
  functionality

This commit will need to be released at the same time as the code in the
above pull request to avoid any production issues.

[0] https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#multipletrackers
