@blotoutio/providers-facebook-sdk 0.53.1 → 0.55.0

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
@@ -44,7 +44,7 @@ const getUserData = () => {
44
44
  }
45
45
  return data;
46
46
  };
47
- const runInit = (pixelId, userId) => {
47
+ const runInit = (pixelId, ldu, userId) => {
48
48
  var _a, _b;
49
49
  const wrapper = getFbq();
50
50
  if (!wrapper) {
@@ -58,6 +58,9 @@ const runInit = (pixelId, userId) => {
58
58
  ...getUserData(),
59
59
  });
60
60
  wrapper.disablePushState = true;
61
+ if (ldu) {
62
+ wrapper('dataProcessingOptions', ['LDU'], 0, 0);
63
+ }
61
64
  };
62
65
 
63
66
  // eslint-disable-next-line @nx/enforce-module-boundaries
@@ -94,7 +97,7 @@ const init = ({ manifest, userId }) => {
94
97
  return;
95
98
  }
96
99
  snippet();
97
- runInit(manifest.variables['pixelId'], userId);
100
+ runInit(manifest.variables['pixelId'], manifest.variables['ldu'] === '1', userId);
98
101
  };
99
102
 
100
103
  const getProductIdFromMapping = (item, productIdMapping) => {
@@ -177,7 +180,7 @@ const prepareData = (data, productIdMapping) => {
177
180
  };
178
181
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
179
182
  const payload = {
180
- sdkVersion: "0.53.1" ,
183
+ sdkVersion: "0.55.0" ,
181
184
  };
182
185
  if (window.fbq &&
183
186
  !!manifestVariables['pixelId'] &&
@@ -199,7 +202,7 @@ const user = ({ userId, manifestVariables }) => {
199
202
  manifestVariables['enableBrowser'] !== '1') {
200
203
  return;
201
204
  }
202
- runInit(manifestVariables['pixelId'], userId);
205
+ runInit(manifestVariables['pixelId'], manifestVariables['ldu'] === '1', userId);
203
206
  };
204
207
 
205
208
  // eslint-disable-next-line @nx/enforce-module-boundaries
package/index.js CHANGED
@@ -45,7 +45,7 @@ var ProvidersFacebookSdk = (function () {
45
45
  }
46
46
  return data;
47
47
  };
48
- const runInit = (pixelId, userId) => {
48
+ const runInit = (pixelId, ldu, userId) => {
49
49
  var _a, _b;
50
50
  const wrapper = getFbq();
51
51
  if (!wrapper) {
@@ -59,6 +59,9 @@ var ProvidersFacebookSdk = (function () {
59
59
  ...getUserData(),
60
60
  });
61
61
  wrapper.disablePushState = true;
62
+ if (ldu) {
63
+ wrapper('dataProcessingOptions', ['LDU'], 0, 0);
64
+ }
62
65
  };
63
66
 
64
67
  // eslint-disable-next-line @nx/enforce-module-boundaries
@@ -95,7 +98,7 @@ var ProvidersFacebookSdk = (function () {
95
98
  return;
96
99
  }
97
100
  snippet();
98
- runInit(manifest.variables['pixelId'], userId);
101
+ runInit(manifest.variables['pixelId'], manifest.variables['ldu'] === '1', userId);
99
102
  };
100
103
 
101
104
  const getProductIdFromMapping = (item, productIdMapping) => {
@@ -178,7 +181,7 @@ var ProvidersFacebookSdk = (function () {
178
181
  };
179
182
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
180
183
  const payload = {
181
- sdkVersion: "0.53.1" ,
184
+ sdkVersion: "0.55.0" ,
182
185
  };
183
186
  if (window.fbq &&
184
187
  !!manifestVariables['pixelId'] &&
@@ -200,7 +203,7 @@ var ProvidersFacebookSdk = (function () {
200
203
  manifestVariables['enableBrowser'] !== '1') {
201
204
  return;
202
205
  }
203
- runInit(manifestVariables['pixelId'], userId);
206
+ runInit(manifestVariables['pixelId'], manifestVariables['ldu'] === '1', userId);
204
207
  };
205
208
 
206
209
  // eslint-disable-next-line @nx/enforce-module-boundaries
package/index.mjs CHANGED
@@ -42,7 +42,7 @@ const getUserData = () => {
42
42
  }
43
43
  return data;
44
44
  };
45
- const runInit = (pixelId, userId) => {
45
+ const runInit = (pixelId, ldu, userId) => {
46
46
  var _a, _b;
47
47
  const wrapper = getFbq();
48
48
  if (!wrapper) {
@@ -56,6 +56,9 @@ const runInit = (pixelId, userId) => {
56
56
  ...getUserData(),
57
57
  });
58
58
  wrapper.disablePushState = true;
59
+ if (ldu) {
60
+ wrapper('dataProcessingOptions', ['LDU'], 0, 0);
61
+ }
59
62
  };
60
63
 
61
64
  // eslint-disable-next-line @nx/enforce-module-boundaries
@@ -92,7 +95,7 @@ const init = ({ manifest, userId }) => {
92
95
  return;
93
96
  }
94
97
  snippet();
95
- runInit(manifest.variables['pixelId'], userId);
98
+ runInit(manifest.variables['pixelId'], manifest.variables['ldu'] === '1', userId);
96
99
  };
97
100
 
98
101
  const getProductIdFromMapping = (item, productIdMapping) => {
@@ -175,7 +178,7 @@ const prepareData = (data, productIdMapping) => {
175
178
  };
176
179
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
177
180
  const payload = {
178
- sdkVersion: "0.53.1" ,
181
+ sdkVersion: "0.55.0" ,
179
182
  };
180
183
  if (window.fbq &&
181
184
  !!manifestVariables['pixelId'] &&
@@ -197,7 +200,7 @@ const user = ({ userId, manifestVariables }) => {
197
200
  manifestVariables['enableBrowser'] !== '1') {
198
201
  return;
199
202
  }
200
- runInit(manifestVariables['pixelId'], userId);
203
+ runInit(manifestVariables['pixelId'], manifestVariables['ldu'] === '1', userId);
201
204
  };
202
205
 
203
206
  // eslint-disable-next-line @nx/enforce-module-boundaries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-facebook-sdk",
3
- "version": "0.53.1",
3
+ "version": "0.55.0",
4
4
  "description": "Facebook Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",