Skip to content

Commit

Permalink
added comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nikiwycherley committed Jun 26, 2023
1 parent dc69d8e commit 702e658
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/src/js/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ function deleteCookie (name) {
try {
const expires = 'Thu, 01 Jan 1970 00:00:00 UTC'
document.cookie = name + '=; expires=' + expires + '; path=/; domain=' + window.location.hostname
// clears GA cookies that are set on the .defra.cloud domain by default, may be able to remove line
// in future once GA4 is fully rolled out to all users
document.cookie = name + '=; expires=' + expires + '; path=/; domain=.defra.cloud;'
} catch (error) {
console.error(`Failed to delete cookie ${name}: ${error}`)
Expand Down

0 comments on commit 702e658

Please sign in to comment.