Source: identify.js

/**
 * Send an identify event to segment & LogRocket
 *
 * @param {string} userID - A unique identifier for this user
 * @param {object} traits - A dictionary of traits you know about the user
 */
export function identify(userID, traits) {
  if (window.analytics) {
    window.analytics.identify(userID, traits);
  }

  if (window.LogRocket) {
    window.LogRocket.identify(userID, traits);
  } else {
    // queue it
    window.lr_analytics.logrocket?.call_queue?.push({
      name: "identify",
      args: [userID, traits],
    });
  }
}