Skip to content

Commit

Permalink
Make sure previews are not included with DAP analytics
Browse files Browse the repository at this point in the history
  • Loading branch information
camillevilla committed Sep 4, 2024
1 parent 2a9fa1c commit 1a81cb8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1a81cb8

Please sign in to comment.