@brainfish-ai/web-tracker 0.0.6 → 0.0.7-alpha.3

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,9 @@ class Er {
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: Me(de({}, e), { properties: de(de({}, this.global), e.properties) }) });
1403
+ console.log("identify", e), e.userId && (this.userId = e.userId, console.log("userId set to flush all queue items", this.userId), this.flush());
1404
+ const t = document.querySelector("#bf-iframe-container .trigger-iframe");
1405
+ if (console.log("looking for iframe", t), t != null && t.contentWindow && (console.log("posting message to iframe", t.contentWindow), t.contentWindow.postMessage({ type: "user.identify", payload: e }, "*")), Object.keys(e).length > 1) return this.send({ type: "user.identify", payload: Me(de({}, e), { properties: de(de({}, this.global), e.properties) }) });
1404
1406
  });
1405
1407
  }
1406
1408
  record(e, t) {
@@ -3772,7 +3774,7 @@ const Te = class Te {
3772
3774
  };
3773
3775
  N(Te, "instance");
3774
3776
  let Ut = Te;
3775
- const Mi = "0.0.6";
3777
+ const Mi = "0.0.7-alpha.3";
3776
3778
  class Mn extends Er {
3777
3779
  constructor(t) {
3778
3780
  super(de({ sdk: "web", sdkVersion: Mi }, t));
package/dist/index.js.gz CHANGED
Binary file