@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
35 lines (34 loc) • 822 B
JavaScript
import { logger as E } from "../../shared-lib/index.js";
import r from "../managers/braze-instance.js";
import ue from "../models/braze-event.js";
import H from "../models/request-result.js";
const c = {
rt: (e, o, t) => {
var n, s;
const i = new H(),
l = r.u();
if (!l)
return (
E.info(
`Not logging event with type "${e}" because the current session ID could not be found.`,
),
i
);
const d = l.qo();
return (
i.ue.push(
new ue(
t || (null === (n = r.ir()) || void 0 === n ? void 0 : n.getUserId()),
e,
new Date().valueOf(),
d,
o,
),
),
(i.W =
(null === (s = r.p()) || void 0 === s ? void 0 : s.Eo(i.ue)) || !1),
i
);
},
};
export default c;