alphagov / govuk_frontend_toolkit

❗️GOV.UK Frontend Toolkit is deprecated, and will only receive major bug fixes and security patches.
MIT License
403 stars 107 forks source link

Optionally strip dates from data sent to Google Analytics #459

Closed barrucadu closed 6 years ago

barrucadu commented 6 years ago

Some URLs can include dates of birth, which we should not sent to Google Analytics. For example: https://www.gov.uk/state-pension-age/y/age/1991-09-09/male. Previous work implemented optional postcode stripping, so I just copied that but for dates. The regex matches YYYY-MM-DD style dates, with the dashes optional.

Same approach as #435


Trello card

barrucadu commented 6 years ago

Good call. I've now mentioned this in #analysis.

barrucadu commented 6 years ago

Tim Leighton-Boyce from the performance analysis community spent Wednesday and Thursday last week on this, and is happy with it.