Skip to content

Commit 5ec3745

Browse files
committed
cc
1 parent 3e0eb09 commit 5ec3745

9 files changed

+137
-24
lines changed

_config.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ topnav_sticker_target: "_blank"
3838
calendly_enabled: true
3939

4040
# SEO
41-
#google_analytics_tracking_id: "UA-32654174-2"
42-
google_analytics_tracking_id:
41+
google_analytics_tracking_id: "UA-32654174-2"
42+
#google_analytics_tracking_id:
4343
google_optimize_code:
44-
#google_ads_tracking_id: "AW-1001458997"
45-
google_ads_tracking_id:
44+
google_ads_tracking_id: "AW-1001458997"
45+
#google_ads_tracking_id:
4646
quantcast_code:
4747
yandex_metrika_tracking_id:
4848
#yandex-verification: "ea7ee85b13a6f76b"

_includes/cookieconsent.html

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<!-- Begin Cookie Consent plugin -->
2+
<link rel="stylesheet" href="{{ '/css/cookieconsent.2.8.5.css' | prepend: site.baseurl | prepend: site.url }}">
3+
<script defer src="{{ '/js/cookieconsent.2.8.5.js' | prepend: site.baseurl | prepend: site.url }}"></script>
4+
<script defer src="{{ '/js/cookieconsent-init.js' | prepend: site.baseurl | prepend: site.url }}"></script>
5+
<!-- End Cookie Consent plugin -->

_includes/google-ads.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
{% if page.name == 'contact.md' %}
44
<!-- Event snippet for NetLicensing - Visit Contact Page conversion page -->
5-
<script>
5+
<script type="text/plain" data-cookiecategory="analytics">
66
gtag('event', 'conversion', {'send_to': '{{ site.google_ads_tracking_id }}/ESfkCPHUleYBELWaxN0D'});
77
</script>
88

99
<!-- Event snippet for Lead-Formular send conversion page -->
10-
<script>
10+
<script type="text/plain" data-cookiecategory="analytics">
1111
function gtag_report_conversion(url) {
1212
var callback = function () {
1313
if (typeof(url) != 'undefined') {
@@ -25,7 +25,7 @@
2525

2626
{% if page.name == 'pricing.md' %}
2727
<!-- Event snippet for NetLicensing - Visit Pricing Page conversion page -->
28-
<script>
28+
<script type="text/plain" data-cookiecategory="analytics">
2929
gtag('event', 'conversion', {'send_to': '{{ site.google_ads_tracking_id }}/hS-zCJmHj-YBELWaxN0D'});
3030
</script>
3131
{% endif %}

_includes/google-analytics.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% if site.google_analytics_tracking_id %}
22
<!-- Global site tag (gtag.js) - Google Analytics -->
3-
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_tracking_id }}"></script>
4-
<script>
3+
<script type="text/plain" async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics_tracking_id }}" data-cookiecategory="analytics"></script>
4+
<script type="text/plain" data-cookiecategory="analytics">
55
window.dataLayer = window.dataLayer || [];
66
function gtag(){dataLayer.push(arguments);}
77
gtag('js', new Date());

_includes/head.html

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
{% endfor %}
3030
{% endif %}
3131

32+
{% include cookieconsent.html %}
3233
{% include google-analytics.html %}
3334
{% include google-ads.html %}
3435
{% include yandex-metrika.html %}

_includes/js.html

-15
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,6 @@
1313
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid={{ site.addthis_pub_id }}" async="async"></script>
1414
{% endif %}
1515

16-
<!-- Begin Cookie Consent plugin by Silktide - https://silktide.com/cookieconsent -->
17-
<script type="text/javascript">
18-
window.cookieconsent_options = {
19-
"message": "This website uses cookies to ensure you get the best experience. We'll assume you're ok with this, but you can opt-out if you wish.",
20-
"dismiss": "Accept",
21-
"learnMore": "Read More",
22-
"link": "https://www.labs64.com/legal/privacy-policy/cookies-policy/",
23-
"target": "_self",
24-
"theme": "light-bottom"
25-
};
26-
</script>
27-
<script type="text/javascript"
28-
src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.9/cookieconsent.min.js" async="async"></script>
29-
<!-- End Cookie Consent plugin -->
30-
3116
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
3217
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
3318
<!--[if lt IE 9]>

css/cookieconsent.2.8.5.css

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/cookieconsent-init.js

+114
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
// obtain cookieconsent plugin
2+
var cc = initCookieConsent();
3+
4+
var cookie = '🍪';
5+
6+
// run plugin with config object
7+
cc.run({
8+
current_lang : 'en',
9+
autoclear_cookies : true, // default: false
10+
cookie_name: 'l64_cc_202208', // default: 'cc_cookie'
11+
cookie_expiration : 90, // default: 182
12+
page_scripts: true, // default: false
13+
force_consent: true, // default: false
14+
15+
// auto_language: null, // default: null; could also be 'browser' or 'document'
16+
autorun: true, // default: true
17+
delay: 2000, // default: 0
18+
hide_from_bots: false, // default: false
19+
remove_cookie_tables: true, // default: false
20+
// cookie_domain: location.hostname, // default: current domain
21+
// cookie_path: "/", // default: root
22+
// cookie_same_site: "Lax",
23+
// use_rfc_cookie: false, // default: false
24+
// revision: 0, // default: 0
25+
26+
gui_options: {
27+
consent_modal: {
28+
layout: 'cloud', // box,cloud,bar
29+
position: 'bottom center', // bottom,middle,top + left,right,center
30+
transition: 'slide' // zoom,slide
31+
},
32+
settings_modal: {
33+
layout: 'box', // box,bar
34+
// position: 'left', // right,left (available only if bar layout selected)
35+
transition: 'slide' // zoom,slide
36+
}
37+
},
38+
39+
onFirstAction: function(){
40+
console.log('onFirstAction...');
41+
},
42+
43+
onAccept: function (cookie) {
44+
console.log('onAccept...');
45+
},
46+
47+
onChange: function (cookie, changed_preferences) {
48+
console.log('onChange...');
49+
// If analytics category is disabled => disable google analytics
50+
if (!cc.allowedCategory('analytics')) {
51+
typeof gtag === 'function' && gtag('consent', 'update', {
52+
'analytics_storage': 'denied'
53+
});
54+
}
55+
},
56+
57+
languages: {
58+
'en': {
59+
consent_modal: {
60+
title: cookie + ' We use cookies!',
61+
description: 'This website uses essential cookies to ensure its proper operation and tracking cookies to understand how you interact with it. The latter will be set only after consent. <button type="button" data-cc="c-settings" class="cc-link">Let me choose</button>',
62+
primary_btn: {
63+
text: 'Accept all',
64+
role: 'accept_all' // 'accept_selected' or 'accept_all'
65+
},
66+
secondary_btn: {
67+
text: 'Reject all',
68+
role: 'accept_necessary' // 'settings' or 'accept_necessary'
69+
}
70+
},
71+
settings_modal: {
72+
title: cookie + ' Cookie settings',
73+
save_settings_btn: 'Save settings',
74+
accept_all_btn: 'Accept all',
75+
reject_all_btn: 'Reject all',
76+
close_btn_label: 'Close',
77+
blocks: [
78+
{
79+
title: 'Cookie usage 📢',
80+
description: 'We use cookies to ensure the basic functionalities of the website and to enhance your online experience. You can choose for each category to opt-in/out whenever you want. For more details relative to cookies and other sensitive data, please read the <a href="https://www.labs64.com/legal/privacy-policy/" class="cc-link">privacy policy</a>.'
81+
}, {
82+
title: 'Technically required cookies',
83+
description: 'These cookies are essential in order to enable you to move around the website and use its features, such as setting your privacy preferences, logging in or filling in forms. Without these cookies, services requested through usage of our website cannot be properly provided.',
84+
toggle: {
85+
value: 'necessary',
86+
enabled: true,
87+
readonly: true // cookie categories with readonly=true are all treated as "necessary cookies"
88+
}
89+
}, {
90+
title: 'Performance and Analytics cookies',
91+
description: 'These cookies collect information about how visitors use a website, for instance which pages visitors go to most often, and how visitors move around the site. They help us to improve the user friendliness of a website and therefore enhance the user’s experience.',
92+
toggle: {
93+
value: 'analytics',
94+
enabled: false,
95+
readonly: false
96+
}
97+
}, {
98+
title: 'Functionality and Usability cookies',
99+
description: 'These cookies allow the website to remember choices you make or information you enter (such as your username, language or the region you are in) and provide enhanced, more personal features. They are also used to enable enhanced website functions.',
100+
toggle: {
101+
value: 'usability',
102+
enabled: false,
103+
readonly: false
104+
}
105+
}, {
106+
title: 'More information',
107+
description: 'For any queries in relation to our policy on cookies and your choices, please <a class="cc-link" href="https://labs64.com/contact">contact us</a>.',
108+
}
109+
]
110+
}
111+
}
112+
}
113+
114+
});

js/cookieconsent.2.8.5.js

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)