govuk_frontend_toolkit
Advanced tools
Comparing version 7.5.0 to 7.6.0
@@ -0,1 +1,5 @@ | ||
# 7.6.0 | ||
- Strip emails from urls for all GA requests to catch cases when GA generates a new event (e.g. page timings): ([PR 466](https://github.com/alphagov/govuk_frontend_toolkit/pull/466)). | ||
# 7.5.0 | ||
@@ -2,0 +6,0 @@ |
@@ -23,2 +23,6 @@ ;(function (global) { | ||
function stripLocationPII () { | ||
sendToGa('set', 'location', stripEmailAddressesFromString(window.location.href)) | ||
} | ||
// Support legacy cookieDomain param | ||
@@ -32,2 +36,3 @@ if (typeof fieldsObject === 'string') { | ||
disableAdTracking() | ||
stripLocationPII() | ||
} | ||
@@ -165,2 +170,7 @@ | ||
function stripEmailAddressesFromString (string) { | ||
var stripped = string.replace(/[^\s=/?&]+(?:@|%40)[^\s=/?&]+/g, '[email]') | ||
return stripped | ||
} | ||
GOVUK.GoogleAnalyticsUniversalTracker = GoogleAnalyticsUniversalTracker | ||
@@ -167,0 +177,0 @@ |
{ | ||
"name": "govuk_frontend_toolkit", | ||
"version": "7.5.0", | ||
"version": "7.6.0", | ||
"description": "npm package for using the GOV.UK frontend toolkit", | ||
@@ -5,0 +5,0 @@ "repository": { |
492008
1683