govuk_publishing_components 35.3.4 → 35.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/ga4-core.js +4 -0
- data/app/assets/javascripts/govuk_publishing_components/analytics-ga4/init-ga4.js +1 -1
- data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss +0 -24
- data/app/views/govuk_publishing_components/components/_related_navigation.html.erb +3 -1
- data/app/views/govuk_publishing_components/components/related_navigation/_section.html.erb +1 -1
- data/config/locales/en.yml +2 -2
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3d392a9b81ae24c8b1a28866c2b9de1b8f1416e8242a214b41885d5ffd1bb583
|
|
4
|
+
data.tar.gz: 5a8cc4ed7a4819aaf9113f24367a58699e519e9ccebf01c854193f3e010eaa42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70b9c68201b266e1e19b48346994d5783b5246c5944de3fe59f5b703c634e8ad6db15722d9ef2781750380826b961f170ec9057c365e10f2c4986e528f5d7198
|
|
7
|
+
data.tar.gz: c55cfea102e83bc8c2423a77d21ce92dc58c8e33e84b301923bd880254b4082b6bb255f1d22fc6d62077787209417d7acb4bd541947dfc45910322ca24a694f7
|
|
@@ -32,6 +32,10 @@ window.GOVUK.analyticsGa4 = window.GOVUK.analyticsGa4 || {};
|
|
|
32
32
|
|
|
33
33
|
sendData: function (data) {
|
|
34
34
|
data.govuk_gem_version = this.getGemVersion()
|
|
35
|
+
// set this in the console as a debugging aid
|
|
36
|
+
if (window.GOVUK.analyticsGa4.showDebug) {
|
|
37
|
+
console.info(JSON.stringify(data, null, ' '))
|
|
38
|
+
}
|
|
35
39
|
window.dataLayer.push(data)
|
|
36
40
|
},
|
|
37
41
|
|
|
@@ -11,7 +11,7 @@ var initFunction = function () {
|
|
|
11
11
|
var attachmentLinkData = [
|
|
12
12
|
{ key: 'data-module', value: 'ga4-link-tracker' },
|
|
13
13
|
{ key: 'data-ga4-track-links-only', value: '' },
|
|
14
|
-
{ key: 'data-ga4-link', value: JSON.stringify({ event_name: 'navigation', type: '
|
|
14
|
+
{ key: 'data-ga4-link', value: JSON.stringify({ event_name: 'navigation', type: 'attachment' }) }]
|
|
15
15
|
window.GOVUK.analyticsGa4.core.trackFunctions.addAttributesToElements('[data-ga4-attachment-link]', attachmentLinkData)
|
|
16
16
|
window.GOVUK.analyticsGa4.core.load()
|
|
17
17
|
|
data/app/assets/stylesheets/govuk_publishing_components/components/helpers/_brand-colours.scss
CHANGED
|
@@ -96,27 +96,3 @@
|
|
|
96
96
|
border-color: #045f71;
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
// This change should be removed after relevant govuk-frontend release
|
|
101
|
-
|
|
102
|
-
.brand--department-for-business-and-trade {
|
|
103
|
-
.brand__color {
|
|
104
|
-
color: #cf102d;
|
|
105
|
-
|
|
106
|
-
&:link,
|
|
107
|
-
&:visited,
|
|
108
|
-
&:active {
|
|
109
|
-
color: #cf102d;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:hover,
|
|
113
|
-
&:focus {
|
|
114
|
-
color: $govuk-focus-text-colour;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
&.brand__border-color,
|
|
119
|
-
.brand__border-color {
|
|
120
|
-
border-color: #cf102d;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
related_nav_helper = GovukPublishingComponents::Presenters::RelatedNavigationHelper.new(local_assigns)
|
|
3
3
|
shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
|
|
4
4
|
ga4_tracking ||= false
|
|
5
|
+
ga4_type = local_assigns[:context] == :footer ? "contextual footer" : "related content"
|
|
5
6
|
data = {}
|
|
6
7
|
data[:module] = "gem-track-click"
|
|
7
8
|
data[:module] << " ga4-link-tracker" if ga4_tracking
|
|
@@ -42,7 +43,8 @@
|
|
|
42
43
|
section_index: section_index,
|
|
43
44
|
section_count: ga4_tracking_counts.index_section_count,
|
|
44
45
|
random: random,
|
|
45
|
-
ga4_tracking: ga4_tracking
|
|
46
|
+
ga4_tracking: ga4_tracking,
|
|
47
|
+
ga4_type: ga4_type %>
|
|
46
48
|
<% end %>
|
|
47
49
|
<% end %>
|
|
48
50
|
<% end %>
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
link_class = "govuk-link #{related_nav_helper.section_css_class("govuk-link gem-c-related-navigation__section-link", section_title, link: link, link_is_inline: (index >= section_link_limit))}"
|
|
35
35
|
ga4_attributes = {
|
|
36
36
|
event_name: "navigation",
|
|
37
|
-
type:
|
|
37
|
+
type: ga4_type,
|
|
38
38
|
index: {
|
|
39
39
|
index_section: "#{section_index}",
|
|
40
40
|
index_link: "#{index}",
|
data/config/locales/en.yml
CHANGED
|
@@ -236,10 +236,10 @@ en:
|
|
|
236
236
|
href: "/guidance/getting-the-energy-bills-support-scheme-discount"
|
|
237
237
|
- label: Find a job
|
|
238
238
|
href: "/find-a-job"
|
|
239
|
-
- label: Coronavirus (COVID-19)
|
|
240
|
-
href: "/coronavirus"
|
|
241
239
|
- label: 'Universal Credit account: sign in'
|
|
242
240
|
href: "/sign-in-universal-credit"
|
|
241
|
+
- label: Check your National Insurance record
|
|
242
|
+
href: "/check-national-insurance-record"
|
|
243
243
|
popular_links_heading: Popular on GOV.UK
|
|
244
244
|
search_text: Search GOV.UK
|
|
245
245
|
metadata:
|
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.3.
|
|
4
|
+
version: 35.3.5
|
|
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-05-
|
|
11
|
+
date: 2023-05-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_app_config
|
|
@@ -1453,7 +1453,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1453
1453
|
- !ruby/object:Gem::Version
|
|
1454
1454
|
version: '0'
|
|
1455
1455
|
requirements: []
|
|
1456
|
-
rubygems_version: 3.4.
|
|
1456
|
+
rubygems_version: 3.4.13
|
|
1457
1457
|
signing_key:
|
|
1458
1458
|
specification_version: 4
|
|
1459
1459
|
summary: A gem to document components in GOV.UK frontend applications
|