From 74559d57fcc0faff07d9ad00abaeec46dfe6d561 Mon Sep 17 00:00:00 2001 From: Richard Towers Date: Mon, 23 Oct 2023 10:25:15 +0100 Subject: [PATCH] Add AB test meta tag to /find-utr-number page If our AB test is active (see ContentItemsController#temporary_ab_test_find_utr_page) then @requested_variant will be set, and we should use it to add the required tag to the page. Technically this code will work for any Answer that sets a @requested_variant field, but I think that's probably okay / what people would want in that situation anyway. --- app/views/content_items/answer.html.erb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/views/content_items/answer.html.erb b/app/views/content_items/answer.html.erb index 8d0d0a9dc..006de7f60 100644 --- a/app/views/content_items/answer.html.erb +++ b/app/views/content_items/answer.html.erb @@ -16,6 +16,8 @@ <% elsif scroll_track_percent_paths.include?(@content_item.base_path) %> <% end %> + + <%= @requested_variant.analytics_meta_tag.html_safe if @requested_variant.present? %> <% end %> <%= render 'content_items/body_with_related_links' %>