@blotoutio/providers-tiktok-sdk 0.30.0 → 0.30.1

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/index.cjs.js CHANGED
@@ -89,10 +89,10 @@ const getEventName = (event, manifestVariables) => {
89
89
  return event;
90
90
  };
91
91
  const getProductId = (item, productIdMapping) => {
92
- if (productIdMapping === '1') {
92
+ if (productIdMapping === '1' && item['variantId']) {
93
93
  return item['variantId'];
94
94
  }
95
- if (productIdMapping === '2') {
95
+ if (productIdMapping === '2' && item['sku']) {
96
96
  return item['sku'];
97
97
  }
98
98
  return item['id'];
@@ -186,7 +186,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
186
186
  });
187
187
  }
188
188
  return {
189
- sdkVersion: "0.30.0" ,
189
+ sdkVersion: "0.30.1" ,
190
190
  };
191
191
  };
192
192
 
package/index.js CHANGED
@@ -90,10 +90,10 @@ var ProvidersTiktokSdk = (function () {
90
90
  return event;
91
91
  };
92
92
  const getProductId = (item, productIdMapping) => {
93
- if (productIdMapping === '1') {
93
+ if (productIdMapping === '1' && item['variantId']) {
94
94
  return item['variantId'];
95
95
  }
96
- if (productIdMapping === '2') {
96
+ if (productIdMapping === '2' && item['sku']) {
97
97
  return item['sku'];
98
98
  }
99
99
  return item['id'];
@@ -187,7 +187,7 @@ var ProvidersTiktokSdk = (function () {
187
187
  });
188
188
  }
189
189
  return {
190
- sdkVersion: "0.30.0" ,
190
+ sdkVersion: "0.30.1" ,
191
191
  };
192
192
  };
193
193
 
package/index.mjs CHANGED
@@ -87,10 +87,10 @@ const getEventName = (event, manifestVariables) => {
87
87
  return event;
88
88
  };
89
89
  const getProductId = (item, productIdMapping) => {
90
- if (productIdMapping === '1') {
90
+ if (productIdMapping === '1' && item['variantId']) {
91
91
  return item['variantId'];
92
92
  }
93
- if (productIdMapping === '2') {
93
+ if (productIdMapping === '2' && item['sku']) {
94
94
  return item['sku'];
95
95
  }
96
96
  return item['id'];
@@ -184,7 +184,7 @@ const tag = ({ data, eventName, manifestVariables, eventId }) => {
184
184
  });
185
185
  }
186
186
  return {
187
- sdkVersion: "0.30.0" ,
187
+ sdkVersion: "0.30.1" ,
188
188
  };
189
189
  };
190
190
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-tiktok-sdk",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "description": "Tiktok Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",