@blotoutio/edgetag-sdk-browser 0.13.0 → 0.15.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.
Files changed (2) hide show
  1. package/index.js +8 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -477,6 +477,8 @@
477
477
  if (initUserId) {
478
478
  return initUserId;
479
479
  }
480
+ // leaving this for backward compatibility as worker was maybe not updated yet
481
+ // reference https://github.com/blotoutio/solutions/issues/1960
480
482
  return getCookieValue(cookieKey);
481
483
  };
482
484
  const setUserId = (userId) => {
@@ -518,7 +520,7 @@
518
520
  });
519
521
  });
520
522
  const getStandardPayload = (payload) => {
521
- const data = Object.assign({ pageUrl: getPageUrl(), pageTitle: getPageTitle(), userAgent: getUserAgent(), referrer: getReferrer(), search: getSearch(), sdkVersion: "0.13.0" }, (payload || {}));
523
+ const data = Object.assign({ pageUrl: getPageUrl(), pageTitle: getPageTitle(), userAgent: getUserAgent(), referrer: getReferrer(), search: getSearch(), sdkVersion: "0.15.0" }, (payload || {}));
522
524
  let storage = {};
523
525
  const session = getData$1('session');
524
526
  if (session) {
@@ -704,7 +706,7 @@
704
706
  });
705
707
  });
706
708
  }
707
- postRequest(getDataURL(), { data }, options).catch(error);
709
+ postRequest(getDataURL(), { data, providers }, options).catch(error);
708
710
  };
709
711
 
710
712
  const saveDataToEdge = (key, value, provider) => {
@@ -859,6 +861,9 @@
859
861
  log('Initialization failed');
860
862
  return;
861
863
  }
864
+ if (result.userId) {
865
+ setUserId(result.userId);
866
+ }
862
867
  handleManifest(result.result);
863
868
  })
864
869
  .catch(error);
@@ -892,6 +897,7 @@
892
897
  postRequest(getUserURL(), {
893
898
  key,
894
899
  value,
900
+ providers,
895
901
  }, options).catch(error);
896
902
  };
897
903
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blotoutio/edgetag-sdk-browser",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Browser SDK for EdgeTag",
5
5
  "author": "Blotout",
6
6
  "license": "MIT",