1. Component Guide
  2. Contextual sidebar
  3. Without ga4 tracking on step by step
Contextual sidebar example

Without ga4 tracking on step by step

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 accept this option.

How it looks (preview)

  1. Step 1 Register the death

  2. Step 2 Arrange the funeral

How to call this example

<%= render "govuk_publishing_components/components/contextual_sidebar", {
  disable_ga4: true,
  content_item: {
    title: "A content item",
    links: {
      part_of_step_navs: [
        {
          title: "What to do when someone dies: step by step",
          base_path: "/when-someone-dies",
          details: {
            step_by_step_nav: {
              title: "What to do when someone dies: step by step",
              steps: [
                {
                  title: "Register the death",
                  contents: [
                    {
                      type: "list",
                      contents: [
                        {
                          text: "Register the death",
                          href: "/after-a-death"
                        }
                      ]
                    }
                  ],
                  optional: false
                },
                {
                  title: "Arrange the funeral",
                  contents: [
                    {
                      type: "list",
                      contents: [
                        {
                          text: "Arrange the funeral",
                          href: "/after-a-death/arrange-the-funeral"
                        }
                      ]
                    }
                  ],
                  optional: false
                }
              ]
            }
          }
        }
      ]
    }
  }
} %>