% related_nav_helper = GovukPublishingComponents::Presenters::RelatedNavigationHelper.new(local_assigns) shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns) disable_ga4 ||= false ga4_type = local_assigns[:context] == :footer ? "contextual footer" : "related content" data = {} data[:module] = "gem-track-click" data[:module] << " ga4-link-tracker" unless disable_ga4 ga4_tracking_counts ||= OpenStruct.new(index_section_count: 0) ga4_tracking_counts.index_section_count += related_nav_helper.index_section_count add_gem_component_stylesheet("related-navigation") %> <% if related_nav_helper.related_navigation? %> <% random = SecureRandom.hex(4) %> <%= tag.div(class: "gem-c-related-navigation", data: data) do %> <% if local_assigns[:context] != :footer %>