This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Start an async job to retrieve a list of session IDs, given the provided filters. The following filters must be passed:
This function requires elevated permissions and runs only on the backend and on dashboard pages.
function listSessionsAsync(
options: ListSessionsAsyncOptions,
): Promise<ListSessionsAsyncResponse>;
Filter options. The following filters must be passed:
Time period, either predefined or custom.
Session filter, either navigation flow (page interactions), conversion funnel steps, or device type.
import { analyticsSession } from "wix-analytics-session.v2";
async function listSessionsAsync(options) {
try {
const result = await analyticsSession.listSessionsAsync(options);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.