Skip to content

Commit

Permalink
Add AB test to request new Explore supermenu header from Static
Browse files Browse the repository at this point in the history
Static has a new header that the GOV.UK Explore team want to AB test as part of their beta.
  • Loading branch information
chao-xian committed Jun 22, 2021
1 parent 99f73f1 commit 4a914fe
Show file tree
Hide file tree
Showing 23 changed files with 64 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/views/completed_transaction/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% content_for :extra_headers do %>
<meta name="robots" content="noindex, nofollow" />
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
Expand Down
1 change: 1 addition & 0 deletions app/views/electoral/address_picker.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% content_for :extra_headers do %>
<meta name="robots" content="noindex">
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<div class="govuk-grid-column-two-thirds">
Expand Down
1 change: 1 addition & 0 deletions app/views/electoral/results.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% content_for :extra_headers do %>
<meta name="robots" content="noindex">
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<div class="govuk-grid-column-two-thirds">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'base_page' do %>
<%= render "govuk_publishing_components/components/heading", {
text: t('formats.local_transaction.county_district_council'),
Expand Down
4 changes: 4 additions & 0 deletions app/views/find_local_council/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'base_page' do %>
<p class="govuk-body"><%= t('formats.local_transaction.find_council_website') %></p>
<%= render partial: 'location_form',
Expand Down
4 changes: 4 additions & 0 deletions app/views/find_local_council/one_council.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'base_page' do %>
<%= render "govuk_publishing_components/components/heading", {
text: "Your postcode is in:",
Expand Down
1 change: 1 addition & 0 deletions app/views/help/ab_testing.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% content_for :title, "A/B testing - GOV.UK" %>
<% content_for :extra_headers do %>
<%= @requested_variant.analytics_meta_tag.html_safe %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<meta name="robots" content="noindex">
<% end %>

Expand Down
4 changes: 4 additions & 0 deletions app/views/help/cookie_settings.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<% content_for :title, "Cookies on GOV.UK" %>
<main id="content" role="main" class="group help-page cookie-settings govuk-grid-column-two-thirds">
<div class="cookie-settings__confirmation" data-cookie-confirmation="true">
Expand Down
1 change: 1 addition & 0 deletions app/views/help/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<% content_for :extra_headers do %>
<meta name="description"
content="<%= t('help.index.find_out') %>"/>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<main id="content" role="main">
Expand Down
1 change: 1 addition & 0 deletions app/views/help/tour.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<% content_for :extra_headers do %>
<meta name="description"
content="About the GOV.UK website: a clearer, simpler and faster way to get what you need from the government." />
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<main id="content" role="main">
Expand Down
2 changes: 1 addition & 1 deletion app/views/homepage/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<% content_for :extra_headers do %>
<link rel="canonical" href="<%= Frontend.govuk_website_root + root_path %>" />
<meta name="description" content="GOV.UK - The place to find government services and information - Simpler, clearer, faster" />
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>
<% content_for :title, "Welcome to GOV.UK" %>
<% content_for :body_classes, "homepage" %>
Expand Down
4 changes: 4 additions & 0 deletions app/views/licence/authority.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
main_class: ("multi-page" if @licence_details.authority),
context: "Licence",
Expand Down
4 changes: 4 additions & 0 deletions app/views/licence/continues_on.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
context: "Licence",
title: @publication.title,
Expand Down
4 changes: 4 additions & 0 deletions app/views/licence/start.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
main_class: ("multi-page" if @licence_details.authority),
context: "Licence",
Expand Down
4 changes: 4 additions & 0 deletions app/views/local_transaction/results.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
title: @publication.title,
publication: @publication,
Expand Down
4 changes: 4 additions & 0 deletions app/views/local_transaction/search.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<% content_for :extra_headers do %>
<%= render 'govuk_publishing_components/components/machine_readable_metadata',
schema: :article,
Expand Down
4 changes: 4 additions & 0 deletions app/views/local_transaction/unavailable_service.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
title: @service.title,
publication: @publication,
Expand Down
4 changes: 4 additions & 0 deletions app/views/place/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<% content_for :extra_headers do %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<% content_for :extra_headers do %>
<%= render 'govuk_publishing_components/components/machine_readable_metadata',
schema: :article,
Expand Down
1 change: 1 addition & 0 deletions app/views/roadmap/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta property="og:url" content="https://www.gov.uk/roadmap" />
<meta property="og:title" content="Roadmap - GOV.UK" />
<meta property="og:description" content="<%= t('roadmap.hero.description') %>" />
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<main id="content" class="govuk-main-wrapper">
Expand Down
1 change: 1 addition & 0 deletions app/views/simple_smart_answers/flow.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<% content_for :extra_headers do %>
<meta name="robots" content="noindex" />
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<main id="content" class="govuk-main-wrapper">
Expand Down
1 change: 1 addition & 0 deletions app/views/simple_smart_answers/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<%= render "govuk_publishing_components/components/machine_readable_metadata",
schema: :article,
content_item: @content_item %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: "shared/base_page", locals: {
Expand Down
16 changes: 9 additions & 7 deletions app/views/transaction/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,20 @@
schema: :government_service,
content_item: @content_item %>

<% if MachineReadable::YamlFaqPageSchemaPresenter.configured?(@publication) %>
<% schema = MachineReadable::YamlFaqPageSchemaPresenter.new(@publication) %>
<% if schema.current? %>
<script type="application/ld+json">
<%= raw schema.structured_data.to_json %>
</script>
<% if MachineReadable::YamlFaqPageSchemaPresenter.configured?(@publication) %>
<% schema = MachineReadable::YamlFaqPageSchemaPresenter.new(@publication) %>
<% if schema.current? %>
<script type="application/ld+json">
<%= raw schema.structured_data.to_json %>
</script>
<% end %>
<% end %>
<% end %>

<% if @publication.variant_slug.present? %>
<meta name="robots" content="noindex, nofollow" />
<% end %>

<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<%= render layout: 'shared/base_page', locals: {
Expand Down
1 change: 1 addition & 0 deletions app/views/travel_advice/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<% content_for :extra_headers do %>
<%= javascript_include_tag "views/travel-advice.js", integrity: false %>
<%= auto_discovery_link_tag :atom, travel_advice_path(:format => :atom), :title => "Recent updates" %>
<%= explore_menu_variant.analytics_meta_tag.html_safe if explore_menu_testable? %>
<% end %>

<main id="content" role="main" class="group full-width">
Expand Down

0 comments on commit 4a914fe

Please sign in to comment.