Skip to main content

userDidStopWatchingEvent

Indicates that a user has stopped watching an event and cleans up resources.

Overview

When a user stops watching an event, call this method to properly clean up resources and reset the SDK state. This method is typically called when the user navigates away from the event view or closes the application.

Method Signature

userDidStopWatchingEvent(params: SDKStopEventParams): Promise<void>

Parameters

ParameterTypeDescription
paramsSDKStopEventParamsAn object containing the necessary fields to shut down and clean up resources related to this event/page

SDKStopEventParams Interface

export type SDKStopEventParams = {
/**
* Event ID for the event being stopped.
*/
eventId?: string;
/**
* Page ID for the event being stopped.
*/
pageId?: string;
};

Return Value

This method returns a Promise that resolves when cleanup is complete.

Notes

  • Call this method when the user stops watching an event to ensure proper resource cleanup.