Image card example
With tracking
How it looks (preview)
How to call this example
<%= render "govuk_publishing_components/components/image_card", {
href: "/i-am-not-a-valid-link",
href_data_attributes: {
track_category: "href_category",
track_action: 1.1,
track_label: "href_label",
track_options: {
dimension28: 1,
dimension29: "dimension29Href"
}
},
image_src: "https://assets.publishing.service.gov.uk/government/uploads/system/uploads/feature/image/62756/s300_courts-of-justice.JPG",
image_alt: "some meaningful alt text please",
heading_text: "A link with tracking",
extra_details: [
{
text: "Another link with tracking",
href: "/1",
data_attributes: {
track_category: "extra_category",
track_action: 2.1,
track_label: "extra_label",
track_options: {
dimension28: 1,
dimension29: "dimension29Extra"
}
}
}
]
} %>