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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ecb9d7058d12997da1cbd82df01e25e04059e2b2de149ccbcb5bc786a11d9db
|
4
|
+
data.tar.gz: 5e24b83c766c52629370320fc7a3338fdce35d5da4997c5cd0432d0f8d0426fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f547a29c744182fae736f081810fe329417df81059f67f2999b0b8ea3631aafd446f9ef1d1c784d4ceb56e701ce7d2242473a4ff1ac2d8b265bd80c419c97ff
|
7
|
+
data.tar.gz: eba1c8c046f5e3ac865479c84d0ddf513394e4261d2ae8b4e83882ce32338f4fd69605f3df9bcb5307822aab1b4889d8b9889b6e4425a5d8f606551902aa0c71
|
data/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js
ADDED
@@ -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)
|
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.
|
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-
|
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
|