@mirai/core 0.3.268 → 0.3.269

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/index.html +12 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.3.268",
3
+ "version": "0.3.269",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",
package/public/index.html CHANGED
@@ -10,23 +10,29 @@
10
10
  function gtag() {
11
11
  dataLayer.push(arguments);
12
12
  }
13
- gtag('consent', 'default', {
13
+ gtag('consent', 'update', {
14
14
  ad_storage: 'granted',
15
15
  ad_user_data: 'granted',
16
16
  ad_personalization: 'granted',
17
17
  analytics_storage: 'granted',
18
18
  });
19
- function getId() {
19
+ function setId() {
20
20
  const params = new URLSearchParams(window.location.search);
21
21
  if (params.get('useTracking')) {
22
- document.querySelector('#mirai').dataset.miraiId = params.get('miraiId') || '100379008';
22
+ const time = setInterval(() => {
23
+ const el = document.querySelector('#mirai');
24
+ if (!el) return;
25
+
26
+ clearInterval(time);
27
+ document.querySelector('#mirai').dataset.miraiId = params.get('miraiId') || '100379008';
28
+ }, 100);
23
29
  }
24
30
  }
25
- getId();
31
+ setId();
26
32
  </script>
27
33
  </head>
28
- <body onload="getId()">
29
- <div data-mirai-engine="mirai_tr" data-init="true"></div>
34
+ <body>
35
+ <div data-mirai-engine="mirai_tr" data-init="false"></div>
30
36
  <noscript>You need to enable JavaScript to run this app.</noscript>
31
37
  <!-- hotel example -->
32
38
  <div id="mirai" data-mirai-id="100379008"></div>