@blotoutio/providers-facebook-sdk 0.16.2 → 0.17.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.
Files changed (2) hide show
  1. package/index.js +4 -4
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -31,14 +31,14 @@ var ProvidersFacebookSdk = (function () {
31
31
  if (!manifest.variables || manifest.variables['enableBrowser'] !== '1') {
32
32
  return;
33
33
  }
34
- const firstLoad = !window.fbq;
35
34
  snippet();
36
- if (!firstLoad || !window.fbq) {
35
+ if (!window.fbq) {
37
36
  return;
38
37
  }
39
38
  window.fbq('init', manifest.variables['pixelId'], {
40
39
  external_id: userId,
41
40
  });
41
+ window.fbq.disablePushState = true;
42
42
  };
43
43
 
44
44
  const prepareData = (data, useVariantId) => {
@@ -111,10 +111,10 @@ var ProvidersFacebookSdk = (function () {
111
111
  };
112
112
  const tag = ({ data, eventName, manifestVariables, eventId }) => {
113
113
  const payload = {
114
- sdkVersion: "0.16.2" ,
114
+ sdkVersion: "0.17.1" ,
115
115
  };
116
116
  if (window.fbq && manifestVariables['enableBrowser'] === '1') {
117
- window.fbq('track', eventName, prepareData(data, manifestVariables['variantId'] === '1'), {
117
+ window.fbq('trackSingle', manifestVariables['pixelId'], eventName, prepareData(data, manifestVariables['variantId'] === '1'), {
118
118
  eventID: eventId,
119
119
  });
120
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/providers-facebook-sdk",
3
- "version": "0.16.2",
3
+ "version": "0.17.1",
4
4
  "description": "Facebook Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",