1. Component Guide
  2. Big number
  3. With data attributes
Big number example

With data attributes

If a href attribute is present, data_attributes will apply to the span containing the number value (see below).

Note that the component does not include built in tracking. If this is required consider using the track click script.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/big_number", {
  number: 23,
  label: "Ministerial departments",
  href: "/government/organisations#ministerial_departments",
  data_attributes: {
    "track-category": "homepageClicked",
    "track-action": "departmentsLink",
    "track-label": "/government/organisations#ministerial_departments",
    "track-dimension": "23 Ministerial departments",
    "track-dimension-index": 29
  }
} %>