govuk_publishing_components 23.9.2 → 23.10.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a5c3e567099f08f4b08f708278596cd2501ff02cabe298ab35d006434bd2730
4
- data.tar.gz: 8e9ce2a9b09dcec29bbd2c3b6b55a288a4d8e4554a503e40112affc9254fe056
3
+ metadata.gz: 2ecb9d7058d12997da1cbd82df01e25e04059e2b2de149ccbcb5bc786a11d9db
4
+ data.tar.gz: 5e24b83c766c52629370320fc7a3338fdce35d5da4997c5cd0432d0f8d0426fc
5
5
  SHA512:
6
- metadata.gz: 73fb8d7d1356925b66421fabab0223d8d3b0218cedc6ecb461a957fed3c85b65d271b6e0d92543e00fd59c82fcfe9841693985bb49d5a6122b303d864752f19d
7
- data.tar.gz: c9222ffe49f2202771acd31099c680224eebd5b712505580637b0452a69881f95dddd7b6a4aadea33225314301a4a335f33f701a3eb131402a6cb83c64b62a4e
6
+ metadata.gz: 3f547a29c744182fae736f081810fe329417df81059f67f2999b0b8ea3631aafd446f9ef1d1c784d4ceb56e701ce7d2242473a4ff1ac2d8b265bd80c419c97ff
7
+ data.tar.gz: eba1c8c046f5e3ac865479c84d0ddf513394e4261d2ae8b4e83882ce32338f4fd69605f3df9bcb5307822aab1b4889d8b9889b6e4425a5d8f606551902aa0c71
@@ -14,3 +14,4 @@
14
14
  //= require ./analytics/ecommerce
15
15
  //= require ./analytics/init
16
16
  //= require ./analytics/scroll-tracker
17
+ //= require ./analytics/explicit-cross-domain-links
@@ -0,0 +1,34 @@
1
+ ;(function (global) {
2
+ 'use strict'
3
+
4
+ var GOVUK = global.GOVUK || {}
5
+ GOVUK.Modules = GOVUK.Modules || {}
6
+
7
+ GOVUK.Modules.ExplicitCrossDomainLinks = function () {
8
+ this.start = function ($module) {
9
+ var element = $module[0]
10
+
11
+ if (!global.ga) { return }
12
+
13
+ global.ga(function () {
14
+ var trackers = global.ga.getAll()
15
+
16
+ if (!trackers.length) { return }
17
+
18
+ var linker = new global.gaplugins.Linker(trackers[0])
19
+
20
+ var attrAction = element.getAttribute('action')
21
+ if (attrAction) {
22
+ element.setAttribute('action', linker.decorate(attrAction))
23
+ }
24
+
25
+ var attrHref = element.getAttribute('href')
26
+ if (attrHref) {
27
+ element.href = linker.decorate(attrHref)
28
+ }
29
+ })
30
+ }
31
+ }
32
+
33
+ global.GOVUK = GOVUK
34
+ })(window)
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "23.9.2".freeze
2
+ VERSION = "23.10.0".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: 23.9.2
4
+ version: 23.10.0
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: 2020-12-15 00:00:00.000000000 Z
11
+ date: 2020-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -404,6 +404,7 @@ files:
404
404
  - app/assets/javascripts/govuk_publishing_components/analytics/download-link-tracker.js
405
405
  - app/assets/javascripts/govuk_publishing_components/analytics/ecommerce.js
406
406
  - app/assets/javascripts/govuk_publishing_components/analytics/error-tracking.js
407
+ - app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js
407
408
  - app/assets/javascripts/govuk_publishing_components/analytics/external-link-tracker.js
408
409
  - app/assets/javascripts/govuk_publishing_components/analytics/google-analytics-universal-tracker.js
409
410
  - app/assets/javascripts/govuk_publishing_components/analytics/init.js