1. Component Guide
  2. Step by step navigation
  3. With unique tracking
Step by step navigation example

With unique tracking

In order to identify the step by step navigation the component is part of, we need to track a unique ID of the navigation in Universal Analytics. This ID should be the same across all pages that are linked from and are part of that navigation. Its value is included in any tracking events, specifically in dimension96. It refers to the ID of the step nav page.

This includes show/hide all, show/hide step and any link clicks.

How it looks (preview)

  1. Step 1 Unique tracking id

How to call this example

<%= render "govuk_publishing_components/components/step_by_step_nav", {
  tracking_id: "this-is-the-tracking-id",
  steps: [
    {
      title: "Unique tracking id",
      contents: [
        {
          type: "list",
          contents: [
            {
              href: "#",
              text: "This is a link"
            }
          ]
        }
      ]
    }
  ]
} %>