@brainfish-ai/web-tracker 0.0.9-alpha.2 → 0.0.9

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/dist/index.js CHANGED
@@ -1400,7 +1400,15 @@ class Nr {
1400
1400
  }
1401
1401
  identify(e) {
1402
1402
  return O(this, null, function* () {
1403
- if (e.userId && (this.userId = e.userId, this.flush()), Object.keys(e).length > 1) return this.send({ type: "user.identify", payload: Oe(de({}, e), { properties: de(de({}, this.global), e.properties) }) });
1403
+ e.userId && (this.userId = e.userId, this.flush());
1404
+ const a = document.querySelector("#bf-iframe-container .trigger-iframe");
1405
+ if (a) {
1406
+ const n = () => {
1407
+ a.contentWindow && a.contentWindow.postMessage({ type: "USER_IDENTIFY", payload: e }, "*");
1408
+ };
1409
+ a.contentWindow && n(), a.addEventListener("load", n);
1410
+ }
1411
+ if (Object.keys(e).length > 1) return this.send({ type: "user.identify", payload: Oe(de({}, e), { properties: de(de({}, this.global), e.properties) }) });
1404
1412
  });
1405
1413
  }
1406
1414
  record(e, a) {
@@ -3950,7 +3958,7 @@ const Te = class Te {
3950
3958
  };
3951
3959
  M(Te, "instance");
3952
3960
  let Pa = Te;
3953
- const Wi = "0.0.9-alpha.2";
3961
+ const Wi = "0.0.9";
3954
3962
  class Fn extends Nr {
3955
3963
  constructor(a) {
3956
3964
  super(de({ sdk: "web", sdkVersion: Wi }, a));
package/dist/index.js.gz CHANGED
Binary file