From 1a81cb8c9cb27d0d339dcc001394c11c58a6e07f Mon Sep 17 00:00:00 2001 From: Camille Villa <5402927+camillevilla@users.noreply.github.com> Date: Tue, 3 Sep 2024 15:21:13 -0700 Subject: [PATCH] Make sure previews are not included with DAP analytics --- app/helpers/application_helper.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 6e73962af..8623da356 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -217,6 +217,7 @@ def private_path? # https://github.com/digital-analytics-program/gov-wide-code#a params["controller"] == "admin" || # all admin pages (params["controller"] == "page" && !@page&.published?) || # unpublished PageBuilder pages (params["controller"] == "practices" && !["show", "index", "search"].include?(params["action"])) || # practice editor pages - (params["controller"] == "practices" && params["action"] == "show" && !@practice.is_public) # internal or unpublished practices + (params["controller"] == "practices" && params["action"] == "show" && !@practice.is_public) || # internal or unpublished practices + params["controller"] == "home" && params["action"] == "preview" # homepage previews end end