@gudhub/ssg-web-components-library 1.0.72 → 1.0.74

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -15,7 +15,13 @@ class CookiesPopup extends GHComponent {
15
15
 
16
16
  try {
17
17
  if (inEU == null) {
18
- await fetch("https://ipapi.co/json/").then((response) => response.json()).then((data) => inEU = data.in_eu);
18
+ await fetch("https://ipapi.co/json/").then((response) => response.json()).then((data) => {
19
+ if (data.country === "UA") {
20
+ inEU = true;
21
+ } else {
22
+ inEU = data.in_eu
23
+ }
24
+ });
19
25
  localStorage.setItem("inEU", inEU)
20
26
  }
21
27
  } catch (error) {
@@ -34,6 +40,8 @@ class CookiesPopup extends GHComponent {
34
40
  window.dataLayer = window.dataLayer || [];
35
41
  function gtag(){dataLayer.push(arguments);}
36
42
  gtag('consent', 'default', {
43
+ 'ad_personalization': 'denied',
44
+ 'ad_user_data': 'denied',
37
45
  'ad_storage': 'denied',
38
46
  'analytics_storage': 'denied',
39
47
  'functionality_storage': 'denied',
@@ -54,6 +62,8 @@ class CookiesPopup extends GHComponent {
54
62
  let ifGtagExist = await this.checkGtag();
55
63
  if (ifGtagExist) {
56
64
  gtag('consent', 'update', {
65
+ 'ad_personalization': 'granted',
66
+ 'ad_user_data': 'granted',
57
67
  'ad_storage': 'granted',
58
68
  'analytics_storage': 'granted',
59
69
  'functionality_storage': 'granted',