govuk_publishing_components 27.8.0 → 27.8.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a177d643883dea8f63ce0c6931e9170ab46e4d50e3499b430c9a67ddb84cb2ca
4
- data.tar.gz: e9b25ea90b6d0fd6269df2acf19a8d724884635ad0dbd84b4279e574737a30ac
3
+ metadata.gz: 2f2aa4a5338ce625693a82792f054575ba77e17f7b59dec7a43375cd69bdc0a0
4
+ data.tar.gz: b972a36c99f444e03f1190b54dc38c48a4e755779df9b3596331765785a0ea28
5
5
  SHA512:
6
- metadata.gz: b1279ab602818802cf978a9742a8ba40ccdeef9478307c8f724dfa9d8b024ba33945b7dd8eaaa1f758f48c6a70d61957a3b1936db692d04b4c5fb439a7d7bc2d
7
- data.tar.gz: 81a267c76307c65fc8a0cca680d82421e18e9e494a1d3a31b252563a05d6b88b38c3d1bb60c1b66bac958f7be668b918b2b9aab53b19f94ab599512e7bd6a5e8
6
+ metadata.gz: 7ef57a9ae12333724ca55b5826eb2f962e02c51877e2944b10d7d214258e38aa517317692cc1ee2aab58f38ed7051ebf9fe3ddc864e6982330baf286fe314f9d
7
+ data.tar.gz: 8548a40fad2185b2a63fd7c7748f1bcee2511dfc0c610fbeb8f50caf7ad0daf6739e04fe0c06bcf9e52536d71e8a35203f22847a83ece3b3517c826eda87a8ae
@@ -36,11 +36,20 @@
36
36
  fieldsObject = { cookieDomain: fieldsObject }
37
37
  }
38
38
 
39
+ function setLinkedDomains () {
40
+ var domains = window.GOVUK.analyticsVars.primaryLinkedDomains
41
+ if (domains && domains.length > 0) {
42
+ sendToGa('require', 'linker')
43
+ sendToGa('linker:autoLink', domains)
44
+ }
45
+ }
46
+
39
47
  configureProfile()
40
48
  anonymizeIp()
41
49
  disableAdFeatures()
42
50
  stripTitlePII()
43
51
  stripLocationPII()
52
+ setLinkedDomains()
44
53
  }
45
54
 
46
55
  GoogleAnalyticsUniversalTracker.load = function () {
@@ -3,9 +3,12 @@ var analyticsInit = function () {
3
3
 
4
4
  var analyticsVars = window.GOVUK.analyticsVars || false
5
5
  if (analyticsVars) {
6
- var gaProperty = window.GOVUK.analyticsVars.gaProperty || false
7
- var gaPropertyCrossDomain = window.GOVUK.analyticsVars.gaPropertyCrossDomain || false
8
- var linkedDomains = window.GOVUK.analyticsVars.linkedDomains || false
6
+ // the property naming convention here isn't consistent, but used in static and
7
+ // govuk-account-manager-prototype, so hard to change
8
+ var primaryGaProperty = window.GOVUK.analyticsVars.gaProperty || false
9
+
10
+ var crossDomainGaProperty = window.GOVUK.analyticsVars.gaPropertyCrossDomain || false
11
+ var crossDomainLinkedDomains = window.GOVUK.analyticsVars.linkedDomains || false
9
12
  }
10
13
 
11
14
  window.GOVUK.Analytics.checkDigitalIdentityConsent = function (location) {
@@ -39,7 +42,7 @@ var analyticsInit = function () {
39
42
 
40
43
  // Disable analytics by default
41
44
  // This will be reversed below, if the consent cookie says usage cookies are allowed
42
- var disabler = 'ga-disable-' + gaProperty
45
+ var disabler = 'ga-disable-' + primaryGaProperty
43
46
  window[disabler] = true
44
47
 
45
48
  if (consentCookie && consentCookie.usage) {
@@ -48,14 +51,14 @@ var analyticsInit = function () {
48
51
  // Load Google Analytics libraries
49
52
  window.GOVUK.StaticAnalytics.load()
50
53
 
51
- if (gaProperty) {
54
+ if (primaryGaProperty) {
52
55
  // Use document.domain in dev, preview and staging so that tracking works
53
56
  // Otherwise explicitly set the domain as www.gov.uk (and not gov.uk).
54
57
  var cookieDomain = (document.domain === 'www.gov.uk') ? '.www.gov.uk' : document.domain
55
58
 
56
59
  // Configure profiles, setup custom vars, track initial pageview
57
60
  var analytics = new window.GOVUK.StaticAnalytics({
58
- universalId: gaProperty,
61
+ universalId: primaryGaProperty,
59
62
  cookieDomain: cookieDomain,
60
63
  allowLinker: true
61
64
  })
@@ -63,8 +66,9 @@ var analyticsInit = function () {
63
66
  // Make interface public for virtual pageviews and events
64
67
  window.GOVUK.analytics = analytics
65
68
 
66
- if (linkedDomains && linkedDomains.length > 0) {
67
- window.GOVUK.analytics.addLinkedTrackerDomain(gaPropertyCrossDomain, 'govuk', linkedDomains)
69
+ // set up linking of domains for cross domain ga property
70
+ if (crossDomainLinkedDomains && crossDomainLinkedDomains.length > 0) {
71
+ window.GOVUK.analytics.addLinkedTrackerDomain(crossDomainGaProperty, 'govuk', crossDomainLinkedDomains)
68
72
  }
69
73
  }
70
74
  } else {
@@ -0,0 +1,3 @@
1
+ .gem-c-organisation-logo__image {
2
+ max-width: 100%;
3
+ }
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "27.8.0".freeze
2
+ VERSION = "27.8.1".freeze
3
3
  end
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: 27.8.0
4
+ version: 27.8.1
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: 2021-10-18 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -642,6 +642,7 @@ files:
642
642
  - app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak-html-publication.scss
643
643
  - app/assets/stylesheets/govuk_publishing_components/components/print/_govspeak.scss
644
644
  - app/assets/stylesheets/govuk_publishing_components/components/print/_layout-super-navigation-header.scss
645
+ - app/assets/stylesheets/govuk_publishing_components/components/print/_organisation-logo.scss
645
646
  - app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav-header.scss
646
647
  - app/assets/stylesheets/govuk_publishing_components/components/print/_step-by-step-nav.scss
647
648
  - app/assets/stylesheets/govuk_publishing_components/components/print/_textarea.scss