Home Reference Source Test Repository

src/core/events/trackers/flamsteed.js

/**
 * Log an event with Flamsteed
 * @param  {Object|String} data An object containing data to log, or a string description of an event
 */
export default function({ name, data } = {}) {
  if (window.lp.fs) {
    window.lp.fs.log({
      d: typeof arguments[0] === "string" ? arguments[0] : JSON.stringify({ name, data })
    });
  }
};