Component
Meta Tags
Meta tags to provide analytics information about the current page
This 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 it looks (preview all)
<meta name="govuk:analytics:organisations" content="<D1><D3><EO3>">
How to call this component
<%= render "govuk_publishing_components/components/meta_tags", {
content_item: {
links: {
organisations: [
{
analytics_identifier: "D1"
},
{
analytics_identifier: "D3"
}
],
worldwide_organisations: [
{
analytics_identifier: "EO3"
}
]
}
}
} %>
Accessibility acceptance criteria
The analytics meta tags component should not be visible to any users.
Other examples
With world locations (preview)
<meta name="govuk:analytics:world-locations" content="<WL3>">
<%= render "govuk_publishing_components/components/meta_tags", {
content_item: {
links: {
world_locations: [
{
analytics_identifier: "WL3"
}
]
}
}
} %>