@ikas/storefront 0.0.82 → 0.0.83
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/index.es.js +8 -3
- package/build/index.js +8 -3
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -20863,9 +20863,10 @@ var Analytics = /** @class */ (function () {
|
|
|
20863
20863
|
var gtmId = serverRuntimeConfig.GTM_ID;
|
|
20864
20864
|
var fbpId = serverRuntimeConfig.FBP_ID;
|
|
20865
20865
|
var event = {};
|
|
20866
|
-
//window._fbq.push(['track', 'ViewContent']
|
|
20867
20866
|
try {
|
|
20867
|
+
console.log("if before fbpId", fbpId);
|
|
20868
20868
|
if (fbpId) {
|
|
20869
|
+
console.log("if fbpId", fbpId);
|
|
20869
20870
|
!isServer$2 &&
|
|
20870
20871
|
window.fbq("track", "ViewContent", productToFBPItem(productDetail));
|
|
20871
20872
|
}
|
|
@@ -20986,7 +20987,7 @@ var Analytics = /** @class */ (function () {
|
|
|
20986
20987
|
localStorage.removeItem(LS_BEGIN_CHECKOUT_KEY);
|
|
20987
20988
|
if (fbpId) {
|
|
20988
20989
|
!isServer$2 &&
|
|
20989
|
-
window.fbq("track", "
|
|
20990
|
+
window.fbq("track", "Purchase", beginCheckoutFBPItem(checkout));
|
|
20990
20991
|
}
|
|
20991
20992
|
if (gtmId) {
|
|
20992
20993
|
event = {
|
|
@@ -21154,7 +21155,9 @@ function productToFBPItem(productDetail, quantity) {
|
|
|
21154
21155
|
content_ids: [productDetail.selectedVariant.id],
|
|
21155
21156
|
content_type: "product",
|
|
21156
21157
|
value: productDetail.selectedVariant.price.finalPrice,
|
|
21157
|
-
currency: productDetail.selectedVariant.price.currency
|
|
21158
|
+
currency: productDetail.selectedVariant.price.currency === ""
|
|
21159
|
+
? "TRY"
|
|
21160
|
+
: productDetail.selectedVariant.price.currency,
|
|
21158
21161
|
num_items: quantity,
|
|
21159
21162
|
};
|
|
21160
21163
|
}
|
|
@@ -21211,6 +21214,7 @@ var AnalyticsHead = function (_a) {
|
|
|
21211
21214
|
var serverRuntimeConfig = getConfig().serverRuntimeConfig;
|
|
21212
21215
|
var gtmId = serverRuntimeConfig.GTM_ID;
|
|
21213
21216
|
var fbpId = serverRuntimeConfig.FBP_ID;
|
|
21217
|
+
console.log("fbp head", fbpId);
|
|
21214
21218
|
return (createElement(Fragment, null,
|
|
21215
21219
|
blockHTML && (createElement("script", { dangerouslySetInnerHTML: {
|
|
21216
21220
|
__html: "dataLayer = [{'gtm.blocklist': ['html']}];",
|
|
@@ -21226,6 +21230,7 @@ var AnalyticsBody = function () {
|
|
|
21226
21230
|
var serverRuntimeConfig = getConfig().serverRuntimeConfig;
|
|
21227
21231
|
var gtmId = serverRuntimeConfig.GTM_ID;
|
|
21228
21232
|
var fbpId = serverRuntimeConfig.FBP_ID;
|
|
21233
|
+
console.log("fbp body", fbpId);
|
|
21229
21234
|
return (createElement(Fragment, null,
|
|
21230
21235
|
gtmId && (createElement("noscript", { dangerouslySetInnerHTML: {
|
|
21231
21236
|
__html: "<iframe src=\"https://www.googletagmanager.com/ns.html?id=" + gtmId + "\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>",
|
package/build/index.js
CHANGED
|
@@ -20846,9 +20846,10 @@ var Analytics = /** @class */ (function () {
|
|
|
20846
20846
|
var gtmId = serverRuntimeConfig.GTM_ID;
|
|
20847
20847
|
var fbpId = serverRuntimeConfig.FBP_ID;
|
|
20848
20848
|
var event = {};
|
|
20849
|
-
//window._fbq.push(['track', 'ViewContent']
|
|
20850
20849
|
try {
|
|
20850
|
+
console.log("if before fbpId", fbpId);
|
|
20851
20851
|
if (fbpId) {
|
|
20852
|
+
console.log("if fbpId", fbpId);
|
|
20852
20853
|
!isServer$2 &&
|
|
20853
20854
|
window.fbq("track", "ViewContent", productToFBPItem(productDetail));
|
|
20854
20855
|
}
|
|
@@ -20969,7 +20970,7 @@ var Analytics = /** @class */ (function () {
|
|
|
20969
20970
|
localStorage.removeItem(LS_BEGIN_CHECKOUT_KEY);
|
|
20970
20971
|
if (fbpId) {
|
|
20971
20972
|
!isServer$2 &&
|
|
20972
|
-
window.fbq("track", "
|
|
20973
|
+
window.fbq("track", "Purchase", beginCheckoutFBPItem(checkout));
|
|
20973
20974
|
}
|
|
20974
20975
|
if (gtmId) {
|
|
20975
20976
|
event = {
|
|
@@ -21137,7 +21138,9 @@ function productToFBPItem(productDetail, quantity) {
|
|
|
21137
21138
|
content_ids: [productDetail.selectedVariant.id],
|
|
21138
21139
|
content_type: "product",
|
|
21139
21140
|
value: productDetail.selectedVariant.price.finalPrice,
|
|
21140
|
-
currency: productDetail.selectedVariant.price.currency
|
|
21141
|
+
currency: productDetail.selectedVariant.price.currency === ""
|
|
21142
|
+
? "TRY"
|
|
21143
|
+
: productDetail.selectedVariant.price.currency,
|
|
21141
21144
|
num_items: quantity,
|
|
21142
21145
|
};
|
|
21143
21146
|
}
|
|
@@ -21194,6 +21197,7 @@ var AnalyticsHead = function (_a) {
|
|
|
21194
21197
|
var serverRuntimeConfig = getConfig__default['default']().serverRuntimeConfig;
|
|
21195
21198
|
var gtmId = serverRuntimeConfig.GTM_ID;
|
|
21196
21199
|
var fbpId = serverRuntimeConfig.FBP_ID;
|
|
21200
|
+
console.log("fbp head", fbpId);
|
|
21197
21201
|
return (React.createElement(React.Fragment, null,
|
|
21198
21202
|
blockHTML && (React.createElement("script", { dangerouslySetInnerHTML: {
|
|
21199
21203
|
__html: "dataLayer = [{'gtm.blocklist': ['html']}];",
|
|
@@ -21209,6 +21213,7 @@ var AnalyticsBody = function () {
|
|
|
21209
21213
|
var serverRuntimeConfig = getConfig__default['default']().serverRuntimeConfig;
|
|
21210
21214
|
var gtmId = serverRuntimeConfig.GTM_ID;
|
|
21211
21215
|
var fbpId = serverRuntimeConfig.FBP_ID;
|
|
21216
|
+
console.log("fbp body", fbpId);
|
|
21212
21217
|
return (React.createElement(React.Fragment, null,
|
|
21213
21218
|
gtmId && (React.createElement("noscript", { dangerouslySetInnerHTML: {
|
|
21214
21219
|
__html: "<iframe src=\"https://www.googletagmanager.com/ns.html?id=" + gtmId + "\" height=\"0\" width=\"0\" style=\"display:none;visibility:hidden\"></iframe>",
|