hof 22.9.0-beta.v2 → 22.9.0-beta.v3
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.
package/config/hof-defaults.js
CHANGED
@@ -32,6 +32,7 @@ const defaults = {
|
|
32
32
|
Boolean(process.env.GA_TAG || process.env.GA_4_TAG),
|
33
33
|
'SHOW_COOKIES_BANNER'
|
34
34
|
),
|
35
|
+
hasGoogleAnalytics: Boolean(process.env.GA_TAG || process.env.GA_4_TAG),
|
35
36
|
// added to allow support for multiple HOF forms using GTM to customize how they track page views
|
36
37
|
gtm: {
|
37
38
|
tagId: process.env.GTM_TAG || false,
|
@@ -3,9 +3,9 @@
|
|
3
3
|
{{$propositionHeader}}{{/propositionHeader}}
|
4
4
|
|
5
5
|
{{$validationSummary}}
|
6
|
-
{{#
|
6
|
+
{{#hasGoogleAnalytics}}
|
7
7
|
{{> partials-cookie-notification}}
|
8
|
-
{{/
|
8
|
+
{{/hasGoogleAnalytics}}
|
9
9
|
{{/validationSummary}}
|
10
10
|
|
11
11
|
{{$header}}
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
{{$content}}
|
16
16
|
<p>{{intro}}</p>
|
17
|
-
{{^
|
17
|
+
{{^hasGoogleAnalytics}}
|
18
18
|
{{#intro-list}}
|
19
19
|
{{> partials-bullet-list}}
|
20
20
|
{{/intro-list}}
|
@@ -31,9 +31,9 @@
|
|
31
31
|
{{#session-cookies-table}}
|
32
32
|
{{> partials-session-cookies-table}}
|
33
33
|
{{/session-cookies-table}}
|
34
|
-
{{/
|
34
|
+
{{/hasGoogleAnalytics}}
|
35
35
|
|
36
|
-
{{#
|
36
|
+
{{#hasGoogleAnalytics}}
|
37
37
|
<div id="cookie-settings">
|
38
38
|
{{#intro-list-ga-tag}}
|
39
39
|
{{> partials-bullet-list}}
|
@@ -78,7 +78,7 @@
|
|
78
78
|
</form>
|
79
79
|
</div>
|
80
80
|
</div>
|
81
|
-
{{/
|
81
|
+
{{/hasGoogleAnalytics}}
|
82
82
|
|
83
83
|
{{/content}}
|
84
84
|
{{/layout}}
|
@@ -5,23 +5,28 @@
|
|
5
5
|
<h2 class="govuk-cookie-banner__heading govuk-heading-m">Cookies on {{#appName}}{{appName}}{{/appName}}{{^appName}}this service{{/appName}}</h2>
|
6
6
|
<div class="govuk-cookie-banner__content">
|
7
7
|
<p class="govuk-body">We use some essential cookies to make this website work.</p>
|
8
|
-
|
9
|
-
|
8
|
+
{{#hasGoogleAnalytics}}
|
9
|
+
<p class="govuk-body">We'd like to set additional cookies to understand how you use GOV.UK, remember your settings and improve government services.</p>
|
10
|
+
<p class="govuk-body">We also use cookies set by other sites to help us deliver content from their services.</p>
|
11
|
+
{{/hasGoogleAnalytics}}
|
10
12
|
</div>
|
11
13
|
</div>
|
12
14
|
</div>
|
15
|
+
|
13
16
|
<div id="cookie-banner-actions" class="govuk-button-group">
|
17
|
+
{{#hasGoogleAnalytics}}
|
14
18
|
<button id="accept-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-accept-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner accepted" data-cookie-types="all">Accept additional cookies</button>
|
15
19
|
|
16
20
|
<button id="reject-cookies-button" class="gem-c-button govuk-button" type="submit" data-module="gem-track-click" data-reject-cookies="true" data-track-category="cookieBanner" data-track-action="Cookie banner rejected">Reject additional cookies</button>
|
17
|
-
|
18
|
-
|
21
|
+
{{/hasGoogleAnalytics}}
|
22
|
+
<a class="govuk-link" href="/cookies">View cookies</a>
|
19
23
|
</div>
|
20
24
|
</div>
|
25
|
+
|
21
26
|
<div class="gem-c-cookie-banner__confirmation govuk-width-container" hidden="" id="cookie-banner-submitted" >
|
22
27
|
<p class="gem-c-cookie-banner__confirmation-message" role="alert">
|
23
|
-
|
24
|
-
|
28
|
+
Your cookie preferences have been saved. You can <a class="govuk-link" data-module="gem-track-click" data-track-category="cookieBanner" data-track-action="Cookie banner settings clicked from confirmation" href="/cookies">change your cookie settings</a> at any time.
|
29
|
+
</p>
|
25
30
|
<div class="govuk-button-group">
|
26
31
|
<button class="gem-c-cookie-banner__hide-button govuk-button" id="hide-cookie-banner">Hide this message</button>
|
27
32
|
</div>
|
package/lib/settings.js
CHANGED