From 7683dc6a4598c848249683907b7c75a020672da4 Mon Sep 17 00:00:00 2001 From: john hayes-reed Date: Tue, 24 Oct 2023 13:57:36 +0100 Subject: [PATCH 1/2] Add env variable for enabling / disabling of analytics on development environments --- config/environments/development.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/development.rb b/config/environments/development.rb index 3d98184fd5..eaa183983c 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -69,7 +69,7 @@ config.x.structured_data.event = true config.x.structured_data.how_to = true - config.x.dfe_analytics = true + config.x.dfe_analytics = ENV["DFE_ANALYTICS"] # Allow access from Codespaces config.hosts << /[a-z0-9\-]+\.(preview\.app\.github|githubpreview)\.dev/ From 48380516f3b01616eabb36489484b5f95931694f Mon Sep 17 00:00:00 2001 From: john hayes-reed Date: Tue, 24 Oct 2023 14:16:40 +0100 Subject: [PATCH 2/2] Add env var for analytics to rolling for PAAS development and review app environments --- config/environments/rolling.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/rolling.rb b/config/environments/rolling.rb index 9fc0444658..675652afd6 100644 --- a/config/environments/rolling.rb +++ b/config/environments/rolling.rb @@ -10,5 +10,5 @@ config.x.display_content_errors = true - config.x.dfe_analytics = true + config.x.dfe_analytics = ENV["DFE_ANALYTICS"] end