autostart: get()

in products/userale/src/getInitialSettings.ts [58:86]


    autostart: get("data-autostart") === "false" ? false : true,
    browserSessionId: null,
    custIndex: get("data-index") || null,
    headers: headers ? JSON.parse(headers) : null,
    httpSessionId: httpSessionId,
    logCountThreshold: +(get("data-threshold") || 5),
    logDetails: get("data-log-details") === "true" ? true : false,
    resolution: +(get("data-resolution") || 500),
    sessionId: get("data-session") || sessionId,
    time: timeStampScale(document.createEvent("CustomEvent")),
    toolName: get("data-tool") || null,
    toolVersion: get("data-version") || null,
    transmitInterval: +(get("data-interval") || 5000),
    url: get("data-url") || "http://localhost:8000",
    useraleVersion: get("data-userale-version") || null,
    userFromParams: get("data-user-from-params") || null,
    userId: get("data-user") || null,
  };
  return settings;
}

/**
 * defines sessionId, stores it in sessionStorage, checks to see if there is a sessionId in
 * storage when script is started. This prevents events like 'submit', which refresh page data
 * from refreshing the current user session
 *
 */
export function getsessionId(sessionKey: string, value: any) {
  if (window.sessionStorage.getItem(sessionKey) === null) {