/**
* Send a track event to segment & LogRocket
*
* @param {string} event - The name of the event
* @param {object} [properties] - Additional properties
*/
export function track(event, properties) {
if (window.analytics) {
window.analytics.track(event, properties);
}
if (window.LogRocket) {
window.LogRocket.track(event, properties);
} else {
// queue it
window.lr_analytics.logrocket?.call_queue?.push({
name: "track",
args: [event, properties],
});
}
}