Skip to content

Release 2098

Choose a tag to compare

@github-actions github-actions released this 16 Nov 10:42
024a2ef

Trello card

Trello

Context

When auto is specified for the Google Analytics cookie domain (which it is in the recommended snippet), then it will be set to the highest possible domain level. For School Experience, this will be .education.gov.uk.

However, Rails ActionDispatch::Cookies defaults to the full domain including subdomains (schoolexperience.education.gov.uk).

This meant that we were adding the Google Analytics cookies on .education.gov.uk, but trying to remove them from schoolexperience.education.gov.uk when the user opts out. The domains must match, so the cookies weren't being removed.

Removing the auto setting means that the cookies use the default value of the full domain instead.

Changes proposed in this pull request

  • Remove Google Analytics automatic cookie domain configuration.