Contextual sidebar example

Without ga4 tracking on related navigation

Disables GA4 tracking on components within the sidebar. Tracking is enabled by default. Currently only the Related Navigation component, Step by Step navigation component and Ukraine CTA have tracking.

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/contextual_sidebar", {
  disable_ga4: true,
  content_item: {
    title: "UK forces arrive to reinforce NATO’s eastern flank",
    content_id: "a342fd46-d801-4c1e-9d8f-f41fba6da563",
    locale: "en",
    links: {
      ordered_related_items: [
        {
          title: "Find an apprenticeship",
          base_path: "/apply-apprenticeship"
        },
        {
          title: "Careers helpline for teenagers",
          base_path: "/careers-helpline-for-teenagers"
        }
      ],
      document_collections: [
        {
          title: "Recruit an apprentice (formerly apprenticeship vacancies)",
          base_path: "/government/collections/apprenticeship-vacancies",
          document_type: "document_collection"
        },
        {
          title: "The future of jobs and skills",
          base_path: "/government/collections/the-future-of-jobs-and-skills",
          document_type: "document_collection"
        }
      ],
      topical_events: [
        {
          content_id: "bfa79635-ffda-4b5d-8266-a9cd3a03649c",
          title: "Russian invasion of Ukraine: UK government response",
          base_path: "/government/topical-events/russian-invasion-of-ukraine-uk-government-response",
          locale: "en"
        }
      ]
    }
  }
} %>