govuk_publishing_components 35.21.1 → 35.21.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-auto-tracker.js +2 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +15 -0
- data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +5 -17
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c928d56fbe68a0a4819b63b6057a80667c24713ecc0bc79dbeaa5980f036125
|
4
|
+
data.tar.gz: e17a211723d9d0100e69120d84dc293980677bae6bf39b0d3cf4901edbcf0b69
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2004ec2b34d6559eae86c18224a7f58f6d1e55c80842d6ced8a285f6c5e8db83d2fe1dc1cb87f00b7db8d673a24b5922d2b2afe0f916ad448a36566cd1ec2d2
|
7
|
+
data.tar.gz: 7c1262f1545a1fca6b0c14c5fe7ac2b681f6b506028dfa065319d0ec7902955d820e8ff1261a5f172b8dfcbcf066c4cf18c6263f3f5bc029252efe8881675527
|
@@ -7,6 +7,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
7
7
|
function Ga4AutoTracker (module) {
|
8
8
|
this.module = module
|
9
9
|
this.trackingTrigger = 'data-ga4-auto'
|
10
|
+
this.PIIRemover = new window.GOVUK.analyticsGa4.PIIRemover()
|
10
11
|
}
|
11
12
|
|
12
13
|
Ga4AutoTracker.prototype.init = function () {
|
@@ -35,6 +36,7 @@ window.GOVUK.Modules = window.GOVUK.Modules || {};
|
|
35
36
|
return
|
36
37
|
}
|
37
38
|
|
39
|
+
data.text = this.PIIRemover.stripPIIWithOverride(data.text, true, true)
|
38
40
|
var schemas = new window.GOVUK.analyticsGa4.Schemas()
|
39
41
|
var schema = schemas.mergeProperties(data, 'event_data')
|
40
42
|
|
@@ -43,6 +43,7 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
43
43
|
data.govuk_gem_version = this.getGemVersion()
|
44
44
|
// set this in the console as a debugging aid
|
45
45
|
if (window.GOVUK.analyticsGa4.showDebug) {
|
46
|
+
data.event_data = this.sortEventData(data.event_data)
|
46
47
|
console.info(JSON.stringify(data, null, ' '))
|
47
48
|
}
|
48
49
|
window.dataLayer.push(data)
|
@@ -52,6 +53,20 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
52
53
|
return window.GOVUK.analyticsGa4.vars.gem_version || 'not found'
|
53
54
|
},
|
54
55
|
|
56
|
+
sortEventData: function (eventData) {
|
57
|
+
if (!Object.keys) { // check for IE9 and below
|
58
|
+
return eventData
|
59
|
+
}
|
60
|
+
|
61
|
+
var keys = Object.keys(eventData)
|
62
|
+
keys.sort()
|
63
|
+
var newEventData = {}
|
64
|
+
for (var i = 0; i < keys.length; i++) {
|
65
|
+
newEventData[keys[i]] = eventData[keys[i]]
|
66
|
+
}
|
67
|
+
return newEventData
|
68
|
+
},
|
69
|
+
|
55
70
|
trackFunctions: {
|
56
71
|
|
57
72
|
getDomainRegex: function () {
|
@@ -851,11 +851,6 @@ $after-button-padding-left: govuk-spacing(4);
|
|
851
851
|
}
|
852
852
|
}
|
853
853
|
|
854
|
-
.gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__navigation-second-item-link {
|
855
|
-
font-size: 19px;
|
856
|
-
font-size: govuk-px-to-rem(19px);
|
857
|
-
}
|
858
|
-
|
859
854
|
.gem-c-layout-super-navigation-header__navigation-second-item-link--with-description {
|
860
855
|
font-size: 16px;
|
861
856
|
font-size: govuk-px-to-rem(16px);
|
@@ -881,13 +876,11 @@ $after-button-padding-left: govuk-spacing(4);
|
|
881
876
|
}
|
882
877
|
|
883
878
|
.gem-c-layout-super-navigation-header__navigation-second-item-description {
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
font-size: govuk-px-to-rem(19px);
|
890
|
-
margin-top: govuk-spacing(2);
|
879
|
+
@include govuk-typography-common;
|
880
|
+
font-size: 16px;
|
881
|
+
font-size: govuk-px-to-rem(16px);
|
882
|
+
font-weight: normal;
|
883
|
+
margin: govuk-spacing(1) 0 0 0;
|
891
884
|
}
|
892
885
|
|
893
886
|
.gem-c-layout-super-navigation-header__search-form {
|
@@ -911,11 +904,6 @@ $after-button-padding-left: govuk-spacing(4);
|
|
911
904
|
}
|
912
905
|
}
|
913
906
|
|
914
|
-
.gem-c-layout-super-navigation-header__navigation-dropdown-menu--large-navbar .gem-c-layout-super-navigation-header__popular-link {
|
915
|
-
font-size: 19px;
|
916
|
-
font-size: govuk-px-to-rem(19px);
|
917
|
-
}
|
918
|
-
|
919
907
|
.gem-c-layout-super-navigation-header__width-container {
|
920
908
|
@include govuk-media-query($until: "desktop") {
|
921
909
|
margin: 0;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: govuk_publishing_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 35.21.
|
4
|
+
version: 35.21.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: govuk_app_config
|