-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathexample.html
65 lines (43 loc) · 2.58 KB
/
example.html
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>GDPR cookies</title>
<link rel="stylesheet" href="gdrpCookie.css">
<script type="application/javascript" charset="utf-8" src="gdprCookie.js"></script>
<!-- <script type="application/javascript" charset="utf-8" src="dist/gdprCookie_nonES6.min.js"></script> -->
<script>
var cookies=new gdprCookie();
cookies.title="Cookies";
cookies.cookie_path='/'; //the cookie path, default is '/'
//cookies.cookie_secure=true;//true or false. If ommited, the default functionality is to check the location protocol. If set, the location.protocol is overriden.
cookies.types=[{'type':'tracking','text':'Analysis Cookies','default':false,'detailsText':'Google Analytics'},
{'type':'advertising','text':'Advertising Cookies','default':false,'detailsText':'Google remarketing, Facebook pixels etc'}];//add as many as you need in the array. Type parameter must be unique!!!
cookies.cookie_type_mandatory_text='Cookies λειτουργικότητας';//this is the default mandatory cookie(actually this cookie) text next to the disabled checkbox
cookies.cookie_type_mandatory_detailsText='These cookies are essential for the site operation (e.g PHPSESSID)';
cookies.expires='30';//the cookie expiry period in days default is 30
cookies.position='bottom';//positioning of the container. Default is bottom. Possible values top,bottom,full. Full covers the hole page and the user must make a selection in order to continue using your site
cookies.intro_text='We use <a href="#link-to-your-cookie-policy" target="_blank"><strong>cookies</strong></a> to provide you the best possible experience on our site. You can adjust the cookie settings anytime.';
cookies.btn_settings_text='Settings';
cookies.btn_hide_settings_text='Hide settings';
cookies.btn_accept_text='Accept';
cookies.settings_text='In order to provide you the best experience on our site, we use the following cookies';
cookies.check();
</script>
<!--After initializing cookies you act based on the user preference -->
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=XX-XXXXXXXX-1"></script>
<script>
if(cookies){
window['ga-disable-XX-XXXXXXXX-1'] = !cookies.cookie.tracking; //disable or enable tracking based on user preference
}
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'XX-XXXXXXXX-1');
</script>
</head>
<body style="background-color:red;">
<a href="//google.com" class="gdpr_settings_button" target="_blank">here</a>
</body>
</html>