forked from ONSdigital/sdg-indicators
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cookies-config.js
50 lines (50 loc) · 1.7 KB
/
cookies-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{% assign analytics_ga_prod = site.analytics.ga_prod and site.analytics.ga_prod != '' %}
{% assign analytics_ua = site.analytics.ua and site.analytics.ua != '' %}
{% assign analytics_gtag = site.analytics.gtag and site.analytics.gtag != '' %}
var klaroConfig = {
noAutoLoad: true, // no autoload because we have a custom notice and form
storageMethod: 'cookie',
cookieName: 'cookie_settings',
cookieExpiresAfterDays: 365,
default: false,
services: [
{
name: 'contrast',
default: true,
cookies: ['contrast'],
required: true,
},
{% if analytics_ga_prod or analytics_ua or analytics_gtag %}
{
name: 'google-analytics',
{% if site.analytics.extra_cookies %}
cookies: [].concat(['_gat', '_gid', '_ga'], {{ site.analytics.extra_cookies | jsonify }}),
{% else %}
cookies: ['_gat', '_gid', '_ga'],
{% endif %}
},
{% endif %}
{% if site.hotjar %}
{
name: 'hotjar',
cookies: [
'_hjClosedSurveyInvites',
'_hjDonePolls',
'_hjMinimizedPolls',
'_hjDoneTestersWidgets',
'_hjIncludedInSample',
'_hjShownFeedbackMessage',
'_hjid',
'_hjRecordingLastActivity',
'_hjTLDTest',
'_hjUserAttributesHash',
'_hjCachedUserAttributes',
'_hjLocalStorageTest',
'_hjAbsoluteSessionInProgress',
'_hjFirstSeen',
'_hjIncludedInPageviewSample',
],
},
{% endif %}
],
};