govuk_template 0.25.0 → 0.26.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: 3445caa1a523612371182c8d3ff9161d553a90e79856e18b42f21f813cfff812
4
- data.tar.gz: dfbbb757c0ea2e672591de02f1a4d3cf9664ffac72b1410555d781588aafa1de
3
+ metadata.gz: 7049db604ea36d9d5296e247784d64375c133282dc697afa33c577071e494451
4
+ data.tar.gz: fece1c7e6294bf24e29f4ded4fa1935e30e19fa9e8497f9d2ef2feb2a173bd03
5
5
  SHA512:
6
- metadata.gz: fc2a611dd064f896615f0f1b8e8f8ee2c558ddec9cdbbb2b5695f691892d8a128f0aef9dd45baf515fb435616ebf37d8165b14ff2bc30c5b79fdd381cb9f6e2c
7
- data.tar.gz: fdcfc16dc9da4fc8af6d658cec9fa9a52d66ee1e1174aaa5b2757ad6f93e086005b285660f8e30f5e4c48fc554bb162c9cd3520cd0623baed0fc7102d5b8d541
6
+ metadata.gz: 43d73b8aa30742e720dfb16e0f809b90349018dc821af65a9b8422d8327a952e94ceb98e4a5a217f9af140f430cb4078337d7c4eae1d9200caaefd914c8a39c5
7
+ data.tar.gz: 3eef47e899fe807865e8e5bddac1d31a5d776bdfb5bfc2bc14126666a4b47a2f193a41a4f9894542bce94e0b091b63ef009745a13c07271e173392a16c79a337
@@ -60,20 +60,31 @@
60
60
  };
61
61
  }).call(this);
62
62
  (function () {
63
- "use strict"
64
- var root = this;
65
- if(typeof root.GOVUK === 'undefined') { root.GOVUK = {}; }
63
+ 'use strict'
64
+ var root = this
65
+ if (typeof root.GOVUK === 'undefined') { root.GOVUK = {} }
66
66
 
67
67
  GOVUK.addCookieMessage = function () {
68
- var message = document.getElementById('global-cookie-message'),
69
- hasCookieMessage = (message && GOVUK.cookie('seen_cookie_message') === null);
68
+ var message = document.getElementById('global-cookie-message')
69
+
70
+ var hasCookieMessage = (message && GOVUK.cookie('seen_cookie_message') === null)
70
71
 
71
72
  if (hasCookieMessage) {
72
- message.style.display = 'block';
73
- GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 });
74
- }
75
- };
76
- }).call(this);
73
+ message.style.display = 'block'
74
+ GOVUK.cookie('seen_cookie_message', 'yes', { days: 28 })
75
+
76
+ document.addEventListener('DOMContentLoaded', function (event) {
77
+ if (GOVUK.analytics && typeof GOVUK.analytics.trackEvent === 'function') {
78
+ GOVUK.analytics.trackEvent('cookieBanner', 'Cookie banner shown', {
79
+ value: 1,
80
+ nonInteraction: true
81
+ })
82
+ }
83
+ })
84
+ };
85
+ }
86
+ }).call(this)
87
+ ;
77
88
  (function() {
78
89
  "use strict"
79
90
 
@@ -51,7 +51,7 @@
51
51
  <% if content_for?(:cookie_message) %>
52
52
  <%= yield :cookie_message %>
53
53
  <% else %>
54
- <p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies">Find out more about cookies</a></p>
54
+ <p>GOV.UK uses cookies to make the site simpler. <a href="https://www.gov.uk/help/cookies" data-module="track-click" data-track-category="cookieBanner" data-track-action="Cookie banner clicked">Find out more about cookies</a></p>
55
55
  <% end %>
56
56
  </div>
57
57
 
@@ -1,3 +1,3 @@
1
1
  module GovukTemplate
2
- VERSION = "0.25.0"
2
+ VERSION = "0.26.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.26.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: 2018-11-08 00:00:00.000000000 Z
11
+ date: 2019-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -233,8 +233,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
233
233
  - !ruby/object:Gem::Version
234
234
  version: '0'
235
235
  requirements: []
236
- rubyforge_project:
237
- rubygems_version: 2.7.8
236
+ rubygems_version: 3.0.3
238
237
  signing_key:
239
238
  specification_version: 4
240
239
  summary: Rails engine supplying the GOV.UK header/footer template