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.
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