@blotoutio/providers-tiktok-sdk 0.9.0 → 0.9.2

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/index.js +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -142,7 +142,9 @@ var ProvidersTiktokSdk = (function () {
142
142
  event !== 'CompletePayment') {
143
143
  return {};
144
144
  }
145
- const payload = {};
145
+ const payload = {
146
+ app: 'Blotout',
147
+ };
146
148
  if (data['value']) {
147
149
  payload['value'] = data['value'];
148
150
  }
@@ -155,9 +157,13 @@ var ProvidersTiktokSdk = (function () {
155
157
  if (data['description']) {
156
158
  payload['description'] = data['description'];
157
159
  }
160
+ if (data['type']) {
161
+ payload['content_type'] = data['type'];
162
+ }
158
163
  if (data['contents'] &&
159
164
  Array.isArray(data['contents']) &&
160
165
  data['contents'].length > 1) {
166
+ payload['content_type'] = data['contents'][0].type;
161
167
  payload['contents'] = data['contents'].map((item) => {
162
168
  const content = {};
163
169
  if (item.id) {
@@ -203,7 +209,7 @@ var ProvidersTiktokSdk = (function () {
203
209
  payload['content_category'] = data['contents'][0].category;
204
210
  }
205
211
  }
206
- payload['app'] = 'Blotout';
212
+ payload['content_type'] = payload['content_type'] || 'product';
207
213
  return payload;
208
214
  };
209
215
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-tiktok-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.9.2",
4
4
  "description": "Tiktok Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",