@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
35 lines (34 loc) • 823 B
JavaScript
import { logger as E } from "../../shared-lib/index.js";
import r from "../managers/braze-instance.js";
import Ie from "../models/braze-event.js";
import L from "../models/request-result.js";
const v = {
wt: (e, o, t) => {
var n, s;
const i = new L(),
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.el();
return (
i.Ce.push(
new Ie(
t || (null === (n = r.ir()) || void 0 === n ? void 0 : n.getUserId()),
e,
new Date().valueOf(),
d,
o,
),
),
(i.lt =
(null === (s = r.p()) || void 0 === s ? void 0 : s.ol(i.Ce)) || !1),
i
);
},
};
export default v;