const sessionURL = Smartlook.getDashboardSessionUrl(false);
const sessionURLWithTimestamp = Smartlook.getDashboardSessionUrl(true);
const sessionURL = await Smartlook.instance.user.getSessionUrl();
const sessionURLWithTimestamp = await Smartlook.instance.user.getSessionUrlWithTimestamp();
Session URL documentation.
const visitorURL = Smartlook.getDashboardVisitorUrl();
const userURL = await Smartlook.instance.user.getUserUrl();
User URL documentation.
Smartlook.registerIntegrationListener(
dashboardSessionUrlCallback: (url: string) => void,
dashboardVisitorUrlCallback: (url: string) => void,
);
// Smartlook SDK-provided type
type EventListenerCallbackShape =
| ((url: string) => void)
| ((url: string) => Promise<void>);
Smartlook.instance.eventListeners.registerUserChangedListener(
eventListenerCallback?: EventListenerCallbackShape
);
Smartlook.instance.eventListeners.registerSessionChangedListener(
eventListenerCallback?: EventListenerCallbackShape
);