@ikas/storefront 5.0.0-beta.15 → 5.0.0-beta.16
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/build/analytics/head/index.js +1 -1
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as t from"react";import e from"html-react-parser";import{getIkasEventsScript as n}from"../events.js";import{observer as a}from"mobx-react-lite";import{IkasStorefrontConfig as r}from"@ikas/storefront-config";import{Partytown as o}from'./../../ext/@builder.io/partytown/react/index.mjs.js';var i=a((function(){var a=r.getGtmId(),i=r.getFbpId(),c=r.getAnalytics4Id(),s=r.getUniversalAnalyticsId(),
|
|
1
|
+
import*as t from"react";import e from"html-react-parser";import{getIkasEventsScript as n}from"../events.js";import{observer as a}from"mobx-react-lite";import{IkasStorefrontConfig as r}from"@ikas/storefront-config";import{Partytown as o}from'./../../ext/@builder.io/partytown/react/index.mjs.js';var i=a((function(){var a=r.getGtmId(),i=r.getFbpId(),c=r.getAnalytics4Id(),s=r.getUniversalAnalyticsId(),m=r.getTiktokPixelId(),g=r.getIsEditor(),l=r.getStorefrontJSScripts(),d=r.getDomain();return t.createElement(t.Fragment,null,t.createElement(o,{debug:!0,forward:["dataLayer.push","fbq","gtag","ga","ttq"],logScriptExecution:!0,logCalls:!0,resolveUrl:function(t,e,n){if("script"===n&&["google-analytics","googletagmanager","connect.facebook.net","analytics.tiktok.com"].some((function(e){return t.hostname.includes(e)}))){var a=new URL("https://".concat(d,"/partytown/proxy"));return a.searchParams.append("proxy",t.href),a}return t}}),a&&!g&&t.createElement("script",{type:"text/partytown",dangerouslySetInnerHTML:{__html:"(function (window, document, i) {\n window['dataLayer'] = window[dataLayer] || [];\n \n window['dataLayer'].push({ 'gtm.start': new Date().getTime(), 'event': 'gtm.js' });\n \n var firstScript = document.getElementsByTagName('script')[0];\n var gtmScript = document.createElement('script');\n var dataLayer = 'dataLayer' != 'dataLayer' ? '&l=' + 'dataLayer' : '';\n \n gtmScript.async = true;\n \n // ORIGINAL\n gtmScript.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dataLayer;\n \n // HACK\n // gtmScript.src = './gtm.js?id=' + i + dataLayer;\n \n firstScript.parentNode.insertBefore(gtmScript, firstScript);\n })(window, document, '".concat(a,"');")}}),i&&!g&&t.createElement("script",{type:"text/partytown",dangerouslySetInnerHTML:{__html:"!function(f,b,e,v,n,t,s)\n {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n n.queue=[];t=b.createElement(e);t.async=!0;\n t.src=v;s=b.getElementsByTagName(e)[0];\n s.parentNode.insertBefore(t,s)}(window, document,'script',\n 'https://connect.facebook.net/en_US/fbevents.js');\n fbq('init', '".concat(i,"');\n fbq('track', 'PageView');")}}),c&&!g&&t.createElement(t.Fragment,null,t.createElement("script",{type:"text/partytown",src:"https://www.googletagmanager.com/gtag/js?id=".concat(c)}),t.createElement("script",{type:"text/partytown",dangerouslySetInnerHTML:{__html:"window.dataLayer = window.dataLayer || [];\n function gtag(){dataLayer.push(arguments);}\n gtag('js', new Date());\n gtag('config', '".concat(c,"');")}})),s&&!g&&t.createElement(t.Fragment,null,t.createElement("script",{type:"text/partytown",dangerouslySetInnerHTML:{__html:"window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;\n ga('create', '".concat(s,"', 'auto');\n ga('require', 'ec');")}}),t.createElement("script",{type:"text/partytown",src:"https://www.google-analytics.com/analytics.js"})),m&&!g&&t.createElement("script",{type:"text/partytown",dangerouslySetInnerHTML:{__html:'!function (w, d, t) {\n w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};\n ttq.load(\''.concat(m,"');\n ttq.page();\n }(window, window.document, 'ttq');")}}),e(n()),l.map((function(t){return e(t)})))})),c=function(){var e=r.getGtmId(),n=r.getFbpId(),a=r.getIsEditor();return t.createElement(t.Fragment,null,e&&!a&&t.createElement("noscript",{dangerouslySetInnerHTML:{__html:'<iframe src="https://www.googletagmanager.com/ns.html?id='.concat(e,'" height="0" width="0" style="display:none;visibility:hidden"></iframe>')}}),n&&!a&&t.createElement("noscript",{dangerouslySetInnerHTML:{__html:'<img height="1" width="1" style="display:none" \n src="https://www.facebook.com/tr?id='.concat(n,'&ev=PageView&noscript=1"/>')}}))};export{c as AnalyticsBody,i as AnalyticsHead};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikas/storefront",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.16",
|
|
4
4
|
"description": "Storefront functionality for ikas storefront themes.",
|
|
5
5
|
"author": "ikas",
|
|
6
6
|
"license": "ISC",
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
"build": "rm -rf build && rollup -c"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@ikas/storefront-api": "^5.0.0-beta.
|
|
21
|
-
"@ikas/storefront-config": "^5.0.0-beta.
|
|
22
|
-
"@ikas/storefront-model-functions": "^5.0.0-beta.
|
|
23
|
-
"@ikas/storefront-models": "^5.0.0-beta.
|
|
24
|
-
"@ikas/storefront-providers": "^5.0.0-beta.
|
|
20
|
+
"@ikas/storefront-api": "^5.0.0-beta.16",
|
|
21
|
+
"@ikas/storefront-config": "^5.0.0-beta.16",
|
|
22
|
+
"@ikas/storefront-model-functions": "^5.0.0-beta.16",
|
|
23
|
+
"@ikas/storefront-models": "^5.0.0-beta.16",
|
|
24
|
+
"@ikas/storefront-providers": "^5.0.0-beta.16",
|
|
25
25
|
"@adyen/adyen-web": "^5.28.2",
|
|
26
26
|
"@rollup/plugin-commonjs": "^22.0.0",
|
|
27
27
|
"@rollup/plugin-json": "^4.1.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"libphonenumber-js": "^1.10.6"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@ikas/storefront-api": "^5.0.0-beta.
|
|
56
|
-
"@ikas/storefront-config": "^5.0.0-beta.
|
|
57
|
-
"@ikas/storefront-model-functions": "^5.0.0-beta.
|
|
58
|
-
"@ikas/storefront-models": "^5.0.0-beta.
|
|
59
|
-
"@ikas/storefront-providers": "^5.0.0-beta.
|
|
55
|
+
"@ikas/storefront-api": "^5.0.0-beta.16",
|
|
56
|
+
"@ikas/storefront-config": "^5.0.0-beta.16",
|
|
57
|
+
"@ikas/storefront-model-functions": "^5.0.0-beta.16",
|
|
58
|
+
"@ikas/storefront-models": "^5.0.0-beta.16",
|
|
59
|
+
"@ikas/storefront-providers": "^5.0.0-beta.16",
|
|
60
60
|
"mobx": "^6.1.3",
|
|
61
61
|
"mobx-react-lite": "^3.1.5",
|
|
62
62
|
"next": "12.2.0",
|