@blotoutio/providers-twitter-sdk 0.34.0 → 0.35.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
@@ -39,7 +39,7 @@ const init = ({ manifest }) => {
39
39
 
40
40
  const prepareData = (data) => {
41
41
  const payload = {};
42
- if (data['value']) {
42
+ if (data['value'] || data['value'] === 0) {
43
43
  payload['value'] = data['value'];
44
44
  }
45
45
  if (data['currency']) {
@@ -54,7 +54,7 @@ const prepareData = (data) => {
54
54
  if (item.quantity) {
55
55
  content['num_items'] = item.quantity;
56
56
  }
57
- if (item.item_price) {
57
+ if (item.item_price || item.item_price === 0) {
58
58
  content['content_price'] = item.item_price;
59
59
  }
60
60
  if (item.category) {
@@ -83,7 +83,7 @@ const getEventId = (event, conversions) => {
83
83
  };
84
84
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
85
85
  const payload = {
86
- sdkVersion: "0.34.0" ,
86
+ sdkVersion: "0.35.1" ,
87
87
  };
88
88
  if (window.twq && manifestVariables['enableBrowser'] === '1') {
89
89
  const twitterEventId = getEventId(eventName, manifestVariables['mappedConversions']);
package/index.js CHANGED
@@ -40,7 +40,7 @@ var ProvidersTwitterSdk = (function () {
40
40
 
41
41
  const prepareData = (data) => {
42
42
  const payload = {};
43
- if (data['value']) {
43
+ if (data['value'] || data['value'] === 0) {
44
44
  payload['value'] = data['value'];
45
45
  }
46
46
  if (data['currency']) {
@@ -55,7 +55,7 @@ var ProvidersTwitterSdk = (function () {
55
55
  if (item.quantity) {
56
56
  content['num_items'] = item.quantity;
57
57
  }
58
- if (item.item_price) {
58
+ if (item.item_price || item.item_price === 0) {
59
59
  content['content_price'] = item.item_price;
60
60
  }
61
61
  if (item.category) {
@@ -84,7 +84,7 @@ var ProvidersTwitterSdk = (function () {
84
84
  };
85
85
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
86
86
  const payload = {
87
- sdkVersion: "0.34.0" ,
87
+ sdkVersion: "0.35.1" ,
88
88
  };
89
89
  if (window.twq && manifestVariables['enableBrowser'] === '1') {
90
90
  const twitterEventId = getEventId(eventName, manifestVariables['mappedConversions']);
package/index.mjs CHANGED
@@ -37,7 +37,7 @@ const init = ({ manifest }) => {
37
37
 
38
38
  const prepareData = (data) => {
39
39
  const payload = {};
40
- if (data['value']) {
40
+ if (data['value'] || data['value'] === 0) {
41
41
  payload['value'] = data['value'];
42
42
  }
43
43
  if (data['currency']) {
@@ -52,7 +52,7 @@ const prepareData = (data) => {
52
52
  if (item.quantity) {
53
53
  content['num_items'] = item.quantity;
54
54
  }
55
- if (item.item_price) {
55
+ if (item.item_price || item.item_price === 0) {
56
56
  content['content_price'] = item.item_price;
57
57
  }
58
58
  if (item.category) {
@@ -81,7 +81,7 @@ const getEventId = (event, conversions) => {
81
81
  };
82
82
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
83
83
  const payload = {
84
- sdkVersion: "0.34.0" ,
84
+ sdkVersion: "0.35.1" ,
85
85
  };
86
86
  if (window.twq && manifestVariables['enableBrowser'] === '1') {
87
87
  const twitterEventId = getEventId(eventName, manifestVariables['mappedConversions']);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-twitter-sdk",
3
- "version": "0.34.0",
3
+ "version": "0.35.1",
4
4
  "description": "Twitter Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",