(function (GOVUK) {
  'use strict'

  GOVUK.Analytics.load()
  GOVUK.analyticsVars = { primaryLinkedDomains: [document.domain] }
  GOVUK.analytics = new GOVUK.Analytics({
    universalId: 'UA-26179049-6', // GOVUK Apps GA ID
    cookieDomain: document.domain
  })

  GOVUK.analytics.trackPageview()
})(window.GOVUK)

(function (GOVUK) {
  'use strict'

  GOVUK.Analytics.load()
  GOVUK.analyticsVars = { primaryLinkedDomains: [document.domain] }
  GOVUK.analytics = new GOVUK.Analytics({
    universalId: 'UA-26179049-6', // GOVUK Apps GA ID
    cookieDomain: document.domain
  })

  GOVUK.analytics.trackPageview()
  GOVUK.analyticsPlugins.externalLinkTracker()
})(window.GOVUK)

Enable external link tracking plugin
Enable external link tracking plugin

This is needed to track external links on whitehall.

Previously, we had external link tracking but this was lost during the transition. It was assumed that external links were automatically tracked but the implementation requires the plugin to be called.
