1. Component Guide
  2. Document list
  3. With extra ga4 data
Document list example

With extra ga4 data

Allows you to add extra GA4 link tracker attributes, or overwrite the existing ones on the links. See the ga4-link-tracker documentation for more information.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/document_list", {
  ga4_extra_data: {
    hello: "world"
  },
  items: [
    {
      link: {
        text: "Test link",
        path: "https://www.gov.uk",
        description: "GOV.UK link"
      }
    }
  ]
} %>