1. Static Component Guide
  2. Analytics Meta Tags

Component

Analytics Meta Tags

Meta tags to provide analytics information about the current page

Currently this just takes a content-store links hash like object which it can then turn into the correct analytics identifier metadata tags.

The code which reads the meta tags can be found in static-analytics.js.

How to call this component

<%= render "govuk_component/analytics_meta_tags" {
  content_item: {
    links: {
      organisations: [
        {
          analytics_identifier: "D1"
        },
        {
          analytics_identifier: "D3"
        }
      ],
      worldwide_organisations: [
        {
          analytics_identifier: "EO3"
        }
      ]
    }
  }
} %>

How it looks

Other examples (preview all)

With world locations (preview)

<%= render "govuk_component/analytics_meta_tags" {
  content_item: {
    links: {
      world_locations: [
        {
          analytics_identifier: "WL3"
        }
      ]
    }
  }
} %>