diff --git a/lib/source/layouts/_google_tag_manager_js.erb b/lib/source/layouts/_google_tag_manager_js.erb new file mode 100644 index 00000000..1715bc57 --- /dev/null +++ b/lib/source/layouts/_google_tag_manager_js.erb @@ -0,0 +1,12 @@ +<% if config[:tech_docs][:gtm_id].is_a?(String) && !config[:tech_docs][:gtm_id].empty? %> + +<% end %> diff --git a/lib/source/layouts/_google_tag_manager_non_js.erb b/lib/source/layouts/_google_tag_manager_non_js.erb new file mode 100644 index 00000000..e666b452 --- /dev/null +++ b/lib/source/layouts/_google_tag_manager_non_js.erb @@ -0,0 +1,4 @@ +<% if config[:tech_docs][:gtm_id].is_a?(String) && !config[:tech_docs][:gtm_id].empty? %> + +<% end %> diff --git a/lib/source/layouts/core.erb b/lib/source/layouts/core.erb index 29fbb481..646aea34 100644 --- a/lib/source/layouts/core.erb +++ b/lib/source/layouts/core.erb @@ -19,10 +19,12 @@ <%= tag :meta, property: property, content: content %> <% end %> + <%= partial 'layouts/google_tag_manager_js' %> <%= yield_content :head %>
+ <%= partial 'layouts/google_tag_manager_non_js' %>